/* ─── 7. PRODUCT GRID (Archive/Shop) ────────────────────── */
/* PLP container: prefer fluid padding, but avoid double-padding in legacy container setups */
.content-area.full-width-shop.container {
    padding: 0;
}

.content-area.full-width-shop.container-fluid {
    padding: 0 var(--sp-xl);
}

@media (max-width: 768px) {
    .content-area.full-width-shop.container-fluid {
        padding: 0 var(--sp-md);
    }
}

/* Category header */
.woocommerce-products-header {
    margin-bottom: var(--sp-md);
    padding: var(--sp-md) 0;
}

.woocommerce-products-header__title {
    margin: 0;
    font-size: var(--fs-2xl);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--lm-dark);
}

.category-intro-text {
    color: var(--lm-muted);
    font-size: var(--fs-sm);
    max-width: 680px;
}

.category-intro-text p {
    margin: 0;
}

/* Amazon subcats */
.lumina-amazon-subcats {
    padding: var(--sp-sm) 0;
    margin-bottom: var(--sp-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.lumina-amazon-subcats::-webkit-scrollbar {
    display: none;
}

.lumina-amazon-subcats ul {
    display: flex;
    gap: var(--sp-sm);
    margin: 0;
    padding: 0;
}

.lumina-amazon-subcats ul li a {
    font-size: var(--fs-xs);
    font-weight: 500;
    padding: 6px 16px;
    border: 1px solid var(--lm-border);
    border-radius: var(--radius-pill);
    background: var(--lm-white);
    color: var(--lm-body);
    display: block;
    white-space: nowrap;
    transition: all var(--duration);
}

.lumina-amazon-subcats ul li a:hover {
    border-color: var(--lm-black);
    background: var(--lm-dark);
    color: var(--lm-white);
}

/* Toolbar */
.shop-toolbar-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-md);
    padding: var(--sp-sm) 0;
    border-bottom: 1px solid var(--lm-border);
}

.triggers-group {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.btn-drawer {
    background: transparent;
    border: 1.5px solid var(--lm-border);
    padding: 8px 18px;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lm-body);
    border-radius: var(--radius-sm);
    transition: all var(--duration);
}

.btn-drawer:hover {
    border-color: var(--lm-black);
    background: var(--lm-black);
    color: var(--lm-white);
}

.btn-drawer .icon {
    font-size: 1rem;
    line-height: 1;
}

.ordering-group select {
    border: 1px solid var(--lm-border);
    padding: 8px 14px;
    font-size: var(--fs-xs);
    border-radius: var(--radius-sm);
    background: var(--lm-white);
    color: var(--lm-body);
}

.woocommerce-result-count {
    color: var(--lm-muted);
    font-size: var(--fs-xs);
}

/* ─── LUMINA: PRODUCT GRID LAYOUT (Fluid / Fashion-first) ─────────────
   Goal: never depend on the HTML width="..." attribute on <img> or a fixed
   columns-* class. The grid adapts to the available width (incl. sidebar).

   - Mobile: force 2 cols (fashion pattern)
   - Tablet: auto-fill with a sane minimum
   - Desktop: auto-fill with larger minimum so cards stay visually strong
--------------------------------------------------------------------- */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 10px;
    margin: 0 0 var(--sp-2xl);
    padding: 0;
    list-style: none;
    width: 100% !important;
    float: none !important;
}

/* Reset legacy Woo widths/floats so grid always governs layout */
ul.products[class*="columns-"] li.product,
ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}

/* Tablet+ / small laptops: fit as many cards as possible, but keep a minimum */
@media (min-width: 600px) {
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 22px 16px;
    }
}

/* Desktop: ensure cards don't become tiny when a sidebar is present */
@media (min-width: 992px) {
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
        gap: 28px 18px;
    }
}

/* Large screens: allow more columns, but keep the product visual strong */
@media (min-width: 1400px) {
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 32px 22px;
    }
}

.lumina-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-thumbnail-wrap {
    position: relative;
    margin-bottom: 12px;
    background: var(--lm-bg-cool);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 0.8; /* Portrait format for shoes */
}

/* Ensure the thumbnail fully uses the available card width/height so images are always cropped (cover). */
.product-card-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.product-card-inner:hover .product-thumbnail-wrap img {
    transform: scale(1.05);
}

.product-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.woocommerce-loop-product__title {
    font-size: var(--fs-sm);
    font-weight: 500;
    margin: 0;
    color: var(--lm-dark);
    line-height: 1.3;
}

.lumina-product-card .price {
    font-size: var(--fs-sm);
    color: var(--lm-muted);
    font-weight: 400;
    display: block;
}

.lumina-loop-sizes {
    font-size: 11px;
    color: var(--lm-light);
    margin-top: 4px;
}

/* Gallery Arrows (hidden by default, shown on hover/touch) */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--lm-dark);
}

.gallery-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.gallery-arrow:hover {
    background: var(--lm-white);
    transform: translateY(-50%) scale(1.1);
}

/* Gallery Dots */
.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
    pointer-events: none;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s;
    backdrop-filter: blur(2px);
}

.gallery-dot.active {
    background: var(--lm-white);
    transform: scale(1.2);
}

/* ─── LUMINA: PLP TOOLBAR (ASOS-like) + ACTIVE FILTER CHIPS ─────────────── */
.lumina-breadcrumbs{ margin-bottom: var(--sp-md); }

.lm-shop-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-sm);
    padding: var(--sp-sm) 0;
    border-bottom: 1px solid var(--lm-border);
}
.lm-shop-toolbar__left{
    display:flex;
    align-items:center;
    gap: 12px;
    min-width:0;
}
.lm-shop-toolbar__right{
    display:flex;
    align-items:center;
    gap: 12px;
}
.lm-result-count{
    color: var(--lm-muted);
    font-size: var(--fs-xs);
    white-space: nowrap;
}

.active-filter-count{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--lm-black);
    color: var(--lm-white);
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}

.lm-clear-filters{
    font-size: var(--fs-xs);
    color: var(--lm-muted);
    text-decoration: underline;
    white-space: nowrap;
}
.lm-clear-filters:hover{ color: var(--lm-black); }

.btn-drawer .icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width: 18px;
    height: 18px;
}
.btn-drawer .icon svg{ width:18px; height:18px; }

/* Chips */
.lm-filter-chips{
    display:flex;
    flex-wrap:wrap;
    gap: 8px;
    margin: 0 0 var(--sp-md);
}
.lm-filter-chip{
    display:inline-flex;
    align-items:center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--lm-border);
    border-radius: 999px;
    background: var(--lm-white);
    color: var(--lm-body);
    font-size: var(--fs-xs);
    line-height: 1;
    transition: all var(--duration);
}
.lm-filter-chip:hover{
    border-color: var(--lm-black);
}
.lm-filter-chip__x{
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
}

/* SEO footer */
.archive-seo-footer{
    margin-top: var(--sp-2xl);
    padding-top: var(--sp-xl);
    border-top: 1px solid var(--lm-border);
    color: var(--lm-muted);
    max-width: 900px;
}
.archive-seo-title{
    font-size: 1.2rem;
    color: var(--lm-dark);
    margin: 0 0 10px;
}

@media (max-width: 768px){
    .lm-shop-toolbar{
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .lm-shop-toolbar__right{
        justify-content: space-between;
    }
    .lm-result-count{
        order: 2;
    }
    .ordering-group{ order: 1; }
}


/* ─────────────────────────────────────────────────────────────
   BADGES (Loop cards)
   ───────────────────────────────────────────────────────────── */
.lm-badges{
	position:absolute;
	top:12px;
	left:12px;
	display:flex;
	flex-direction:column;
	gap:6px;
	z-index:3;
}
.lm-badge{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	padding:6px 10px;
	border-radius:999px;
	font-size:12px;
	font-weight:700;
	letter-spacing:0.02em;
	line-height:1;
	box-shadow:0 10px 22px rgba(0,0,0,0.08);
}
.lm-badge--sale{ background:#111; color:#fff; }
.lm-badge--new{ background:#fff; color:#111; border:1px solid var(--lm-border); }
.lm-badge--oos{ background:#f3f3f3; color:#444; border:1px solid var(--lm-border); }


/* Hide loop gallery arrows on mobile/tablet (they cover image). Swipe/drag still works. */
@media (max-width: 991px), (pointer: coarse) {
  .product-thumbnail-wrap .gallery-arrow { display: none !important; }
}

/* ---------------------------------------------------------
   Premium shop layout (ASOS-like filters on desktop)
--------------------------------------------------------- */

.lm-shop-layout {
	display: grid;
	/* Filters should support the products, not compete with them */
	grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

/* If there are no widgets in "Shop Filters Sidebar", avoid a blank left column */
.lm-shop-layout.lm-no-filters {
	grid-template-columns: 1fr;
}

.lm-shop-sidebar {
	position: sticky;
	top: calc(var(--header-h, 76px) + 16px);
	align-self: start;
	max-height: calc(100vh - var(--header-h, 76px) - 24px);
	overflow: auto;
	padding-right: 10px;
	border-right: 1px solid rgba(0,0,0,0.06);
}

.lm-shop-sidebar .widget {
	margin: 0 0 12px;
	padding: 0 0 12px;
	border-bottom: 1px solid rgba(0,0,0,0.06);
}

.lm-shop-sidebar .widget:last-child {
	border-bottom: 0;
	padding-bottom: 0;
	margin-bottom: 0;
}

/* Compact widget typography so filters don't steal focus */
.lm-shop-sidebar .widget-title,
.lm-shop-sidebar .wp-block-heading,
.lm-shop-sidebar .wc-block-stock-filter__title {
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 8px;
	color: var(--lm-dark);
}

.lm-shop-sidebar .woocommerce-widget-layered-nav-list li {
	margin-bottom: 6px;
}

.lm-shop-sidebar .woocommerce-widget-layered-nav-list li a {
	font-size: var(--fs-xs);
	padding: 4px 0;
}

.lm-shop-sidebar .widget_price_filter .price_slider_amount,
.lm-shop-sidebar .widget_price_filter .price_label {
	font-size: var(--fs-xs);
}

/* Desktop (mouse): show sidebar, hide the drawer trigger to avoid duplicate UI */
@media (min-width: 992px) and (pointer: fine) {
	.lm-shop-layout.lm-has-filters #trigger-filters { display: none; }
}

/* Desktop/Tablet with touch: prefer the drawer UX */
@media (min-width: 992px) and (pointer: coarse) {
	.lm-shop-layout { grid-template-columns: 1fr; }
	.lm-shop-sidebar { display: none; }
}

/* Mobile/Tablet: hide sidebar and keep drawer */
@media (max-width: 991px) {
	.lm-shop-layout { grid-template-columns: 1fr; }
	.lm-shop-sidebar { display: none; }
}

/* Loading state */
.lm-filter-loading #lm-products-wrapper {
	opacity: 0.55;
	pointer-events: none;
}

#lm-products-wrapper.is-loading {
	position: relative;
}

#lm-products-wrapper.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.7);
}

/* Disabled filter items */
.lm-filter-disabled {
	opacity: 0.35;
}
.lm-filter-disabled a {
	pointer-events: none;
}

/* ==========================
   Infinite scroll (PLP)
   ========================== */

html.lm-infinite-enabled #lm-pagination-wrapper {
	display: none;
}

.lm-infinite-scroll {
	margin: 20px 0 44px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.lm-infinite-scroll .lm-load-more {
	appearance: none;
	border: 1px solid var(--lm-border);
	background: var(--lm-bg);
	color: var(--lm-text);
	padding: 12px 18px;
	border-radius: 999px;
	font-weight: 600;
	letter-spacing: .2px;
	transition: transform .12s ease, opacity .12s ease;
}

.lm-infinite-scroll .lm-load-more:hover {
	transform: translateY(-1px);
}

html.lm-infinite-loading .lm-infinite-scroll .lm-load-more {
	opacity: .65;
	pointer-events: none;
}

.lm-infinite-scroll__status {
	font-size: 13px;
	opacity: .8;
	min-height: 16px;
}

@media (max-width: 767px) {
	.lm-infinite-scroll .lm-load-more { width: 100%; max-width: 360px; }
}
