/* =====================================================================
   iLoveLatins — WooCommerce shop + single product styling
   Loaded only on shop / product / cart / checkout / account pages.
   Built on the same tokens as assets/css/base.css (see :root there).
   ===================================================================== */

/* ---------- notices (reuses the .form-notice look used on auth forms) ---------- */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-noticegroup{
  list-style:none; padding:13px 16px; border-radius:10px; font-size:0.88rem;
  margin-bottom:24px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.woocommerce-message{ background:rgba(0,173,203,0.1); color:var(--cyan-dark); border:1px solid rgba(0,173,203,0.3); }
.woocommerce-error{ background:rgba(254,18,173,0.1); color:var(--magenta-dark); border:1px solid rgba(254,18,173,0.3); }
.woocommerce-info{ background:var(--paper-2); color:var(--ink); border:1px solid var(--line); }
.woocommerce-error li, .woocommerce-message li, .woocommerce-info li{ list-style:none; }
.woocommerce-message a.button, .woocommerce-error a.button, .woocommerce-info a.button{
  padding:9px 18px; border-radius:100px; font-weight:600; font-size:0.82rem;
  background:var(--ink); color:var(--white); white-space:nowrap;
}

/* ---------- shop toolbar (result count + ordering) ---------- */
.shop-toolbar{ justify-content:space-between; }
.woocommerce-result-count{ font-size:0.88rem; color:rgba(11,31,38,0.6); }
.woocommerce-ordering{ margin-left:auto; }
.filter-bar .woocommerce-ordering select{ margin:0; }

/* ---------- shop grid ---------- */
ul.products{
  display:grid; grid-template-columns:repeat(3,1fr); gap:24px;
  list-style:none; margin:0; padding:0;
}
@media(max-width:900px){ ul.products{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:560px){ ul.products{ grid-template-columns:1fr; } }

li.product-card{
  background:var(--white); border:1px solid var(--line); border-radius:16px;
  overflow:hidden; display:flex; flex-direction:column;
  transition:transform .2s ease, box-shadow .2s ease;
}
li.product-card:hover{ transform:translateY(-4px); box-shadow:0 18px 34px rgba(11,31,38,0.1); }

.product-card-link{ display:block; }
.product-card-media{
  position:relative; aspect-ratio:1/1; background:var(--paper-2);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.product-card-media img{ width:100%; height:100%; object-fit:cover; display:block; }

.product-badge{
  position:absolute; top:12px; left:12px; z-index:2;
  font-family:'IBM Plex Mono', monospace; font-size:0.62rem; letter-spacing:0.08em; text-transform:uppercase;
  padding:5px 10px; border-radius:100px; font-weight:600;
}
.product-badge.sale{ background:var(--magenta); color:var(--white); }
.product-badge.oos{ background:var(--ink); color:var(--paper); }

.product-card-body{ padding:20px 20px 4px; }
.product-card-body .eyebrow{ display:block; margin-bottom:8px; }
.product-card-title{
  font-family:'Fraunces', serif; font-weight:600; font-size:1.05rem; color:var(--ink);
  margin-bottom:8px; line-height:1.3;
}
.product-card-rating{ margin-bottom:4px; }

.product-card-foot{
  margin-top:auto; padding:16px 20px 20px; display:flex; align-items:center;
  justify-content:space-between; gap:12px; border-top:1px solid var(--line);
}
.product-card-foot .price{
  font-family:'Fraunces', serif; font-weight:600; color:var(--ink); font-size:1.02rem;
}
.product-card-foot .price del{ opacity:0.5; font-weight:400; font-size:0.85em; margin-right:6px; }
.product-card-foot .price ins{ text-decoration:none; }

/* add-to-cart button, any product type (simple / variable / external) */
.product-card-foot a.button,
.product-card-foot a.add_to_cart_button{
  padding:9px 18px; border-radius:100px; font-weight:600; font-size:0.85rem;
  border:1.5px solid var(--ink); color:var(--ink); background:none; white-space:nowrap;
  transition:transform .18s ease, background .18s ease, color .18s ease;
}
.product-card-foot a.button:hover{ background:var(--ink); color:var(--white); transform:translateY(-2px); }
.product-card-foot a.button.loading{ opacity:0.6; pointer-events:none; }
.product-card-foot a.added_to_cart{
  display:block; margin-top:8px; font-size:0.78rem; text-align:center; color:var(--cyan-dark); font-weight:600;
}

/* star rating */
.star-rating{
  overflow:hidden; position:relative; height:1em; line-height:1; width:5.4em;
  font-family:sans-serif; font-size:0.85rem;
}
.star-rating::before{ content:"\2605\2605\2605\2605\2605"; color:var(--line); letter-spacing:2px; }
.star-rating span{ overflow:hidden; float:left; top:0; left:0; position:absolute; padding-top:1.5em; }
.star-rating span::before{ content:"\2605\2605\2605\2605\2605"; top:0; position:absolute; left:0; color:var(--magenta); letter-spacing:2px; }

/* empty state */
.shop-empty{ text-align:center; padding:60px 20px; }
.shop-empty .postmark{ margin:0 auto 20px; }
.shop-empty h2{ margin-bottom:10px; }
.shop-empty p{ color:rgba(11,31,38,0.6); margin-bottom:24px; }

/* pagination (matches .wp-pagination elsewhere in the theme) */
nav.woocommerce-pagination{ margin-top:48px; }
nav.woocommerce-pagination ul{ display:flex; gap:8px; justify-content:center; list-style:none; }
nav.woocommerce-pagination ul li{ list-style:none; }
nav.woocommerce-pagination a, nav.woocommerce-pagination span{
  display:inline-block; padding:8px 14px; border-radius:8px; border:1px solid var(--line); font-size:0.85rem;
}
nav.woocommerce-pagination .current{ background:var(--ink); color:var(--white); border-color:var(--ink); }

/* =====================================================================
   Single product page
   ===================================================================== */

.product-hero{ padding:44px 0 0; background:var(--paper); }
.product-hero .woocommerce-breadcrumb{ color:rgba(11,31,38,0.6); }
.product-hero .woocommerce-breadcrumb a{ opacity:0.8; }
.product-hero .woocommerce-breadcrumb a:hover{ opacity:1; color:var(--cyan-dark); }

.single-product-section{ padding-top:36px; }

.single-product-wrap{
  display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:start; margin-bottom:64px;
}
@media(max-width:900px){ .single-product-wrap{ grid-template-columns:1fr; gap:32px; } }

/* --- gallery --- */
.single-product-gallery .woocommerce-product-gallery{ position:relative; }
.single-product-gallery .woocommerce-product-gallery__wrapper{
  border-radius:20px; overflow:hidden; background:var(--paper-2); margin-bottom:14px;
}
.single-product-gallery .woocommerce-product-gallery__image img{
  width:100%; height:auto; display:block; aspect-ratio:1/1; object-fit:cover;
}
.single-product-gallery .flex-control-thumbs{
  display:flex; gap:10px; list-style:none; margin:0; padding:0; flex-wrap:wrap;
}
.single-product-gallery .flex-control-thumbs li{ list-style:none; width:74px; }
.single-product-gallery .flex-control-thumbs img{
  border-radius:10px; border:2px solid transparent; cursor:pointer; opacity:0.7;
  transition:opacity .18s ease, border-color .18s ease; aspect-ratio:1/1; object-fit:cover;
}
.single-product-gallery .flex-control-thumbs img.flex-active,
.single-product-gallery .flex-control-thumbs img:hover{ opacity:1; border-color:var(--magenta); }
.single-product-gallery span.onsale{
  position:absolute; top:16px; left:16px; z-index:3;
  background:var(--magenta); color:var(--white); font-family:'IBM Plex Mono',monospace;
  font-size:0.62rem; letter-spacing:0.08em; text-transform:uppercase; padding:6px 12px; border-radius:100px; font-weight:600;
}

/* --- summary --- */
.single-product-summary .product_title{
  font-family:'Fraunces', serif; font-size:clamp(1.7rem,3vw,2.3rem); font-weight:600; margin-bottom:12px; color:var(--ink);
}
.single-product-summary .woocommerce-product-rating{
  display:flex; align-items:center; gap:10px; margin-bottom:18px;
}
.single-product-summary .woocommerce-review-link{ font-size:0.85rem; color:rgba(11,31,38,0.6); }
.single-product-summary .price{
  font-family:'Fraunces', serif; font-size:1.7rem; font-weight:600; color:var(--ink); display:block; margin-bottom:22px;
}
.single-product-summary .price del{ font-size:0.65em; opacity:0.5; font-weight:400; margin-right:8px; }
.single-product-summary .price ins{ text-decoration:none; }
.single-product-summary .woocommerce-product-details__short-description{
  font-size:0.98rem; color:rgba(11,31,38,0.72); margin-bottom:28px; max-width:480px;
}
.single-product-summary .woocommerce-product-details__short-description p{ margin-bottom:1em; }

.single-product-summary .stock{
  display:inline-block; font-size:0.82rem; font-weight:600; padding:6px 14px; border-radius:100px; margin-bottom:20px;
}
.single-product-summary .stock.in-stock{ background:rgba(0,173,203,0.1); color:var(--cyan-dark); }
.single-product-summary .stock.out-of-stock{ background:rgba(254,18,173,0.1); color:var(--magenta-dark); }

/* add to cart form */
.single-product-summary form.cart{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:28px;
}
.single-product-summary .quantity{ display:flex; }
.single-product-summary .quantity .qty{
  width:76px; padding:13px 14px; border-radius:100px 0 0 100px; border:1px solid var(--line); border-right:none;
  font-family:'Work Sans',sans-serif; font-size:0.95rem; background:var(--white); text-align:center;
}
.single-product-summary .single_add_to_cart_button{
  padding:14px 32px; border-radius:100px; font-weight:600; font-size:0.92rem; border:none; cursor:pointer;
  background:var(--magenta); color:var(--white); box-shadow:0 6px 18px rgba(254,18,173,0.35);
  transition:transform .18s ease, box-shadow .18s ease;
}
.single-product-summary .single_add_to_cart_button:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(254,18,173,0.45); }
.single-product-summary .single_add_to_cart_button.disabled{ opacity:0.5; cursor:not-allowed; transform:none; }

/* variations table */
.single-product-summary table.variations{ width:100%; margin-bottom:20px; }
.single-product-summary table.variations tr{ display:block; margin-bottom:14px; }
.single-product-summary table.variations label{ display:block; font-size:0.82rem; font-weight:600; margin-bottom:6px; }
.single-product-summary table.variations select{
  width:100%; max-width:320px; padding:12px 16px; border-radius:10px; border:1px solid var(--line);
  font-family:'Work Sans',sans-serif; font-size:0.9rem; background:var(--white);
}
.single-product-summary .woocommerce-variation-price .price{ font-size:1.3rem; margin-bottom:8px; }
.single-product-summary .reset_variations{ font-size:0.8rem; color:var(--magenta-dark); margin-left:10px; }

/* meta (SKU / categories / tags) */
.single-product-summary .product_meta{
  font-size:0.85rem; color:rgba(11,31,38,0.55); border-top:1px solid var(--line); padding-top:18px; display:flex;
  flex-direction:column; gap:6px;
}
.single-product-summary .product_meta a{ color:var(--cyan-dark); }
.single-product-summary .product_meta a:hover{ text-decoration:underline; }

/* sharing (if a plugin hooks it in) */
.single-product-summary .product_meta + *{ margin-top:14px; }

/* --- tabs (description / additional info / reviews) --- */
.single-product-extra{ margin-bottom:80px; }
.woocommerce-tabs ul.tabs{
  display:flex; gap:8px; list-style:none; margin:0 0 32px; padding:0; border-bottom:1px solid var(--line); flex-wrap:wrap;
}
.woocommerce-tabs ul.tabs li{ list-style:none; }
.woocommerce-tabs ul.tabs li a{
  display:inline-block; padding:14px 4px; margin-right:24px; font-weight:600; font-size:0.95rem;
  color:rgba(11,31,38,0.5); border-bottom:2px solid transparent; margin-bottom:-1px;
}
.woocommerce-tabs ul.tabs li.active a{ color:var(--ink); border-bottom-color:var(--magenta); }
.woocommerce-tabs .woocommerce-Tabs-panel{ max-width:760px; }
.woocommerce-tabs .woocommerce-Tabs-panel h2{ font-size:1.4rem; margin-bottom:16px; }
.woocommerce-tabs .woocommerce-Tabs-panel p{ margin-bottom:1em; color:rgba(11,31,38,0.72); }
.woocommerce-tabs table.shop_attributes{ width:100%; border-collapse:collapse; margin-top:10px; }
.woocommerce-tabs table.shop_attributes tr{ border-bottom:1px solid var(--line); }
.woocommerce-tabs table.shop_attributes th, .woocommerce-tabs table.shop_attributes td{ padding:12px 0; text-align:left; font-size:0.9rem; }
.woocommerce-tabs table.shop_attributes th{ width:180px; font-weight:600; color:var(--ink); }

/* reviews */
#reviews .comment-form-rating label{ font-size:0.85rem; font-weight:600; }
#reviews #commentform input, #reviews #commentform textarea{
  width:100%; padding:13px 16px; border-radius:10px; border:1px solid var(--line);
  font-family:'Work Sans',sans-serif; font-size:0.92rem; background:var(--white); margin-bottom:14px;
}
#reviews #commentform textarea{ min-height:120px; resize:vertical; }
#reviews #commentform #submit{
  padding:12px 26px; border-radius:100px; font-weight:600; font-size:0.88rem; border:none; cursor:pointer;
  background:var(--ink); color:var(--white);
}
#reviews .commentlist{ list-style:none; margin:0 0 28px; padding:0; }
#reviews .comment{ border-bottom:1px solid var(--line); padding:20px 0; }
#reviews .comment .star-rating{ margin-bottom:8px; }

/* --- related / upsell products (reuse the shop grid) --- */
.related.products, .upsells.products{ margin-top:20px; }
.related.products > h2, .upsells.products > h2{ font-size:clamp(1.6rem,3vw,2.2rem); font-family:'Fraunces',serif; margin-bottom:32px; }

@media(max-width:640px){
  .single-product-summary form.cart{ flex-direction:column; align-items:stretch; }
  .single-product-summary .single_add_to_cart_button{ width:100%; text-align:center; }
  .single-product-summary .quantity{ align-self:flex-start; }
}

/* =====================================================================
   Cart / Checkout / My Account
   (rendered via the generic page.php template + WooCommerce shortcodes)
   ===================================================================== */

/* --- cart table --- */
table.shop_table{ width:100%; border-collapse:collapse; margin-bottom:32px; }
table.shop_table th{
  text-align:left; font-size:0.78rem; letter-spacing:0.04em; text-transform:uppercase;
  color:rgba(11,31,38,0.5); padding:0 12px 14px; border-bottom:1px solid var(--line);
}
table.shop_table td{ padding:18px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
table.shop_table td.product-name a{ font-weight:600; color:var(--ink); }
table.shop_table td.product-name a:hover{ color:var(--cyan-dark); }
table.shop_table .product-thumbnail img{ width:64px; height:64px; object-fit:cover; border-radius:10px; }
table.shop_table .product-remove a{
  display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px;
  border-radius:50%; background:var(--paper-2); color:var(--magenta-dark); font-weight:700; text-align:center; line-height:1;
}
table.shop_table .product-remove a:hover{ background:var(--magenta); color:var(--white); }
table.shop_table .quantity .qty{
  width:64px; padding:9px 10px; border-radius:100px; border:1px solid var(--line); text-align:center;
  font-family:'Work Sans',sans-serif; font-size:0.9rem;
}
table.shop_table td.product-subtotal, table.shop_table td.product-price{ font-weight:600; color:var(--ink); }

@media(max-width:700px){
  table.shop_table thead{ display:none; }
  table.shop_table, table.shop_table tbody, table.shop_table tr, table.shop_table td{ display:block; width:100%; }
  table.shop_table tr{ padding:16px 0; border-bottom:1px solid var(--line); }
  table.shop_table td{ border-bottom:none; padding:6px 0; display:flex; justify-content:space-between; align-items:center; }
  table.shop_table td.product-thumbnail{ justify-content:flex-start; gap:12px; }
  table.shop_table td::before{ content: attr(data-title); font-size:0.75rem; font-weight:600; color:rgba(11,31,38,0.5); }
  table.shop_table td.product-thumbnail::before{ content:none; }
}

/* coupon + cart update row */
.cart_totals, .cart-collaterals{ max-width:420px; margin-left:auto; }
.woocommerce-cart-form .coupon{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:24px; }
.woocommerce-cart-form .coupon input#coupon_code{
  flex:1; min-width:160px; padding:12px 16px; border-radius:100px; border:1px solid var(--line);
  font-family:'Work Sans',sans-serif; font-size:0.9rem;
}
.woocommerce-cart-form button[name="apply_coupon"],
.woocommerce-cart-form button[name="update_cart"],
.checkout-button, .wc-proceed-to-checkout .button{
  padding:12px 26px; border-radius:100px; font-weight:600; font-size:0.88rem; border:none; cursor:pointer;
  background:var(--ink); color:var(--white); display:inline-block; text-align:center;
}
.wc-proceed-to-checkout .checkout-button{
  width:100%; margin-top:16px; background:var(--magenta); box-shadow:0 6px 18px rgba(254,18,173,0.35);
}

/* cart totals table */
.cart_totals table.shop_table th, .cart_totals table.shop_table td{ padding:12px 0; }
.cart_totals .order-total .amount{ font-family:'Fraunces',serif; font-size:1.25rem; font-weight:600; }

.woocommerce-shipping-calculator .shipping-calculator-button{ color:var(--cyan-dark); font-size:0.85rem; }

/* --- checkout form --- */
.woocommerce-billing-fields h3, .woocommerce-additional-fields h3, #order_review_heading{
  font-size:1.3rem; margin:36px 0 20px;
}
.woocommerce-checkout .form-row{ margin-bottom:16px; }
.woocommerce-checkout label{ display:block; font-size:0.82rem; font-weight:600; margin-bottom:6px; }
.woocommerce-checkout .required{ color:var(--magenta-dark); }
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.select2-container .select2-selection--single{
  width:100%; padding:13px 16px; border-radius:10px; border:1px solid var(--line);
  font-family:'Work Sans',sans-serif; font-size:0.92rem; background:var(--white); height:auto;
}
.woocommerce-checkout textarea{ min-height:110px; resize:vertical; }
#order_review{ background:var(--white); border:1px solid var(--line); border-radius:16px; padding:24px; }
.woocommerce-checkout-payment ul.payment_methods{ list-style:none; padding:0; margin-bottom:20px; }
.woocommerce-checkout-payment .payment_box{
  background:var(--paper-2); border-radius:12px; padding:16px; margin:10px 0 20px; font-size:0.88rem;
}
#place_order{
  width:100%; padding:15px 26px; border-radius:100px; font-weight:600; font-size:0.95rem; border:none; cursor:pointer;
  background:var(--magenta); color:var(--white); box-shadow:0 6px 18px rgba(254,18,173,0.35);
}

/* --- my account --- */
.woocommerce-MyAccount-navigation ul{ list-style:none; display:flex; flex-wrap:wrap; gap:8px; margin-bottom:32px; padding:0; }
.woocommerce-MyAccount-navigation li{ list-style:none; }
.woocommerce-MyAccount-navigation a{
  display:inline-block; padding:9px 18px; border-radius:100px; font-size:0.85rem; font-weight:600;
  background:var(--paper-2); color:var(--ink);
}
.woocommerce-MyAccount-navigation li.is-active a{ background:var(--ink); color:var(--white); }
.woocommerce-MyAccount-content .woocommerce-Button{
  padding:11px 22px; border-radius:100px; font-weight:600; font-size:0.88rem; border:none; cursor:pointer;
  background:var(--ink); color:var(--white); display:inline-block;
}
.woocommerce-MyAccount-content form .form-row{ margin-bottom:16px; }
.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content select{
  width:100%; padding:13px 16px; border-radius:10px; border:1px solid var(--line);
  font-family:'Work Sans',sans-serif; font-size:0.92rem;
}
.woocommerce-orders-table__cell-order-status{ font-weight:600; }

