/* FOURDOTS: WooCommerce styling (shop, product, cart, checkout, account). */

/* ---------- Notices ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
	list-style: none; margin: 0 0 24px; padding: 14px 18px; background: var(--fd-card); border: 1px solid var(--fd-border); border-left: 4px solid var(--fd-yellow); border-radius: var(--fd-radius); color: var(--fd-text);
}
.woocommerce-message { border-left-color: var(--fd-ok); }
.woocommerce-error { border-left-color: var(--fd-err); }
.woocommerce-message .button, .woocommerce-info .button { float: right; margin-left: 12px; min-height: 36px; padding: 6px 16px; }
.woocommerce-error li { margin: 0; }

/* ---------- Breadcrumb, headings, toolbar ---------- */
.woocommerce-breadcrumb { font-size: .85rem; color: var(--fd-muted); margin-bottom: 24px; }
.woocommerce-breadcrumb a { text-decoration: none; }
.woocommerce-products-header, .fd-archive-head { margin-bottom: 24px; }
.woocommerce-products-header__title, .page-title { font: 900 clamp(2rem, 5vw, 3.6rem)/.98 var(--fd-font-display); text-transform: uppercase; letter-spacing: -.025em; margin: 0 0 .4em; }
.term-description, .fd-archive-desc { max-width: 60ch; color: var(--fd-muted); }
.fd-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 24px; padding: 12px 0; border-block: 1px solid var(--fd-border); }
.fd-toolbar .woocommerce-result-count { margin: 0 auto 0 0; color: var(--fd-muted); font-size: .9rem; }
.fd-toolbar .woocommerce-ordering { margin: 0; }
.fd-toolbar .woocommerce-ordering select { min-height: 40px; padding: 6px 12px; width: auto; }
.fd-empty { margin-top: 16px; }

/* ---------- Product grid + cards ---------- */
ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--fd-gap) * 1.2) var(--fd-gap); }
ul.products li.product { position: relative; margin: 0; padding: 0; min-width: 0; }
ul.products li.product a { text-decoration: none; }
ul.products li.product a.woocommerce-LoopProduct-link { display: block; }
ul.products li.product img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--fd-card); border-radius: var(--fd-radius); margin: 0 0 14px; transition: opacity .2s; }
ul.products li.product:hover img { opacity: .88; }
.woocommerce-loop-product__title { font: 700 1rem/1.3 var(--fd-font); margin: 0 0 6px; }
ul.products li.product .price { display: block; font-weight: 800; color: var(--fd-text); margin-bottom: 12px; }
.price del { color: var(--fd-muted); font-weight: 400; margin-right: 6px; }
.price ins { text-decoration: none; color: var(--fd-yellow); }
ul.products li.product .button { width: 100%; min-height: 44px; padding: 10px 14px; font-size: .78rem; }
ul.products li.product .added_to_cart { display: block; margin-top: 8px; font-size: .85rem; text-align: center; }
.star-rating { color: var(--fd-yellow); letter-spacing: 2px; font-size: .85rem; }
.fd-badge, .onsale { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 5px 10px; font: 800 .7rem/1 var(--fd-font); letter-spacing: .08em; text-transform: uppercase; border-radius: 2px; }
.fd-badge--sale, .onsale { background: var(--fd-yellow); color: #000; }
.fd-badge--new { background: #fff; color: #000; }
.fd-badge--out { background: #333; color: #fff; }
.single-product .fd-badge, .single-product .onsale { top: 14px; left: 14px; }
.woocommerce-pagination { margin-top: 40px; }
.woocommerce-pagination ul { list-style: none; display: flex; gap: 8px; padding: 0; flex-wrap: wrap; }
.woocommerce-pagination li { margin: 0; }
.woocommerce-pagination .page-numbers { }

/* ---------- Single product ---------- */
.single-product div.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.single-product div.product > .woocommerce-product-gallery { position: relative; grid-column: 1; }
.single-product div.product > .summary { grid-column: 2; }
.single-product div.product > :not(.woocommerce-product-gallery):not(.summary) { grid-column: 1 / -1; }
.woocommerce-product-gallery { margin: 0; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image img { width: 100%; border-radius: var(--fd-radius); background: var(--fd-card); }
.woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 5; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--fd-bg); border-radius: 50%; text-decoration: none; font-size: 0; }
.woocommerce-product-gallery__trigger::before { content: "⤢"; font-size: 1.2rem; color: var(--fd-text); }
.flex-control-thumbs { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0 0; padding: 0; }
.flex-control-thumbs img { cursor: pointer; opacity: .55; border-radius: 3px; aspect-ratio: 1; object-fit: cover; }
.flex-control-thumbs img.flex-active, .flex-control-thumbs img:hover { opacity: 1; outline: 2px solid var(--fd-yellow); }
.product_title { font: 900 clamp(1.8rem, 3.6vw, 2.8rem)/1 var(--fd-font-display); text-transform: uppercase; letter-spacing: -.02em; margin: 0 0 .4em; }
.summary .price { font-size: 1.6rem; font-weight: 800; margin-bottom: 1em; display: block; }
.woocommerce-product-details__short-description { color: #d4d4d4; margin-bottom: 1.2em; }
.stock.out-of-stock { color: var(--fd-err); font-weight: 700; }
.stock.in-stock { color: var(--fd-ok); font-weight: 700; }
.fd-sizechart-btn { background: none; border: 0; color: var(--fd-text); cursor: pointer; padding: 0; margin: 0 0 12px; font-size: .9rem; }
.summary form.cart { margin: 0 0 24px; }
.variations { width: 100%; border: 0; margin: 0 0 16px; border-collapse: collapse; }
.variations th, .variations td { display: block; padding: 0; border: 0; text-align: left; background: none; }
.variations th.label { margin: 14px 0 8px; font: 800 .8rem/1 var(--fd-font); letter-spacing: .08em; text-transform: uppercase; }
.variations select.fd-hidden-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.reset_variations { display: inline-block; margin-top: 10px; font-size: .85rem; color: var(--fd-muted); }
.fd-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-swatch { min-width: 48px; height: 44px; padding: 0 14px; background: transparent; color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); font: 700 .9rem var(--fd-font); cursor: pointer; }
.fd-swatch:hover { border-color: var(--fd-text); }
.fd-swatch[aria-checked="true"] { background: var(--fd-yellow); color: #000; border-color: var(--fd-yellow); }
.fd-swatch:disabled { opacity: .3; text-decoration: line-through; cursor: not-allowed; }
.fd-swatch--color { width: 44px; min-width: 44px; padding: 0; border-radius: 50%; background: var(--sw, transparent); border: 2px solid var(--fd-border); }
.fd-swatch--color[aria-checked="true"] { background: var(--sw); outline: 3px solid var(--fd-yellow); outline-offset: 2px; border-color: var(--fd-bg); }
.woocommerce-variation-price .price { font-size: 1.3rem; margin: 8px 0; }
.woocommerce-variation-availability { margin-bottom: 8px; }
.single_variation_wrap, form.cart:not(.variations_form) { }
.woocommerce-variation-add-to-cart, form.cart:not(.variations_form) { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.quantity { display: inline-block; }
.quantity input.qty { width: 84px; text-align: center; min-height: 48px; }
.single_add_to_cart_button { flex: 1 1 180px; }
.fd-buynow { flex: 1 1 100%; }
.fd-info { border-top: 1px solid var(--fd-border); margin-top: 8px; }
.fd-info details { border-bottom: 1px solid var(--fd-border); }
.fd-info summary { cursor: pointer; padding: 16px 0; font: 800 .85rem/1 var(--fd-font); letter-spacing: .08em; text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; }
.fd-info summary::-webkit-details-marker { display: none; }
.fd-info summary::after { content: "+"; font-size: 1.3rem; line-height: .8; color: var(--fd-yellow); }
.fd-info details[open] summary::after { content: "–"; }
.fd-info details > div { padding: 0 0 16px; color: #d4d4d4; }
.product_meta { font-size: .85rem; color: var(--fd-muted); margin-top: 16px; display: grid; gap: 4px; }
.fd-share { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 20px; font-size: .85rem; color: var(--fd-muted); }
.fd-share button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.fd-share a:hover, .fd-share button:hover { color: var(--fd-yellow); }
.woocommerce-tabs { margin-top: 24px; }
.woocommerce-tabs ul.tabs { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 24px; border-bottom: 1px solid var(--fd-border); overflow-x: auto; }
.woocommerce-tabs ul.tabs a { display: block; padding: 14px 18px; font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; color: var(--fd-muted); border-bottom: 3px solid transparent; }
.woocommerce-tabs ul.tabs li.active a { color: var(--fd-text); border-bottom-color: var(--fd-yellow); }
.woocommerce-Tabs-panel h2 { font: 900 1.4rem var(--fd-font-display); text-transform: uppercase; }
.related.products > h2, .upsells.products > h2, .fd-recent .fd-h3 { font: 900 clamp(1.4rem, 3vw, 2rem)/1 var(--fd-font-display); text-transform: uppercase; margin: 56px 0 24px; }
#reviews #comments ol.commentlist { list-style: none; padding: 0; }
#reviews .comment_container { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--fd-border); }
#reviews img.avatar { width: 48px; height: 48px; border-radius: 50%; }
.woocommerce-review__verified { color: var(--fd-ok); font-size: .85rem; }
.comment-form-rating select, p.stars a { color: var(--fd-yellow); }

/* ---------- Cart (classic) ---------- */
.woocommerce table.shop_table, table.shop_table { width: 100%; border-collapse: collapse; border: 1px solid var(--fd-border); }
table.shop_table th, table.shop_table td { padding: 14px 16px; border-bottom: 1px solid var(--fd-border); text-align: left; vertical-align: middle; }
table.shop_table thead th { background: var(--fd-bg-2); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
table.shop_table td.product-thumbnail img { width: 72px; border-radius: 3px; }
table.shop_table td.product-remove a { color: var(--fd-err); font-size: 1.5rem; text-decoration: none; }
.cart-collaterals { display: flex; justify-content: flex-end; margin-top: 32px; }
.cart_totals { width: min(100%, 440px); }
.cart_totals h2 { font: 900 1.4rem var(--fd-font-display); text-transform: uppercase; }
.wc-proceed-to-checkout .checkout-button { display: flex; width: 100%; }
.coupon { display: flex; gap: 10px; }
.coupon input { max-width: 220px; }
td.actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.woocommerce-shipping-methods { list-style: none; padding: 0; margin: 0; }

/* ---------- Checkout (classic) ---------- */
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: var(--fd-gap); }
form.checkout h3, #order_review_heading { font: 900 1.3rem var(--fd-font-display); text-transform: uppercase; margin: 24px 0 16px; }
.form-row { margin: 0 0 16px; }
.form-row label { display: block; margin-bottom: 6px; font-size: .9rem; }
.form-row .required { color: var(--fd-yellow); text-decoration: none; }
.woocommerce-checkout #customer_details { margin-bottom: 24px; }
#payment { background: var(--fd-card); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); padding: 20px; }
#payment ul.payment_methods { list-style: none; padding: 0; margin: 0 0 16px; }
#payment .payment_box { background: var(--fd-bg-2); padding: 14px; margin: 10px 0; border-radius: var(--fd-radius); color: var(--fd-muted); }
#place_order { width: 100%; min-height: 56px; }
.select2-container--default .select2-selection--single { background: var(--fd-bg-2); border: 1px solid var(--fd-border); height: 48px; border-radius: var(--fd-radius); }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--fd-text); line-height: 46px; padding-left: 14px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
.select2-dropdown { background: var(--fd-bg-2); border-color: var(--fd-border); color: var(--fd-text); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--fd-yellow); color: #000; }

/* ---------- Cart & Checkout blocks (default on new WooCommerce installs) ---------- */
.wc-block-components-text-input input, .wc-block-components-textarea, .wc-block-components-combobox .components-combobox-control input, .wc-blocks-components-select select, .wc-block-components-form .wc-block-components-text-input input[type] {
	background: var(--fd-bg-2) !important; color: var(--fd-text) !important; border-color: var(--fd-border) !important;
}
.wc-block-components-text-input label, .wc-block-components-combobox label, .wc-blocks-components-select label { color: var(--fd-muted) !important; }
.wc-block-components-totals-wrapper, .wc-block-components-order-summary, .wc-block-checkout__sidebar, .wc-block-cart__sidebar { border-color: var(--fd-border) !important; }
.wc-block-components-radio-control-accordion-option, .wc-block-components-radio-control__option { border-color: var(--fd-border) !important; }
.wc-block-components-product-price, .wc-block-components-totals-item__value, .wc-block-components-product-name { color: var(--fd-text) !important; }
.wc-block-components-product-metadata, .wc-block-components-product-details { color: var(--fd-muted) !important; }
.wc-block-components-checkbox__mark { fill: #000 !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked { background: var(--fd-yellow); border-color: var(--fd-yellow); }
.wc-block-components-button.wp-element-button { background: var(--fd-yellow) !important; color: #000 !important; }
.wc-block-components-quantity-selector { border-color: var(--fd-border); }
.wc-block-components-quantity-selector__input { color: var(--fd-text); }
.wc-block-components-panel__button, .wc-block-components-title { color: var(--fd-text); }

/* ---------- My account ---------- */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }
.woocommerce-MyAccount-navigation a { display: block; padding: 14px 18px; text-decoration: none; font-weight: 700; border-bottom: 1px solid var(--fd-border); }
.woocommerce-MyAccount-navigation li:last-child a { border-bottom: 0; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--fd-yellow); color: #000; }
.woocommerce-account:not(.logged-in) .woocommerce, .woocommerce-account .woocommerce:has(.u-columns) { display: block; }
.u-columns.col2-set, .woocommerce-form-login, .woocommerce-form-register { max-width: 520px; }
.woocommerce-form-login, .woocommerce-form-register, .woocommerce-ResetPassword { border: 1px solid var(--fd-border); border-radius: var(--fd-radius); padding: 24px; margin: 0 0 24px; }
.woocommerce-order-details, .woocommerce-customer-details { margin-top: 24px; }
.woocommerce-order-overview { list-style: none; display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 0; }
.woocommerce-order-overview li { font-size: .85rem; color: var(--fd-muted); text-transform: uppercase; letter-spacing: .06em; }
.woocommerce-order-overview strong { display: block; font-size: 1rem; color: var(--fd-text); text-transform: none; letter-spacing: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	ul.products { grid-template-columns: repeat(3, 1fr); }
	.single-product div.product { grid-template-columns: 1fr; }
	.single-product div.product > .woocommerce-product-gallery, .single-product div.product > .summary { grid-column: 1; }
	.woocommerce-account .woocommerce { grid-template-columns: 1fr; }
	.woocommerce-checkout .col2-set { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	ul.products { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
	ul.products li.product .button { font-size: .7rem; padding-inline: 8px; }
	.fd-toolbar .woocommerce-result-count { flex: 1 1 100%; }
	table.shop_table_responsive thead { display: none; }
	table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--fd-border); padding: 8px 0; }
	table.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 8px 12px; text-align: right; }
	table.shop_table_responsive td::before { content: attr(data-title); font-weight: 700; text-align: left; }
	table.shop_table_responsive td.product-remove::before, table.shop_table_responsive td.product-thumbnail::before, table.shop_table_responsive td.actions::before { content: none; }
	.coupon { flex-direction: column; width: 100%; } .coupon input { max-width: none; }
	.woocommerce-message .button, .woocommerce-info .button { float: none; display: flex; margin: 10px 0 0; }
}
