/* ==========================================================================
   PCGuide Neo — woo.css (loaded only with WooCommerce)
   1. Category rail   2. Filter bar   3. Product grid   4. Single product, cart, checkout, notices
   ========================================================================== */

/* 1. Category rail ---------------------------------------------------------- */
.pcgn-cats { position: relative; display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; }
.pcgn-cats__back { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 500; }
.pcgn-cats__back:hover { border-color: var(--neon); color: var(--fg); }
.pcgn-cats__track { list-style: none; margin: 0; padding: 2px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; flex-grow: 1; min-width: 0; }
.pcgn-cats__track::-webkit-scrollbar { display: none; }
.pcgn-cats__track li { flex: 0 0 auto; scroll-snap-align: start; }
.pcgn-cats__item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 132px; padding: 10px 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--fg); text-decoration: none; text-align: center; transition: border-color .15s, background-color .15s; height: 100%; }
.pcgn-cats__item:hover { border-color: var(--neon); color: var(--fg); background: var(--card2); }
.pcgn-cats__item.is-active { border-color: var(--neon); box-shadow: inset 0 0 0 1px var(--neon); }
.pcgn-cats__img { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--bg2); display: flex; align-items: center; justify-content: center; }
.pcgn-cats__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.pcgn-cats__ph { color: var(--neon-text); display: flex; }
.pcgn-cats__name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.pcgn-cats__count { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.pcgn-rail__btn { position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card); color: var(--fg); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45); }
.pcgn-rail__btn[hidden] { display: none; }
.pcgn-rail__btn--prev { left: -10px; }
.pcgn-cats__back + .pcgn-rail__btn--prev { left: 74px; }
.pcgn-rail__btn--next { right: -10px; }
.pcgn-rail__btn:hover { border-color: var(--neon); }

/* 2. Filter bar --------------------------------------------------------------- */
.pcgn-shopf { margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.pcgn-shopf.is-loading { opacity: .6; pointer-events: none; }
.pcgn-shopf__top { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px 16px; }
.pcgn-shopf:not(.is-js) .pcgn-shopf__top, .pcgn-shopf.is-open .pcgn-shopf__top { border-bottom: 1px solid var(--line); }
.pcgn-shopf__toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); color: var(--fg); font: 600 14px/1 var(--font); cursor: pointer; }
.pcgn-shopf__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--neon); color: var(--on-neon); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.pcgn-shopf__count { color: var(--mut); font-size: 15px; }
.pcgn-shopf__count b { color: var(--fg); font-family: var(--font-display); font-size: 18px; }
.pcgn-shopf__reset { font-size: 14px; font-weight: 600; }
.pcgn-shopf__sort { margin-left: auto; }
.pcgn-shopf__sort select { min-height: 38px; padding: 6px 12px; width: auto; min-width: 220px; }

.pcgn-shopf__panel { display: flex; padding: 16px; gap: 16px; flex-direction: column; }
.pcgn-shopf.is-js:not(.is-open) .pcgn-shopf__panel { display: none; }
.pcgn-shopf__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 24px; align-items: start; }
.pcgn-shopf__more { display: flex; flex-direction: column; gap: 16px; }
.pcgn-shopf__more[hidden] { display: none; }
.pcgn-shopf__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.pcgn-shopf__label { display: block; padding: 0; margin: 0 0 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); }
.pcgn-shopf__actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.pcgn-shopf__morebtn { margin-right: auto; padding: 0; border: 0; background: none; color: var(--neon-text); font: 600 14px/1 var(--font); cursor: pointer; }
.pcgn-shopf__morebtn .pcgn-when-open { display: none; }
.pcgn-shopf__morebtn.is-open .pcgn-when-open { display: inline; }
.pcgn-shopf__morebtn.is-open .pcgn-when-closed { display: none; }

/* Price */
.pcgn-range__nums { display: flex; align-items: center; gap: 8px; }
.pcgn-range__nums input { min-height: 40px; padding: 8px 10px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.pcgn-range__nums input::-webkit-outer-spin-button, .pcgn-range__nums input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pcgn-range__nums span { color: var(--dim); }
.pcgn-range__rail { position: relative; height: 28px; margin-top: 6px; }
.pcgn-range__rail[hidden] { display: none; }
.pcgn-range__rail::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--line2); }
.pcgn-range__fill { position: absolute; top: 12px; height: 4px; border-radius: 2px; background: var(--neon); left: 0; right: 0; }
.pcgn-range__rail input[type="range"] { position: absolute; left: 0; top: 0; width: 100%; height: 28px; margin: 0; padding: 0; min-height: 0; border: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; box-shadow: none; }
.pcgn-range__rail input[type="range"]::-webkit-slider-runnable-track { background: none; height: 28px; }
.pcgn-range__rail input[type="range"]::-moz-range-track { background: none; }
.pcgn-range__rail input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%; background: var(--card); border: 3px solid var(--neon); cursor: grab; }
.pcgn-range__rail input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--neon); cursor: grab; }
.pcgn-range__rail input[type="range"]:focus { box-shadow: none; }

/* Chips */
.pcgn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pcgn-chipbox { position: relative; cursor: pointer; }
.pcgn-chipbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pcgn-chipbox span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg2); color: var(--fg); font-size: 14px; font-weight: 500; transition: border-color .15s, background-color .15s; }
.pcgn-chipbox small { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.pcgn-chipbox:hover span { border-color: var(--neon); }
.pcgn-chipbox input:checked + span { background: var(--neon); border-color: var(--neon); color: var(--on-neon); }
.pcgn-chipbox input:checked + span small { color: var(--on-neon); opacity: .7; }
.pcgn-chipbox input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.pcgn-chipbox--switch span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--line2); }
.pcgn-chipbox--switch input:checked + span::before { border-color: var(--on-neon); background: var(--on-neon); box-shadow: inset 0 0 0 2px var(--neon); }

.pcgn-wc-empty { padding: 16px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--mut); }

/* 3. Product grid --------------------------------------------------------------- */
.pcgn-wcpage .woocommerce-products-header { margin-bottom: 8px; }
.pcgn-wcpage .woocommerce-products-header__title, .pcgn-wcpage .product_title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; margin: 0 0 10px; }
.woocommerce .woocommerce-breadcrumb { margin: 0 0 14px; font-size: 13px; color: var(--dim); }
.woocommerce .woocommerce-breadcrumb a { color: var(--mut); text-decoration: none; }
.term-description, .page-description { color: var(--mut); margin-bottom: 12px; }

.woocommerce ul.products, .woocommerce-page ul.products {
	display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px !important; padding: 0; list-style: none;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.woocommerce ul.products.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.woocommerce ul.products.columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
	width: auto !important; float: none !important; margin: 0 !important; clear: none !important;
	display: flex; flex-direction: column; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); transition: border-color .15s; position: relative;
}
.woocommerce ul.products li.product:hover { border-color: var(--neon); }
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex-grow: 1; color: var(--fg); text-decoration: none; }
.woocommerce ul.products li.product a img { margin: 0 0 10px; border-radius: 10px; background: #fff; aspect-ratio: 1 / 1; object-fit: contain; width: 100%; }
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product .woocommerce-loop-category__title { font-family: var(--font); font-size: 15px !important; font-weight: 600; line-height: 1.35; padding: 0 !important; margin: 0 0 6px; color: var(--fg); }
.woocommerce ul.products li.product .price { color: var(--neon-text); font-family: var(--font-mono); font-weight: 500; font-size: 15px; margin: auto 0 10px; display: block; }
.woocommerce ul.products li.product .price del { color: var(--dim); opacity: 1; font-size: 13px; margin-right: 6px; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .star-rating { margin: 0 0 6px; font-size: 12px; }
.woocommerce ul.products li.product .button { margin-top: 0; width: 100%; text-align: center; }
.woocommerce ul.products li.product .added_to_cart { display: block; text-align: center; margin-top: 6px; font-size: 14px; }
.woocommerce ul.products li.product-category a { color: var(--fg); text-decoration: none; }
.woocommerce ul.products li.product-category mark { background: none; color: var(--dim); }

.woocommerce span.onsale, .woocommerce ul.products li.product .onsale {
	top: 18px; left: 18px; right: auto; margin: 0; min-width: 0; min-height: 0; padding: 4px 10px; line-height: 1.3; border-radius: 999px; background: var(--neon); color: var(--on-neon); font-size: 12px; font-weight: 700; z-index: 2;
}

.woocommerce nav.woocommerce-pagination ul { border: 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; overflow: visible; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width: 44px; min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--fg); }
.woocommerce nav.woocommerce-pagination ul li span.current, .woocommerce nav.woocommerce-pagination ul li a:hover { background: var(--neon); color: var(--on-neon); border-color: var(--neon); }

/* 4. Buttons, single product, cart, checkout, notices ---------------------------- */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,
.wc-block-components-button:not(.is-link), .wp-element-button.wc-block-components-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border-radius: 12px; border: 0;
	background: var(--neon); color: var(--on-neon); font: 600 15px/1 var(--font); text-decoration: none;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .wc-block-components-button:not(.is-link):hover { background: var(--neon); color: var(--on-neon); filter: brightness(1.07); }
.woocommerce a.button.disabled, .woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled] { background: var(--line2); color: var(--mut); padding: 0 18px; }
.woocommerce a.button.loading::after { top: auto; }

.woocommerce div.product { color: var(--fg); }
.woocommerce div.product div.images img { border-radius: var(--r-lg); background: #fff; }
.woocommerce div.product div.images .flex-control-thumbs li img { border-radius: 8px; margin-top: 8px; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--neon-text); font-family: var(--font-mono); font-size: 24px; }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce div.product form.cart .button { float: none; min-height: 48px; padding: 0 26px; }
.woocommerce div.product form.cart table.variations { width: 100%; }
.woocommerce div.product form.cart .variations label { color: var(--fg); font-weight: 600; }
.woocommerce div.product form.cart .reset_variations { font-size: 13px; }
.woocommerce .quantity .qty { width: 84px; min-height: 48px; text-align: center; }
.woocommerce div.product .product_meta { font-size: 14px; color: var(--mut); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
.woocommerce div.product .product_meta > span { display: block; margin-bottom: 4px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 18px; display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--bg2); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 10px 16px; color: var(--mut); font-weight: 600; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--card); border-color: var(--line2); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--fg); }
.woocommerce div.product .woocommerce-tabs .panel { color: var(--fg); }
.woocommerce table.shop_attributes { border-top-color: var(--line); }
.woocommerce table.shop_attributes th, .woocommerce table.shop_attributes td { border-bottom-color: var(--line); background: transparent !important; color: var(--fg); font-style: normal; padding: 10px 12px; }
.woocommerce table.shop_attributes th { color: var(--mut); font-weight: 500; }
.woocommerce .related > h2, .woocommerce .upsells > h2, .woocommerce .cross-sells > h2 { font-size: 24px; margin: 32px 0 16px; }

.woocommerce .star-rating span::before, .woocommerce p.stars a { color: #FFB020; }
.woocommerce #reviews #comments ol.commentlist li .comment-text { border-color: var(--line); border-radius: var(--r); }
.woocommerce #reviews #comments ol.commentlist li img.avatar { background: var(--bg2); border-color: var(--line); }

.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, p.no-comments {
	background: var(--card) !important; color: var(--fg) !important; border: 1px solid var(--line2); border-top: 3px solid var(--neon); border-radius: var(--r);
}
.woocommerce-error { border-top-color: var(--danger); }
.woocommerce-info { border-top-color: var(--cyan); }
.woocommerce-message::before { color: var(--neon-text); }
.woocommerce-info::before { color: var(--cyan); }
.woocommerce-message .button, .woocommerce-info .button { min-height: 36px !important; }

.woocommerce table.shop_table { border-color: var(--line); border-radius: var(--r); background: var(--card); color: var(--fg); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td, .woocommerce table.shop_table tbody th, .woocommerce table.shop_table tfoot td, .woocommerce table.shop_table tfoot th { border-color: var(--line); }
.woocommerce-cart table.cart img { width: 64px; border-radius: 8px; background: #fff; }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-checkout #order_review, .woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register {
	border-color: var(--line); border-radius: var(--r-lg);
}
.woocommerce-checkout #payment, .woocommerce-checkout #payment div.payment_box { background: var(--bg2); color: var(--fg); border-radius: var(--r); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--bg2); }
.woocommerce-checkout #payment ul.payment_methods { border-bottom-color: var(--line); }
.woocommerce form .form-row label { color: var(--fg); }
.woocommerce form .form-row .input-text, .woocommerce form .form-row select { background: var(--card); color: var(--fg); }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.woocommerce-account .woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); text-decoration: none; }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { border-color: var(--neon); }

/* select2 (country / state pickers) */
.select2-container--default .select2-selection--single { min-height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--fg); line-height: 42px; padding-left: 14px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
.select2-dropdown { background: var(--card); border-color: var(--line2); color: var(--fg); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--neon); color: var(--on-neon); }
.select2-search--dropdown .select2-search__field { background: var(--bg2); color: var(--fg); }

/* Block cart / checkout follow the theme's text colour */
.wc-block-components-totals-wrapper, .wc-block-components-panel, .wc-block-cart, .wc-block-checkout { border-color: var(--line) !important; }
.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input { background: var(--card) !important; color: var(--fg) !important; border-color: var(--line2) !important; }
.wc-block-components-text-input label, .wc-block-components-combobox label { color: var(--mut) !important; }

/* Mini price in the header cart etc. */
.woocommerce .amount { font-variant-numeric: tabular-nums; }

/* Responsive ------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.woocommerce ul.products.columns-4, .woocommerce ul.products.columns-5, .woocommerce ul.products.columns-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.pcgn-shopf__row { grid-template-columns: minmax(0, 1fr); }
	.woocommerce ul.products[class*="columns-"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 720px) {
	.pcgn-cats__item { width: 104px; padding: 8px; }
	.pcgn-cats__img { width: 56px; height: 56px; }
	.pcgn-cats__name { font-size: 13px; }
	.pcgn-rail__btn { display: none; }
	.pcgn-shopf__top { padding: 10px 12px; gap: 10px; }
	.pcgn-shopf__sort { margin-left: 0; width: 100%; order: 5; }
	.pcgn-shopf__sort select { width: 100%; min-width: 0; }
	.pcgn-shopf__panel { padding: 12px; }
	.woocommerce ul.products li.product { padding: 8px; }
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; }
	.woocommerce ul.products li.product .button { min-height: 38px; padding: 0 10px; font-size: 14px; }
	.woocommerce div.product div.images, .woocommerce div.product div.summary { float: none; width: 100%; }
}
.woocommerce ul.products li.product .button, .woocommerce div.product form.cart .button { display: flex !important; align-items: center; justify-content: center; line-height: 1.2; padding-top: 0; padding-bottom: 0; }
.woocommerce div.product form.cart .button { display: inline-flex !important; }
