/* Shop + product pages. Loaded only on WooCommerce pages. Uses the theme's colour variables (light / dark). */

/* ------------------------------------------------------------- compact head */
.page-hero--compact { padding: 128px 0 26px; }
.page-hero--compact h1 { max-width: none; margin-bottom: 8px; font-size: clamp(34px, 4.2vw, 54px); }
.page-hero--compact .lede { font-size: 17px; max-width: 38rem; }
.page-hero--compact + .page-body,
.page-hero--compact ~ .page-body { padding-top: 6px; }

/* ----------------------------------------------------------------- toolbar */
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 6px 0 26px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.shop-pills { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); padding-right: 24px; }
.shop-pills::-webkit-scrollbar { display: none; }
.shop-pills a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: 15px; text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.shop-pills a span { padding: 1px 8px; border-radius: 999px; background: var(--soft); font-size: 12px; }
.shop-pills a:hover { color: var(--ink); background: var(--soft); }
.shop-pills a.is-on { background: var(--accent); color: #fff; }
.shop-pills a.is-on span { background: rgba(255, 255, 255, 0.22); }
.shop-pills__sale:not(.is-on) { color: #ff8a5c; }
.shop-bar__tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shop-bar__count,
.shop-bar__count .woocommerce-result-count { margin: 0; color: var(--muted); font-size: 14px; }
.shop-bar .woocommerce-ordering { margin: 0; }
.shop-bar select,
.shop-side select { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); font: inherit; font-size: 14px; }
.shop-bar select option,
.shop-side select option { color: #111; background: #fff; }

.shop-pop { position: relative; }
.shop-pop summary { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 14px; cursor: pointer; list-style: none; }
.shop-pop summary::-webkit-details-marker { display: none; }
.shop-pop summary .icon { width: 16px; height: 16px; }
.shop-pop__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
[data-theme="light"] .shop-pop__panel { background: #fff; box-shadow: 0 24px 60px rgba(60, 30, 130, 0.18); }
.shop-price input { width: 84px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); color: var(--ink); font: inherit; }
.shop-price button { min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.shop-pop__clear { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ sidebar mode */
.shop-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.shop-side { position: sticky; top: 100px; }
.shop-side__fold > summary { display: none; }
.shop-side__more summary { padding: 8px 12px; color: var(--accent-2); cursor: pointer; font-size: 14px; }
.shop-side__widgets { display: contents; }

/* ---------------------------------------------------------------- the grid */
.woocommerce ul.products,
.shop-main ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 22px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product.shop-card,
.woocommerce ul.products li.product.shop-cat {
	display: flex;
	flex-direction: column;
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	float: none !important;
	border: 1px solid var(--line);
	border-radius: 24px;
	background: var(--card);
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s, box-shadow 0.35s;
}
.woocommerce ul.products li.product.shop-card:hover { transform: translateY(-6px); border-color: rgba(123, 102, 242, 0.55); box-shadow: 0 30px 60px rgba(30, 10, 70, 0.3); }
.shop-card__media { position: relative; display: block; overflow: hidden; }
.woocommerce ul.products li.product.shop-card img { display: block; width: 100%; height: auto; margin: 0; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.woocommerce ul.products li.product.shop-card:hover img { transform: scale(1.06); }
.shop-card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge-pill { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-pill--sale { background: #e0527a; }
.badge-pill--hot { background: linear-gradient(90deg, #7b66f2, #e0527a); }
.shop-card__body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 18px 20px 20px; }
.shop-card__cat { margin: 0; color: var(--accent-2); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.woocommerce ul.products li.product .shop-card__title { margin: 0; padding: 0; font-size: 19px !important; line-height: 1.25; }
.woocommerce ul.products li.product .shop-card__title a { color: var(--ink); text-decoration: none; }
.woocommerce ul.products li.product .shop-card__title a:hover { color: var(--accent-2); }
.shop-card__desc { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.shop-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.shop-card__price { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.shop-card__price del { display: block; color: var(--muted); font-size: 13px; font-weight: 500; opacity: 0.85; }
.shop-card__price ins { text-decoration: none; }
.woocommerce ul.products li.product.shop-card .button { margin: 0; min-height: 42px; padding: 0 16px; border-radius: 12px !important; border: 1px solid var(--line) !important; background: var(--soft) !important; color: var(--ink) !important; font-size: 14px; }
.woocommerce ul.products li.product.shop-card .button:hover { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.woocommerce ul.products li.product.shop-card .added_to_cart { display: none; }
.woocommerce ul.products li.product.shop-card .button.loading { opacity: 0.6; }
.woocommerce ul.products li.product.shop-card .button.added::after { content: " ✓"; }

/* sub-category tiles */
.woocommerce ul.products li.product.shop-cat { border-radius: 20px; }
.shop-cat__link { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.shop-cat__media { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 14px; background: var(--soft); overflow: hidden; color: var(--accent-2); }
.shop-cat__media img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; aspect-ratio: auto !important; }
.shop-cat__icon .icon { width: 24px; height: 24px; }
.shop-cat__text { display: grid; flex: 1; min-width: 0; }
.shop-cat__text strong { font-family: var(--display); }
.shop-cat__text small { color: var(--muted); }
.shop-cat__link > .icon { width: 18px; height: 18px; opacity: 0.5; transition: transform 0.25s, opacity 0.25s; }
.shop-cat__link:hover > .icon { opacity: 1; transform: translateX(4px); }

/* pagination */
.woocommerce nav.woocommerce-pagination { margin: 36px 0 0; text-align: center; }
.woocommerce nav.woocommerce-pagination ul { display: inline-flex; gap: 8px; margin: 0; padding: 0; border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; float: none; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 600; }
.woocommerce nav.woocommerce-pagination ul li a:hover { background: var(--soft); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ product */
.pdp-top { height: 6px; }
.shop--pdp { padding-top: 34px; }
.pdp__crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.pdp__crumbs a { color: var(--muted); text-decoration: none; }
.pdp__crumbs a:hover { color: var(--accent-2); }
.pdp__crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.pdp__layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 56px; align-items: start; }
.pdp__info { position: sticky; top: 100px; display: grid; gap: 14px; }
.pdp__tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pdp__title { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; }
.pdp__price .price { margin: 0; font-family: var(--display); font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.pdp__price .price del { margin-right: 8px; color: var(--muted); font-size: 20px; font-weight: 500; }
.pdp__price .price ins { text-decoration: none; }
.pdp__lede,
.pdp__lede p { color: var(--muted); font-size: 17px; }
.pdp__points { display: grid; gap: 10px; margin: 4px 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); }
.pdp__points li { display: flex; gap: 10px; align-items: flex-start; }
.pdp__points .tick { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: rgba(123, 102, 242, 0.2); color: var(--accent-2); }
.pdp__points .tick .icon { width: 13px; height: 13px; }
.pdp__buy { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.pdp__buy form.cart { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin: 0; }
.pdp__buy form.variations_form { display: block; }
.pdp__buy .single_variation_wrap .woocommerce-variation-add-to-cart,
.pdp__buy form.cart:not(.variations_form) { display: flex; gap: 12px; flex-wrap: wrap; }
.pdp__buy table.variations { width: 100%; margin: 0 0 14px; border: 0; }
.pdp__buy table.variations th,
.pdp__buy table.variations td { display: block; padding: 0 0 8px; border: 0; background: none; text-align: left; }
.pdp__buy table.variations label { font-weight: 700; }
.pdp__buy select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); font: inherit; }
.pdp__buy select option { color: #111; background: #fff; }
.pdp__buy .reset_variations { font-size: 13px; color: var(--muted); }
.pdp__buy .woocommerce-variation-price .price { font-family: var(--display); font-size: 24px; font-weight: 800; }
.pdp__buy .quantity { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); overflow: hidden; }
.pdp__buy .quantity .qty { width: 54px; min-height: 52px; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 700; text-align: center; -moz-appearance: textfield; }
.pdp__buy .quantity .qty::-webkit-outer-spin-button,
.pdp__buy .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp__buy .quantity .step { width: 40px; height: 52px; border: 0; background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; transition: background 0.2s; }
.pdp__buy .quantity .step:hover { background: var(--soft); }
.pdp__buy .single_add_to_cart_button { flex: 1; min-height: 54px; padding: 0 26px; border-radius: 14px !important; background: var(--accent) !important; color: #fff !important; font-size: 17px; }
.pdp__buy .single_add_to_cart_button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.pdp__buy .stock { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.pdp__trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pdp__trust li { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.pdp__trust .icon { width: 20px; height: 20px; color: var(--accent-2); }
.pdp .product_meta { display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.pdp .product_meta a { color: var(--ink); }
.pdp .star-rating { color: #ffb23f; }

/* WooCommerce gallery */
.pdp__gallery .woocommerce-product-gallery { position: relative; width: 100% !important; margin: 0; float: none; }
.pdp__gallery .woocommerce-product-gallery__wrapper { margin: 0; }
.pdp__gallery .woocommerce-product-gallery__image img { display: block; width: 100%; height: auto; border-radius: 28px; border: 1px solid var(--line); }
.pdp__gallery .woocommerce-product-gallery__trigger { position: absolute; top: 16px; right: 16px; z-index: 5; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(10, 4, 20, 0.7); color: #fff; text-decoration: none; backdrop-filter: blur(6px); }
.pdp__gallery .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.pdp__gallery .flex-control-thumbs li { float: none; width: auto; }
.pdp__gallery .flex-control-thumbs img { display: block; width: 100%; height: auto; border: 2px solid transparent; border-radius: 14px; opacity: 0.55; cursor: pointer; transition: opacity 0.2s, border-color 0.2s; }
.pdp__gallery .flex-control-thumbs img:hover,
.pdp__gallery .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--accent); }
.pdp__gallery .onsale { display: none; }

/* tabs: overview, details, reviews */
.pdp__tabs { margin-top: 64px; }
.woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; border: 0; }
.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs::after { display: none !important; }
.woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 1px solid var(--line) !important; border-radius: 999px !important; background: transparent !important; }
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 10px 20px !important; color: var(--muted) !important; font-family: var(--display); font-weight: 600; text-decoration: none; }
.woocommerce-tabs ul.tabs li.active { background: var(--accent) !important; border-color: var(--accent) !important; }
.woocommerce-tabs ul.tabs li.active a { color: #fff !important; }
.woocommerce-tabs .panel { margin: 0; padding: 30px 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); max-width: 920px; }
.woocommerce-tabs .panel h2 { margin: 0 0 14px; font-size: 24px; }
.woocommerce-tabs .panel p,
.woocommerce-tabs .panel li { color: var(--muted); font-size: 17px; }
.woocommerce-tabs .panel ul { padding-left: 20px; }
.woocommerce table.shop_attributes { border: 0; }
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font-style: normal; }
.woocommerce #reviews #comments ol.commentlist { padding: 0; }
.woocommerce #reviews #comments ol.commentlist li { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--line); list-style: none; }
.woocommerce #reviews #comments ol.commentlist li img.avatar { border-radius: 50%; background: var(--soft); border: 0; padding: 0; }
.woocommerce #reviews #comments ol.commentlist li .comment-text { margin-left: 64px; border: 0; padding: 0; }
.woocommerce #review_form #respond textarea,
.woocommerce #review_form #respond input[type="text"],
.woocommerce #review_form #respond input[type="email"] { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); font: inherit; }
.woocommerce #review_form #respond .form-submit input { min-height: 48px; padding: 0 24px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.woocommerce p.stars a { color: #ffb23f; }

/* upsells + related */
.pdp .related,
.pdp .upsells { margin-top: 70px; }
.pdp .related > h2,
.pdp .upsells > h2 { margin-bottom: 22px; font-size: 28px; }

/* sticky mobile buy bar */
.pdp-bar { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); transform: translateY(140%); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
[data-theme="light"] .pdp-bar { background: #fff; box-shadow: 0 20px 50px rgba(60, 30, 130, 0.25); }
.pdp-bar[hidden] { display: none; }
.pdp-bar.is-on { transform: none; }
.pdp-bar div { display: grid; min-width: 0; }
.pdp-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); }
.pdp-bar span { color: var(--muted); font-size: 14px; }
.pdp-bar .btn { flex: none; min-height: 45px; border-radius: 12px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
	.pdp__layout { grid-template-columns: 1fr; gap: 32px; }
	.pdp__info { position: static; }
	.shop-layout { grid-template-columns: 1fr; }
	.shop-side { position: static; }
	.shop-side__fold > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-family: var(--display); font-weight: 600; cursor: pointer; list-style: none; }
	.shop-side__fold > summary::-webkit-details-marker { display: none; }
	.shop-side__fold > summary .icon { width: 17px; height: 17px; }
	.shop-side__fold[open] > summary { margin-bottom: 14px; }
}
@media (min-width: 901px) { .pdp-bar { display: none !important; } }
@media (max-width: 720px) {
	.shop-bar { padding: 10px; }
	.shop-bar__tools { width: 100%; justify-content: space-between; }
	.woocommerce ul.products,
	.shop-main ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.shop-card__body { padding: 14px; }
	.shop-card__desc { display: none; }
	.shop-card__foot { flex-direction: column; align-items: stretch; }
	.woocommerce ul.products li.product.shop-card .button { width: 100%; justify-content: center; }
	.woocommerce-tabs .panel { padding: 22px 18px; }
	.pdp__trust { grid-template-columns: 1fr; }
	.shop--pdp { padding-top: 24px; padding-bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
	.shop-card, .shop-card img, .pdp-bar { transition: none; }
}

/* keep the card button on one line */
.woocommerce ul.products li.product.shop-card .button { flex: none; white-space: nowrap; padding: 0 14px; }
.shop-card__foot { flex-wrap: nowrap; }
.shop-card__price { min-width: 0; }

/* WooCommerce and older theme rules fix the thumbnail width; the grid decides it here. */
.pdp__gallery .flex-control-thumbs li { float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
.pdp__gallery .flex-control-thumbs img { width: 100% !important; height: auto !important; aspect-ratio: 1; object-fit: cover; }

/* sidebar mode: breathing room between filter groups */
.shop-side { padding: 20px 20px 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.shop-side__block + .shop-side__block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.shop-side__block > h2 { margin: 0 0 10px; color: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.shop-side__cats a,
.shop-side__check { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; transition: background 0.2s; }
.shop-side__cats a:hover,
.shop-side__check:hover { background: var(--soft); }
.shop-side__cats a.is-on,
.shop-side__check.is-on { background: rgba(123, 102, 242, 0.22); }
.shop-side__cats a span,
.shop-side__check b { color: var(--muted); font-size: 13px; font-weight: 500; }
