/*
 * Wishlist page — V2 skin for the JVM / CIX wishlist plugin (inc/wishlist-page.php).
 *
 * Tokens + banner come from tb-account.css. The plugin's wishlist.css and WooCommerce's table CSS
 * also load here, so every rule is prefixed with body.tb-wl-body (wins on specificity).
 *
 * The plugin's <table> is kept (its JS depends on it) and turned into a card grid:
 * tbody = grid, tr = card, td = card sections. WooCommerce's responsive-table ::before labels
 * ("Product:", "Price:") are switched off.
 */

body.tb-wl-body{background:#fff;}
body.tb-wl-body .tb-wl{--navy:#0A5098;--navy-d:#083E77;--ink:#16202B;--body:#3A4653;--muted:#626E7A;
  --mist:#F4F7FA;--mist2:#EAF1F8;--line:#DCE4EC;--accent:#E7A33C;--good:#217B48;--good-bg:#EFF8F2;
  --bad:#B3261E;--bad-bg:#FDF0EF;}

body.tb-wl-body .tb-wl__wrap{padding-top:40px;padding-bottom:64px;}

/* Guest note (replaces the plugin's raw blue "please log in…" bar) */
body.tb-wl-body .tb-wl__guest{border:1px solid var(--line);border-left:4px solid var(--navy);background:var(--mist);
  padding:14px 18px;margin:0 0 24px;}
body.tb-wl-body .tb-wl__guest p{margin:0;color:var(--body);font-size:15px;line-height:1.55;}
body.tb-wl-body .tb-wl__guest a{color:var(--navy);font-weight:600;text-decoration:underline;}
body.tb-wl-body #cixwishlist-guest-notice{display:none !important;}

/* The plugin's own "removed — Undo?" / add-to-cart notices */
body.tb-wl-body #cixwishlist-notice:empty{display:none;}
body.tb-wl-body #cixwishlist-notice{border:1px solid var(--line);border-left:4px solid var(--accent);background:#FFF8EC;
  color:var(--ink);padding:12px 16px;margin:0 0 20px;font-size:15px;}
body.tb-wl-body #cixwishlist-notice a{color:var(--navy);font-weight:600;text-decoration:underline;margin-right:8px;}
body.tb-wl-body .tb-wl .woocommerce-message,body.tb-wl-body .tb-wl .woocommerce-info{border-top-color:var(--navy);}

/* Table -> card grid */
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table{display:block;width:100%;border:0;margin:0;background:none;border-collapse:separate;}
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table.tb-wl--none{display:none;}
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table thead{display:none;}
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table tbody{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:20px;}
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table tfoot,
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table tfoot tr,
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table tfoot td{display:block;border:0;padding:0;background:none;}
body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table tfoot td{padding-top:24px;text-align:right;}

body.tb-wl-body .tb-wl tr.jvm-woocommerce-wishlist-product{display:flex;flex-direction:column;position:relative;background:#fff;
  border:1px solid var(--line);padding:16px;transition:box-shadow .18s,border-color .18s;}
body.tb-wl-body .tb-wl tr.jvm-woocommerce-wishlist-product:hover{border-color:#c9d6e3;box-shadow:0 6px 18px rgba(12,30,51,.08);}
body.tb-wl-body .tb-wl tr.jvm-woocommerce-wishlist-product td{display:block;width:auto;border:0 !important;padding:0;
  background:none !important;text-align:left !important;font-size:15px;color:var(--body);}
body.tb-wl-body .tb-wl tr.jvm-woocommerce-wishlist-product td::before{content:none !important;display:none !important;}

/* Remove (x) — round button, top-right of the card */
body.tb-wl-body .tb-wl td.product-remove{position:absolute;top:10px;right:10px;z-index:2;}
body.tb-wl-body .tb-wl td.product-remove a.remove{display:flex;align-items:center;justify-content:center;width:40px;height:40px;
  border-radius:50%;background:#fff;border:1px solid var(--line);color:var(--muted) !important;font-size:22px;line-height:1;
  font-weight:400;text-decoration:none;}
body.tb-wl-body .tb-wl td.product-remove a.remove:hover,
body.tb-wl-body .tb-wl td.product-remove a.remove:focus{background:var(--bad-bg);border-color:var(--bad);color:var(--bad) !important;}

/* Image */
/* The plugin's wishlist.css caps this cell at max-width:80px (table layout) — lift it for cards. */
body.tb-wl-body .tb-wl td.product-thumbnail{margin:0 0 14px;width:100% !important;max-width:none !important;min-width:0 !important;}
body.tb-wl-body .tb-wl td.product-thumbnail a{display:block;background:var(--mist);}
body.tb-wl-body .tb-wl td.product-thumbnail img{display:block;width:100% !important;max-width:none !important;height:auto;
  aspect-ratio:1/1;object-fit:contain;margin:0;padding:8px;box-sizing:border-box;}

/* Name */
body.tb-wl-body .tb-wl td.product-name a{color:var(--ink);font-weight:600;font-size:15px;line-height:1.4;text-decoration:none;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:4.2em;}
body.tb-wl-body .tb-wl td.product-name a:hover{color:var(--navy);}

/* Price */
body.tb-wl-body .tb-wl td.product-price{margin-top:10px;font-size:18px;font-weight:700;color:var(--ink);}
body.tb-wl-body .tb-wl td.product-price del{color:var(--muted);font-weight:400;font-size:14px;margin-right:6px;opacity:1;}
body.tb-wl-body .tb-wl td.product-price ins{text-decoration:none;color:var(--ink);}
body.tb-wl-body .tb-wl td.product-price .amount{font-family:inherit;}

/* Stock badge */
body.tb-wl-body .tb-wl td.product-stock-status{margin-top:8px;}
body.tb-wl-body .tb-wl td.product-stock-status span{display:inline-block;font-size:12px;font-weight:600;letter-spacing:.02em;
  padding:3px 9px;border-radius:2px;}
body.tb-wl-body .tb-wl .wishlist-in-stock{background:var(--good-bg);color:var(--good);}
body.tb-wl-body .tb-wl .wishlist-out-of-stock{background:var(--bad-bg);color:var(--bad);}

/* Add to cart / View product — always at the bottom of the card */
body.tb-wl-body .tb-wl td.product-add-to-cart{margin-top:auto;padding-top:16px !important;}
body.tb-wl-body .tb-wl td.product-add-to-cart .tb-btn{width:100%;min-height:46px;padding:11px 16px;font-size:15px;border-radius:0;}
body.tb-wl-body .tb-wl td.product-add-to-cart .tb-btn--navy{background:var(--navy);color:#fff;}
body.tb-wl-body .tb-wl td.product-add-to-cart .tb-btn--navy:hover{background:var(--navy-d);}
body.tb-wl-body .tb-wl td.product-add-to-cart .tb-btn.loading{opacity:.6;pointer-events:none;}

/* Empty state */
body.tb-wl-body .tb-wl .empty-wishlist.hidden{display:none !important;}
body.tb-wl-body .tb-wl .empty-wishlist{text-align:center;border:1px dashed #c9d6e3;background:var(--mist);padding:56px 24px;max-width:760px;margin:0 auto;}
body.tb-wl-body .tb-wl .tb-wl-empty__icon{display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;
  border-radius:50%;background:#fff;border:1px solid var(--line);color:var(--navy);font-size:34px;line-height:1;margin-bottom:16px;}
body.tb-wl-body .tb-wl .tb-wl-empty__title{font-family:"Oswald",sans-serif;font-size:28px;font-weight:600;color:var(--ink);margin:0 0 10px;letter-spacing:.01em;}
body.tb-wl-body .tb-wl .empty-wishlist p{color:var(--body);font-size:16px;line-height:1.6;max-width:520px;margin:0 auto 22px;}
body.tb-wl-body .tb-wl .empty-wishlist .return-to-shop{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:0;}
body.tb-wl-body .tb-wl .empty-wishlist .tb-btn{min-width:200px;}

/* Tablet / mobile */
@media (max-width:767px){
  body.tb-wl-body .tb-wl__wrap{padding-top:24px;padding-bottom:44px;}
  body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table tbody{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  body.tb-wl-body .tb-wl tr.jvm-woocommerce-wishlist-product{padding:12px;}
  body.tb-wl-body .tb-wl td.product-name a{font-size:14px;}
  body.tb-wl-body .tb-wl td.product-price{font-size:16px;}
  body.tb-wl-body .tb-wl td.product-add-to-cart .tb-btn{font-size:14px;padding:10px 8px;min-height:44px;}
  body.tb-wl-body .tb-wl td.product-remove{top:6px;right:6px;}
  body.tb-wl-body .tb-wl .empty-wishlist{padding:40px 18px;}
  body.tb-wl-body .tb-wl .empty-wishlist .tb-btn{width:100%;min-width:0;}
}
@media (max-width:359px){
  body.tb-wl-body .tb-wl table.jvm-woocommerce-wishlist-table tbody{grid-template-columns:1fr;}
}
