/* ==========================================================================
   Huge Coder — WooCommerce styling
   Loaded only on shop/product/cart/checkout/account pages (see
   hc_woocommerce_assets() in inc/woocommerce.php). WooCommerce ships its
   own structural CSS when a theme declares add_theme_support('woocommerce')
   — this file only adds brand color, type, and spacing on top of that.
   Cart/Checkout render through WooCommerce Blocks (wc-block-* classes),
   everything else through the classic templates — both are covered here.
   ========================================================================== */

.woocommerce-page-section { padding-top: 48px; padding-bottom: 96px; }

/* ---------- Shared: headings, links, notices ---------- */
.woocommerce-breadcrumb {
	font-size: 0.88rem;
	color: var(--hc-text-soft);
	margin-bottom: 28px;
}
.woocommerce-breadcrumb a { color: var(--hc-text-soft); text-decoration: underline; text-underline-offset: 2px; }
.woocommerce-breadcrumb a:hover { color: var(--hc-navy); }

.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-noreviews,
p.no-comments {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	list-style: none;
	background: var(--hc-white);
	border: 1px solid rgba(39,67,89,0.1);
	border-left: 4px solid var(--hc-teal-dark);
	border-radius: var(--hc-radius-sm);
	padding: 16px 20px;
	margin: 0 0 28px;
	font-size: 0.95rem;
	color: var(--hc-text);
}
.woocommerce-error { border-left-color: var(--hc-coral-dark); }
.woocommerce-message .button,
.woocommerce-info .button { margin-left: auto; }

/* ---------- Shop archive ---------- */
/* Tag-qualified (ul.products) on purpose: WooCommerce's related/upsell
   wrapper is a <div class="related products">, so an untagged
   ".products" selector matches that wrapper DIV too — turning it into a
   grid with the actual <ul class="products"> as its only child, which
   then only fills one grid cell instead of the wrapper's full width
   (nested grid-in-grid, not a card-sizing problem). */
ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}
/* WooCommerce's own float-based layout clears itself with a classic
   `content:" "; display:table` clearfix on ::before/::after — confirmed
   live via getComputedStyle(ul, '::before'). A grid container doesn't
   need clearing, but that pseudo-element still generates a box, and any
   generated box that isn't display:none becomes a REAL grid item — it
   was silently occupying the first cell and pushing every actual
   product over by one slot (3 fit the remaining row, the 4th wrapped). */
ul.products::before,
ul.products::after {
	content: none !important;
	display: none !important;
}
@media (max-width: 980px) { ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { ul.products { grid-template-columns: 1fr; } }

/* WooCommerce's own structural stylesheet lays the loop out with floats
   (ul.products[class*=columns-] li.product { width: 22.1%; float: left;
   margin-right: 3.8% }) rather than grid — switching the parent to
   `display: grid` above stops the float from doing anything, but that
   inline percentage width is still a separate property and still
   applies, so cards ended up constrained to ~22% of an already-1fr-wide
   grid cell (extremely narrow, multi-line title wrap). Resetting width/
   float/margin here is what actually hands the layout over to the grid. */
ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	background: var(--hc-white);
	border: 1px solid rgba(39,67,89,0.08);
	border-radius: var(--hc-radius);
	padding: 20px 20px 24px;
	text-align: center;
	transition: transform 0.25s var(--hc-ease), box-shadow 0.25s var(--hc-ease);
}
ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--hc-shadow-sm); }
ul.products li.product img {
	border-radius: var(--hc-radius-sm);
	margin-bottom: 16px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--hc-font-heading);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--hc-navy);
	margin: 0 0 8px;
}
ul.products li.product .price {
	font-family: var(--hc-font-heading);
	font-weight: 700;
	color: var(--hc-navy);
	font-size: 1.1rem;
	display: block;
	margin-bottom: 14px;
}
ul.products li.product .price del { color: var(--hc-text-soft); opacity: 0.6; font-weight: 500; margin-right: 6px; }
ul.products li.product .price ins { text-decoration: none; }

.woocommerce-result-count,
.woocommerce-ordering { color: var(--hc-text-soft); font-size: 0.92rem; }
.woocommerce-ordering select {
	border: 1px solid rgba(39,67,89,0.2);
	border-radius: var(--hc-radius-sm);
	padding: 8px 14px;
	font-family: var(--hc-font-body);
}

/* ---------- Buttons (classic templates: add-to-cart, checkout, etc.) ---------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--hc-font-heading);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 13px 26px;
	border-radius: 999px;
	border: 2px solid transparent;
	background: var(--hc-coral);
	color: var(--hc-navy);
	box-shadow: 0 12px 24px -12px rgba(255,154,150,0.6);
	transition: background-color 0.25s var(--hc-ease), color 0.25s var(--hc-ease), transform 0.2s var(--hc-ease);
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
	background: var(--hc-navy);
	color: var(--hc-white);
}
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt { background: var(--hc-navy); color: var(--hc-white); }
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover { background: var(--hc-coral); color: var(--hc-navy); }
ul.products li.product .button { width: 100%; margin-top: 4px; }

/* ---------- Single product ---------- */
/* Flexbox, not grid: WooCommerce (and any plugin hooked into
   woocommerce_after_single_product_summary) can add extra direct
   children of div.product beyond gallery/summary/tabs/related — a fixed
   grid-template-columns has no room for those and mis-assigns cells
   around them (that's what was squeezing the gallery/summary into
   narrow columns with a gap between). Flex-wrap just lets anything
   unaccounted-for drop to its own row instead of breaking the layout. */
.woocommerce div.product {
	display: flex;
	flex-wrap: wrap;
	gap: 56px;
	align-items: flex-start;
}

.woocommerce div.product .woocommerce-product-gallery,
.woocommerce div.product .summary {
	flex: 1 1 420px;
	max-width: calc(50% - 28px);
	min-width: 0;
}
@media (max-width: 860px) {
	.woocommerce div.product .woocommerce-product-gallery,
	.woocommerce div.product .summary { max-width: 100%; }
}

/* WooCommerce's gallery JS (zoom/lightbox/slider, enabled via
   add_theme_support) sets inline width/opacity on init — !important
   forces the image to actually fill its column instead of sitting at
   whatever intrinsic/JS-set size it initialized with. */
.woocommerce div.product .woocommerce-product-gallery,
.woocommerce div.product .woocommerce-product-gallery__wrapper,
.woocommerce div.product .woocommerce-product-gallery__image,
.woocommerce div.product .woocommerce-product-gallery__image img {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
}
.woocommerce div.product .woocommerce-product-gallery img { border-radius: var(--hc-radius); }

/* Related/upsell products are a sibling of gallery/summary inside the
   same div.product (see comment above) — force full width so the
   existing ul.products grid renders properly instead of being squeezed
   into a leftover flex track. The description tabs are hidden entirely
   per product direction — see the "Product details" modal below, which
   reads its content from the same markup WooCommerce already renders. */
.woocommerce div.product .related.products,
.woocommerce div.product .upsells.products {
	flex: 1 1 100%;
	width: 100%;
}
.woocommerce div.product .woocommerce-tabs { display: none; }

.woocommerce div.product .product_title {
	font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
	color: var(--hc-navy);
	margin-bottom: 14px;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	font-family: var(--hc-font-heading);
	font-size: 1.65rem;
	font-weight: 700;
	color: var(--hc-navy);
	margin-bottom: 20px;
	display: block;
}
.woocommerce div.product .woocommerce-product-details__short-description {
	color: var(--hc-text-soft);
	margin-bottom: 24px;
	line-height: 1.7;
}

.woocommerce div.product form.cart {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 32px;
}
.woocommerce div.product form.cart .quantity { display: flex; }
.woocommerce div.product form.cart .qty {
	width: 70px;
	padding: 12px 14px;
	border: 1px solid rgba(39,67,89,0.2);
	border-radius: var(--hc-radius-sm);
	font-family: var(--hc-font-body);
	text-align: center;
}

/* "View product details" link + modal — replaces the classic tabs UI
   (hidden above via .woocommerce-tabs{display:none}), which the source
   material still renders normally so the modal can read its content. */
.hc-details-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--hc-font-heading);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--hc-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}
.hc-details-link:hover { color: var(--hc-coral-dark); }
.hc-details-link svg { width: 16px; height: 16px; }

.hc-details-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; }
.hc-details-modal.is-open { display: flex; }
.hc-details-modal__backdrop { position: absolute; inset: 0; background: rgba(23,36,46,0.55); backdrop-filter: blur(2px); }
.hc-details-modal__panel {
	position: relative;
	background: var(--hc-white);
	border-radius: var(--hc-radius-lg);
	box-shadow: var(--hc-shadow-lg);
	padding: 40px;
	max-width: 640px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	animation: hc-cart-modal-in 0.25s var(--hc-ease);
}
.hc-details-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: var(--hc-bg-gray);
	color: var(--hc-navy);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}
.hc-details-modal__title { font-family: var(--hc-font-heading); color: var(--hc-navy); font-size: 1.4rem; margin: 0 0 20px; }
.hc-details-modal__body { color: var(--hc-text-soft); line-height: 1.75; }

.related.products,
.upsells.products {
	margin-top: 64px;
	padding-top: 48px;
	border-top: 1px solid rgba(39,67,89,0.1);
}
.related.products > h2,
.upsells.products > h2 {
	font-family: var(--hc-font-heading);
	font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
	color: var(--hc-navy);
	margin-bottom: 28px;
}

/* ---------- Cart & Checkout (WooCommerce Blocks) ---------- */
.wc-block-components-notice-banner,
.wc-block-store-notice-notice {
	border-radius: var(--hc-radius-sm);
	border-left: 4px solid var(--hc-teal-dark);
}
.wp-block-woocommerce-cart .wc-block-cart-items,
.wp-block-woocommerce-cart .wc-block-components-sidebar,
.wc-block-checkout__form,
.wc-block-checkout__sidebar {
	background: var(--hc-white);
	border: 1px solid rgba(39,67,89,0.08);
	border-radius: var(--hc-radius);
	padding: 28px;
}
.wc-block-components-product-name { font-family: var(--hc-font-heading); font-weight: 600; color: var(--hc-navy); }
.wc-block-components-totals-item__value,
.wc-block-components-product-price,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--hc-font-heading);
	color: var(--hc-navy);
}
.wc-block-cart__submit-container .wp-element-button,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wp-block-button__link {
	font-family: var(--hc-font-heading) !important;
	font-weight: 600 !important;
	border-radius: 999px !important;
	background: var(--hc-coral) !important;
	color: var(--hc-navy) !important;
	border: none !important;
	padding: 14px 28px !important;
	transition: background-color 0.25s var(--hc-ease), color 0.25s var(--hc-ease) !important;
}
.wc-block-cart__submit-container .wp-element-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wp-block-button__link:hover {
	background: var(--hc-navy) !important;
	color: var(--hc-white) !important;
}
.wc-block-components-checkbox svg,
.wc-block-components-radio-control__input:checked {
	accent-color: var(--hc-navy);
}
.wc-block-components-form .wc-block-components-text-input input,
.wc-block-components-address-form input,
.wc-block-components-address-form select {
	border-radius: var(--hc-radius-sm) !important;
	border-color: rgba(39,67,89,0.2) !important;
}
.wc-block-components-form .wc-block-components-text-input input:focus,
.wc-block-components-address-form input:focus {
	border-color: var(--hc-navy) !important;
	box-shadow: 0 0 0 3px rgba(39,67,89,0.12) !important;
}
.wc-block-components-product-badge,
.wc-block-cart__empty-cart__title { color: var(--hc-navy); font-family: var(--hc-font-heading); }
.wc-block-grid__product-title { color: var(--hc-navy); font-family: var(--hc-font-heading); font-weight: 600; }
.wc-block-grid__product-price { color: var(--hc-navy); font-family: var(--hc-font-heading); font-weight: 700; }

/* ---------- My Account ---------- */
.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 40px;
	align-items: start;
}
@media (max-width: 780px) { .woocommerce-account .woocommerce { grid-template-columns: 1fr; } }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 12px 16px;
	border-radius: var(--hc-radius-sm);
	font-family: var(--hc-font-heading);
	font-weight: 600;
	color: var(--hc-text-soft);
}
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation a:hover { background: var(--hc-bg-gray); color: var(--hc-navy); }
.woocommerce-MyAccount-content table.shop_table {
	width: 100%;
	border-collapse: collapse;
	background: var(--hc-white);
}
.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td {
	padding: 14px 16px;
	border-bottom: 1px solid rgba(39,67,89,0.08);
	text-align: left;
}
.woocommerce-MyAccount-content .woocommerce-Address { background: var(--hc-white); border: 1px solid rgba(39,67,89,0.08); border-radius: var(--hc-radius); padding: 24px; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid rgba(39,67,89,0.2);
	border-radius: var(--hc-radius-sm);
	font-family: var(--hc-font-body);
}

/* ---------- Add-to-cart lightbox ---------- */
.hc-cart-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; }
.hc-cart-modal.is-open { display: flex; }
.hc-cart-modal__backdrop { position: absolute; inset: 0; background: rgba(23,36,46,0.55); backdrop-filter: blur(2px); }
.hc-cart-modal__panel {
	position: relative;
	background: var(--hc-white);
	border-radius: var(--hc-radius-lg);
	box-shadow: var(--hc-shadow-lg);
	padding: 40px 36px 32px;
	max-width: 420px;
	width: 100%;
	text-align: center;
	animation: hc-cart-modal-in 0.25s var(--hc-ease);
}
@keyframes hc-cart-modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.hc-cart-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: var(--hc-bg-gray);
	color: var(--hc-navy);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}
.hc-cart-modal__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: rgba(71, 237, 230, 0.16);
	color: var(--hc-teal-dark);
	display: flex;
	align-items: center;
	justify-content: center;
}
.hc-cart-modal__icon svg { width: 28px; height: 28px; }
.hc-cart-modal__title { font-family: var(--hc-font-heading); color: var(--hc-navy); font-size: 1.3rem; margin: 0 0 8px; }
.hc-cart-modal__product { color: var(--hc-text-soft); margin: 0 0 24px; }
.hc-cart-modal__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
body.hc-cart-modal-open { overflow: hidden; }

/* ---------- Currency-converted price note ---------- */
.hc-price-converted {
	display: none;
	font-family: var(--hc-font-body);
	font-weight: 500;
	font-size: 0.78rem;
	color: var(--hc-text-soft);
	margin-top: 2px;
}
ul.products li.product .hc-price-converted { justify-content: center; }
.hc-price { display: inline-flex; flex-direction: column; align-items: inherit; }
