/*
 * Jithr — WooCommerce storefront styling.
 * Targets WooCommerce's REAL output classes (block + classic) and maps them to
 * the Rasin design using theme.json tokens. Loaded only when WooCommerce is
 * active. Covers: shop archive, single product, cart, checkout, my-account,
 * notices, badges, breadcrumbs, ordering, pagination.
 */

/* ---- shared button look (block + classic) ---- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .wc-block-components-button,
.wc-block-components-button:not(.is-link){
	background:var(--wp--preset--color--accent);
	color:var(--wp--preset--color--accent-contrast);
	border:none;border-radius:var(--wp--custom--radius--medium);
	font-weight:600;padding:.8rem 1.5rem;line-height:1.2;
	box-shadow:var(--wp--preset--shadow--small);
	transition:background-color .2s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button:hover,
.woocommerce .wc-block-components-button:hover,
.wc-block-components-button:not(.is-link):hover{
	background:var(--wp--preset--color--accent-strong);
}
.woocommerce a.button.wc-backward,
.woocommerce .button.wc-backward{
	background:var(--wp--preset--color--surface);color:var(--wp--preset--color--ink);
	border:1px solid var(--wp--preset--color--line);box-shadow:none;
}

/* ---- store notices ---- */
.woocommerce-message,.woocommerce-info,.woocommerce-error,
.wc-block-components-notice-banner{
	border-radius:var(--wp--custom--radius--medium);
	border:1px solid var(--wp--preset--color--line);
	border-inline-start-width:3px;
	background:var(--wp--preset--color--surface);
	color:var(--wp--preset--color--ink);
	box-shadow:var(--wp--preset--shadow--small);
}
.woocommerce-message{border-inline-start-color:var(--wp--preset--color--success);}
.woocommerce-info{border-inline-start-color:var(--wp--preset--color--accent);}
.woocommerce-error{border-inline-start-color:var(--wp--preset--color--danger);}

/* ---- breadcrumb / result count / ordering ---- */
.woocommerce .woocommerce-breadcrumb{
	font-size:var(--wp--preset--font-size--small);color:var(--wp--preset--color--muted);
	margin-bottom:var(--wp--preset--spacing--60);
}
.woocommerce .woocommerce-breadcrumb a{color:var(--wp--custom--accent-text);}
.woocommerce .woocommerce-result-count{color:var(--wp--preset--color--muted);font-size:var(--wp--preset--font-size--small);}
.woocommerce .woocommerce-ordering select,
.wc-block-product-sort-select select{
	border:1px solid var(--wp--preset--color--line);border-radius:999px;
	padding:.5rem 1rem;background:var(--wp--preset--color--surface);color:var(--wp--preset--color--ink);
}

/* ---- onsale badge → design product-badge ---- */
.woocommerce span.onsale,
.wc-block-components-product-sale-badge{
	background:var(--wp--preset--color--ink);color:var(--wp--preset--color--base);
	border-radius:var(--wp--custom--radius--small);
	font-size:.6875rem;font-weight:600;padding:4px 9px;min-height:0;min-width:0;line-height:1.4;
}

/* ============================================================
   SHOP ARCHIVE — product grid as the design card
   (classic `.products li.product` + block product template)
   ============================================================ */
.woocommerce ul.products{display:grid;grid-template-columns:repeat(4,1fr);gap:1.25rem;margin:0;padding:0;}
.woocommerce ul.products li.product{
	width:auto !important;margin:0 !important;float:none !important;
	background:var(--wp--preset--color--surface);
	border:1px solid var(--wp--preset--color--line);
	border-radius:var(--wp--custom--radius--large);overflow:hidden;
	box-shadow:var(--wp--preset--shadow--small);
	transition:box-shadow .2s ease,border-color .2s ease;position:relative;
}
.woocommerce ul.products li.product:hover{box-shadow:var(--wp--preset--shadow--medium);border-color:var(--wp--custom--accent-line);}
.woocommerce ul.products li.product a img{margin:0;border-radius:0;border-bottom:1px solid var(--wp--preset--color--line);}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
	font-size:.9375rem;font-weight:600;color:var(--wp--preset--color--ink);padding:var(--wp--preset--spacing--50) var(--wp--preset--spacing--50) 0;
}
.woocommerce ul.products li.product .price{
	display:block;padding:0 var(--wp--preset--spacing--50);
	color:var(--wp--preset--color--ink);font-weight:700;font-size:1.125rem;
}
.woocommerce ul.products li.product .price del{color:var(--wp--preset--color--muted);font-weight:400;font-size:.8125rem;}
.woocommerce ul.products li.product .star-rating{margin:.4rem var(--wp--preset--spacing--50);color:var(--wp--preset--color--warning);font-size:.8rem;}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart{
	margin:var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
}
.woocommerce ul.products li.product span.onsale{position:absolute;top:12px;inset-inline-start:12px;}

/* block-template product grid (Products / Product Collection) */
.wc-block-grid__products,
.wp-block-woocommerce-product-template{display:grid;grid-template-columns:repeat(4,1fr);gap:1.25rem;list-style:none;margin:0;padding:0;}
.wc-block-grid__product,
.wp-block-woocommerce-product-template li.product,
.wc-block-product{
	background:var(--wp--preset--color--surface);border:1px solid var(--wp--preset--color--line);
	border-radius:var(--wp--custom--radius--large);overflow:hidden;padding:0 0 var(--wp--preset--spacing--50);
	box-shadow:var(--wp--preset--shadow--small);
}

/* ============================================================
   SINGLE PRODUCT
   ============================================================ */
.woocommerce div.product{display:grid;grid-template-columns:1fr 1fr;gap:var(--wp--preset--spacing--80);align-items:start;}
.woocommerce div.product .woocommerce-product-gallery{margin:0;}
.woocommerce div.product .woocommerce-product-gallery__image img{border-radius:var(--wp--custom--radius--large);border:1px solid var(--wp--preset--color--line);}
.woocommerce div.product .product_title{font-size:2rem;font-weight:700;color:var(--wp--preset--color--ink);margin:0 0 .5rem;}
.woocommerce div.product p.price,.woocommerce div.product span.price{color:var(--wp--preset--color--ink);font-weight:700;font-size:1.5rem;}
.woocommerce div.product p.price del{color:var(--wp--preset--color--muted);font-weight:400;font-size:1rem;}
.woocommerce div.product .woocommerce-product-rating{margin-bottom:1rem;}
.woocommerce div.product .star-rating{color:var(--wp--preset--color--warning);}
.woocommerce div.product form.cart{margin:var(--wp--preset--spacing--60) 0;display:flex;gap:var(--wp--preset--spacing--40);align-items:center;flex-wrap:wrap;}
.woocommerce div.product form.cart .quantity .qty{
	width:72px;text-align:center;border:1px solid var(--wp--preset--color--line);
	border-radius:var(--wp--custom--radius--medium);padding:.7rem .5rem;
}
.woocommerce div.product .single_add_to_cart_button{padding:.9rem 2rem;font-size:var(--wp--preset--font-size--medium);}
.woocommerce div.product .product_meta{font-size:var(--wp--preset--font-size--small);color:var(--wp--preset--color--muted);border-top:1px solid var(--wp--preset--color--line);padding-top:var(--wp--preset--spacing--50);margin-top:var(--wp--preset--spacing--50);}

/* tabs */
.woocommerce div.product .woocommerce-tabs{grid-column:1/-1;margin-top:var(--wp--preset--spacing--80);}
.woocommerce div.product .woocommerce-tabs ul.tabs{padding:0;margin:0 0 var(--wp--preset--spacing--60);border-bottom:1px solid var(--wp--preset--color--line);display:flex;gap:var(--wp--preset--spacing--40);}
.woocommerce div.product .woocommerce-tabs ul.tabs::before{display:none;}
.woocommerce div.product .woocommerce-tabs ul.tabs li{background:none;border:none;border-radius:0;margin:0;padding:0;}
.woocommerce div.product .woocommerce-tabs ul.tabs li a{
	padding:.7rem 1rem;color:var(--wp--preset--color--muted);font-weight:600;font-size:var(--wp--preset--font-size--small);
	border-bottom:2px solid transparent;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:var(--wp--preset--color--ink);border-bottom-color:var(--wp--preset--color--accent);}
.woocommerce div.product .related.products{grid-column:1/-1;margin-top:var(--wp--preset--spacing--90);border-top:1px solid var(--wp--preset--color--line);padding-top:var(--wp--preset--spacing--80);}
@media(max-width:1024px){.woocommerce div.product{grid-template-columns:1fr;gap:var(--wp--preset--spacing--60);}}

/* ============================================================
   CART (classic table + block)
   ============================================================ */
.woocommerce table.shop_table{
	border:1px solid var(--wp--preset--color--line);border-radius:var(--wp--custom--radius--large);
	border-collapse:separate;border-spacing:0;overflow:hidden;background:var(--wp--preset--color--surface);
}
.woocommerce table.shop_table th{background:var(--wp--preset--color--surface-alt);color:var(--wp--preset--color--ink);font-weight:600;padding:1rem;}
.woocommerce table.shop_table td{padding:1rem;border-top:1px solid var(--wp--preset--color--line);}
.woocommerce .cart_totals,.wc-block-components-totals-wrapper{
	border:1px solid var(--wp--preset--color--line);border-radius:var(--wp--custom--radius--large);
	padding:var(--wp--preset--spacing--60);background:var(--wp--preset--color--surface);box-shadow:var(--wp--preset--shadow--small);
}
.woocommerce .cart input.qty{border:1px solid var(--wp--preset--color--line);border-radius:var(--wp--custom--radius--medium);padding:.5rem;}
.wc-block-cart-items__row{border-color:var(--wp--preset--color--line);}

/* ============================================================
   CHECKOUT (classic + block)
   ============================================================ */
.woocommerce-checkout #customer_details,
.woocommerce form.checkout_coupon,
.woocommerce-checkout #order_review,
.wc-block-checkout__sidebar,
.wc-block-components-checkout-step{
	background:var(--wp--preset--color--surface);
	border:1px solid var(--wp--preset--color--line);
	border-radius:var(--wp--custom--radius--large);
	padding:var(--wp--preset--spacing--60);box-shadow:var(--wp--preset--shadow--small);
}
.woocommerce-checkout #payment{background:var(--wp--preset--color--surface-alt);border-radius:var(--wp--custom--radius--large);}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single{
	border:1px solid var(--wp--preset--color--line);border-radius:var(--wp--custom--radius--medium);padding:.7rem 1rem;
}
.woocommerce form .form-row label{font-size:var(--wp--preset--font-size--small);color:var(--wp--preset--color--text);font-weight:500;}

/* ============================================================
   MY ACCOUNT
   ============================================================ */
.woocommerce-account .woocommerce{display:grid;grid-template-columns:240px 1fr;gap:var(--wp--preset--spacing--70);align-items:start;}
.woocommerce-MyAccount-navigation{
	background:var(--wp--preset--color--surface);border:1px solid var(--wp--preset--color--line);
	border-radius:var(--wp--custom--radius--large);padding:var(--wp--preset--spacing--40);box-shadow:var(--wp--preset--shadow--small);
}
.woocommerce-MyAccount-navigation ul{list-style:none;margin:0;padding:0;}
.woocommerce-MyAccount-navigation ul li{margin:0;}
.woocommerce-MyAccount-navigation ul li a{
	display:block;padding:.7rem 1rem;border-radius:var(--wp--custom--radius--medium);
	color:var(--wp--preset--color--text);font-size:var(--wp--preset--font-size--small);font-weight:500;
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover{background:var(--wp--custom--accent-soft);color:var(--wp--custom--accent-text);}
.woocommerce-MyAccount-content{
	background:var(--wp--preset--color--surface);border:1px solid var(--wp--preset--color--line);
	border-radius:var(--wp--custom--radius--large);padding:var(--wp--preset--spacing--70);box-shadow:var(--wp--preset--shadow--small);
}
@media(max-width:780px){.woocommerce-account .woocommerce{grid-template-columns:1fr;}}

/* ---- pagination ---- */
.woocommerce nav.woocommerce-pagination ul{border:none;display:flex;gap:6px;justify-content:center;}
.woocommerce nav.woocommerce-pagination ul li{border:none;}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{
	border:1px solid var(--wp--preset--color--line);border-radius:var(--wp--custom--radius--medium);
	min-width:40px;height:40px;display:flex;align-items:center;justify-content:center;color:var(--wp--preset--color--ink);
}
.woocommerce nav.woocommerce-pagination ul li span.current{background:var(--wp--preset--color--accent);color:var(--wp--preset--color--accent-contrast);border-color:var(--wp--preset--color--accent);}

/* ============================================================
   SINGLE PRODUCT — brand eyebrow, savings badge, stock
   ============================================================ */
.jithr-pdp-brand{font-family:var(--wp--preset--font-family--mono);font-size:.75rem;letter-spacing:.1em;color:var(--wp--custom--accent-text);margin-bottom:6px;}
.jithr-save-badge{display:inline-block;background:color-mix(in oklab,var(--wp--preset--color--success) 14%,var(--wp--preset--color--surface));color:var(--wp--preset--color--success);font-weight:700;font-size:.75rem;padding:4px 10px;border-radius:var(--wp--custom--radius--small);}
.woocommerce div.product .stock{color:var(--wp--preset--color--success);font-weight:600;font-size:var(--wp--preset--font-size--small);}
.woocommerce div.product p.price del{margin-inline-start:8px;}

/* ============================================================
   MY ACCOUNT — dashboard (cards + orders table) + sidebar identity
   ============================================================ */
.jithr-acc-head{margin-bottom:var(--wp--preset--spacing--60);}
.jithr-acc-title{font-size:1.5rem;font-weight:700;color:var(--wp--preset--color--ink);margin:0 0 6px;}
.jithr-acc-sub{color:var(--wp--preset--color--muted);font-size:var(--wp--preset--font-size--small);margin:0;}
.jithr-acc-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--70);}
.jithr-acc-stat{border:1px solid var(--wp--preset--color--line);border-radius:var(--wp--custom--radius--large);padding:var(--wp--preset--spacing--60);text-align:center;background:var(--wp--preset--color--surface);}
.jithr-acc-stat .n{font-size:1.875rem;font-weight:700;color:var(--wp--preset--color--ink);line-height:1;margin-bottom:6px;}
.jithr-acc-stat .l{font-size:.8125rem;color:var(--wp--preset--color--muted);}
.jithr-acc-h{font-size:var(--wp--preset--font-size--large);font-weight:700;color:var(--wp--preset--color--ink);margin:0 0 var(--wp--preset--spacing--50);}
.jithr-acc-orders{width:100%;border-collapse:collapse;font-size:var(--wp--preset--font-size--small);}
.jithr-acc-orders th{text-align:start;color:var(--wp--preset--color--muted);font-weight:500;padding:0 12px 12px;border-bottom:1px solid var(--wp--preset--color--line);}
.jithr-acc-orders td{padding:14px 12px;border-bottom:1px solid var(--wp--preset--color--line);color:var(--wp--preset--color--ink);}
.jithr-acc-orders a{color:var(--wp--custom--accent-text);font-weight:600;}
.jithr-status{display:inline-block;padding:3px 10px;border-radius:999px;font-size:.6875rem;font-weight:600;}
.jithr-status--processing,.jithr-status--on-hold{background:color-mix(in oklab,var(--wp--preset--color--accent) 14%,var(--wp--preset--color--surface));color:var(--wp--custom--accent-text);}
.jithr-status--completed{background:color-mix(in oklab,var(--wp--preset--color--success) 16%,var(--wp--preset--color--surface));color:var(--wp--preset--color--success);}
.jithr-status--pending,.jithr-status--failed,.jithr-status--cancelled,.jithr-status--refunded{background:color-mix(in oklab,var(--wp--preset--color--warning) 16%,var(--wp--preset--color--surface));color:var(--wp--preset--color--warning);}
.jithr-acc-empty{color:var(--wp--preset--color--muted);}
.jithr-acc-empty a{color:var(--wp--custom--accent-text);font-weight:600;}
.jithr-account-id{display:flex;align-items:center;gap:12px;padding:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40);border-bottom:1px solid var(--wp--preset--color--line);}
.jithr-account-avatar{width:44px;height:44px;flex-shrink:0;border-radius:999px;background:var(--wp--custom--accent-soft);color:var(--wp--custom--accent-text);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--wp--preset--font-size--large);}
.jithr-account-name{font-weight:600;color:var(--wp--preset--color--ink);font-size:var(--wp--preset--font-size--small);}
.jithr-account-email{font-size:.6875rem;color:var(--wp--preset--color--muted);}
