/* Avery's Shop Layout - Main Stylesheet */

:root {
    --asl-primary: #3a5777;
    --asl-primary-hover: #4a6787;
    --asl-secondary: #3a5777;
    --asl-secondary-hover: #4a6787;
    --asl-border: #e0e0e0;
    --asl-text: #333;
    --asl-text-light: #666;
    --asl-bg-light: #f8f8f8;
    --asl-white: #ffffff;
    /* Button colours — overridden by admin settings via inline style */
    --asl-btn-bg: #3a5777;
    --asl-btn-text: #ffffff;
    --asl-btn-hover-bg: #4a6787;
    --asl-btn-hover-text: #ffffff;
    /* Typography */
    --asl-font-heading: 'Playfair Display', Georgia, serif;
    --asl-font-body: 'Open Sans', sans-serif;
}

/* Shop Wrapper - Full Width */
.asl-shop-wrapper {
    display: flex;
    gap: 30px;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Main Content Area - Fills Remaining Space */
.asl-main-content {
    flex: 1;
    min-width: 0;
}

/* Shop Controls - Filter on Left, Rest on Right */
.asl-shop-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--asl-border);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.asl-controls-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-left: auto;
}

.asl-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--asl-border);
    background: var(--asl-white);
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--asl-fs-sort-label);
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-filter-toggle:hover {
    border-color: var(--asl-primary);
    color: var(--asl-primary);
}

.asl-sort-container,
.asl-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.asl-sort-container label,
.asl-per-page label {
    font-size: var(--asl-fs-sort-label);
    color: var(--asl-text);
    font-weight: 500;
    font-family: 'Playfair Display', Georgia, serif;
    white-space: nowrap;
}

.asl-orderby,
.asl-per-page-select {
    padding: 8px 35px 8px 12px;
    border: 1px solid var(--asl-border);
    border-radius: 4px;
    font-size: var(--asl-fs-sort-label);
    background: var(--asl-white);
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23333" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-orderby:focus,
.asl-per-page-select:focus {
    outline: none;
    border-color: var(--asl-primary);
}

/* Top Pagination */
.asl-top-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.asl-top-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--asl-border);
    border-radius: 4px;
    color: var(--asl-text);
    text-decoration: none;
    font-size: var(--asl-fs-results-count);
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-top-pagination .page-numbers:hover {
    background: var(--asl-primary);
    color: var(--asl-white);
    border-color: var(--asl-primary);
}

.asl-top-pagination .page-numbers.current {
    background: var(--asl-primary);
    color: var(--asl-white);
    border-color: var(--asl-primary);
}

/* Sidebar - NOT Sticky, Scrolls with Page */
.asl-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.asl-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.asl-sidebar-header h3 {
    font-size: var(--asl-fs-filter-heading);
    font-weight: 600;
    margin: 0;
    color: var(--asl-text);
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--asl-text);
}

/* Filter Sections */
.asl-filter-section {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--asl-border);
    padding-bottom: 15px;
}

.asl-filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 12px 0;
    font-size: var(--asl-fs-filter-title);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    text-transform: capitalize;
    color: var(--asl-text);
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-filter-title:hover {
    color: var(--asl-primary);
}

.asl-arrow {
    transition: transform 0.3s ease;
}

.asl-filter-section.collapsed .asl-arrow {
    transform: rotate(-90deg);
}

.asl-filter-section.collapsed .asl-filter-content {
    display: none;
}

.asl-filter-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asl-filter-option {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 0 10px;
    cursor: pointer;
    padding: 6px 0;
    font-size: var(--asl-fs-filter-option);
    color: var(--asl-text);
    transition: color 0.2s ease;
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-filter-option span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asl-count {
    color: var(--asl-text-light);
    font-size: var(--asl-fs-filter-count);
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 4px;
    font-variant-numeric: tabular-nums;
    min-width: 18px;
    text-align: right;
    white-space: nowrap;
}

.asl-filter-option:hover {
    color: var(--asl-primary);
}

.asl-filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--asl-primary);
}

.asl-hidden {
    display: none !important;
}

.asl-show-more {
    background: none;
    border: none;
    color: var(--asl-primary);
    cursor: pointer;
    font-size: var(--asl-fs-filter-count);
    padding: 8px 0;
    text-decoration: underline;
    font-weight: 500;
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-show-more:hover {
    color: var(--asl-primary-hover);
}

/* "Others" sub-heading inside attribute filters */
.asl-filter-others-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--asl-text-light);
    margin: 10px 0 4px;
    padding-top: 8px;
    border-top: 1px solid var(--asl-border);
}

.asl-rating-stars {
    color: #fed529;
    font-size: 16px;
    letter-spacing: 2px;
}

/* Filter Actions */
.asl-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.asl-clear-filters,
.asl-apply-filters {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--asl-border);
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--asl-fs-filter-buttons);
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-clear-filters {
    background: var(--asl-white);
    color: var(--asl-text);
}

.asl-clear-filters:hover {
    background: var(--asl-bg-light);
}

.asl-apply-filters {
    background: var(--asl-primary);
    color: var(--asl-white);
    border-color: var(--asl-primary);
}

.asl-apply-filters:hover {
    background: var(--asl-primary-hover);
}

/* Products Grid - 3 Columns, Fills Space */
.asl-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.asl-product-card {
    background: var(--asl-white);
    border: 1px solid var(--asl-border);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.asl-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

/* ── Image wrap ── */
.asl-card-image-wrap {
    position: relative;
    background: #f5f3ef;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
}

.asl-card-image-wrap > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.asl-card-image-wrap img {
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* ── Badges: stacked top-left, overlaid on image ── */
.asl-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 2;
}

.asl-badge {
    display: inline-block;
    padding: 4px 9px;
    font-size: var(--asl-fs-badge);
    font-weight: 700;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 2px;
    color: #fff;
    line-height: 1.5;
}

.asl-badge-offer  { background: #7a1c2e; }
.asl-badge-press  { background: #7a1c2e; }

/* ── Wishlist button ── */
.asl-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.9);
    color: #aaa;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: color .15s, border-color .15s;
    padding: 0;
}

.asl-wishlist-btn:hover {
    color: #7a1c2e;
    border-color: #7a1c2e;
    background: #fff;
}

/* ── Stock warning ── */
.asl-product-card .asl-stock-warning,
.asl-stock-warning {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    background: #3a5777 !important;
    color: #fff !important;
    padding: 3px 8px !important;
    border-radius: 2px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif) !important;
}

/* ── Card body ── */
.asl-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 0;
}

/* ── Meta bar: Country (left) + ABV (right) ── */
.asl-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    font-size: var(--asl-fs-meta, 14px);
    margin-bottom: 12px;
}

.asl-meta-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.asl-meta-abv {
    font-size: var(--asl-fs-meta, 14px);
    color: var(--asl-text);
    font-weight: 400;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    white-space: nowrap;
}

.asl-meta-country {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.asl-meta-country .asl-country-flag { gap: 4px; }

.asl-meta-country .asl-country-name {
    font-size: var(--asl-fs-meta, 14px);
    font-weight: 400;
    color: var(--asl-text);
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    line-height: 1;
}

.asl-meta-country .asl-flag-img { width: 24px !important; }

/* Emoji fallback shown only when flag image fails */
.asl-flag-emoji {
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
}

.asl-flag-emoji-fallback {
    font-size: 18px;
}

.asl-dietary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    border: 1.5px solid currentColor;
    flex-shrink: 0;
}

.asl-dietary-v  { color: #2e7d32; }
.asl-dietary-vg { color: #1b5e20; }

/* ── Title ── */
.asl-product-title {
    font-size: var(--asl-fs-title, 22px);
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.4;
    color: var(--asl-text);
    font-family: 'Playfair Display', Georgia, serif !important;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: calc(1.4em * 2);
}

.asl-product-title a {
    color: var(--asl-text);
    text-decoration: none;
}

.asl-product-title a:hover { color: var(--asl-secondary); }

/* ── Rating row ── */
.asl-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.asl-stars {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}

.asl-star {
    font-size: 18px;
    line-height: 1;
}

.asl-star-full  { color: #fed529; }
.asl-star-half  { color: #fed529; opacity: 0.5; }
.asl-star-empty { color: #ddd; }

.asl-product-rating .star-rating {
    font-size: 16px;
    line-height: 1;
    overflow: visible;
    width: auto !important;
    float: none;
}

.asl-rating-count {
    font-size: 13px;
    color: var(--asl-text-light);
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
}

.asl-rating-none {
    font-size: 14px;
    color: var(--asl-text-light);
    font-style: italic;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
}

/* ── Short description excerpt ── */
.asl-product-excerpt {
    font-size: 14px;
    font-style: italic;
    color: var(--asl-text-light);
    line-height: 1.55;
    margin: 0 0 16px;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Divider ── */
.asl-card-divider {
    border: none;
    border-top: 1px solid var(--asl-border);
    margin: 0 0 12px;
}

/* ── Price rows ── */
.asl-product-price-wrapper {
    margin-bottom: 16px;
    margin-top: auto;
    text-align: center;
}

.asl-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
}

.asl-price-row + .asl-price-row {
    margin-top: 4px;
}

.asl-price-amount {
    font-size: var(--asl-fs-price, 24px);
    font-weight: 700;
    color: var(--asl-text);
    font-family: 'Playfair Display', Georgia, serif !important;
}

/* WooCommerce price HTML sits inside .asl-price-amount */
.asl-price-amount .woocommerce-Price-amount,
.asl-price-amount bdi {
    font-size: var(--asl-fs-price, 24px);
    font-weight: 700;
    color: var(--asl-text);
    font-family: 'Playfair Display', Georgia, serif !important;
}

.asl-price-amount del {
    display: inline-block;
    font-size: 0.75em;
    line-height: 1.2;
    color: var(--asl-text-light);
    font-weight: 400;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    vertical-align: baseline;
}

.asl-price-amount del .woocommerce-Price-amount,
.asl-price-amount del bdi {
    font-size: 1em;
    line-height: inherit;
}

.asl-price-amount ins { text-decoration: none; }

.asl-price-label {
    font-size: 14px;
    color: var(--asl-text-light);
    font-weight: 400;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    align-self: flex-end;
    padding-bottom: 3px;
}

.asl-price-row--case .asl-price-amount {
    font-size: calc(var(--asl-fs-price) * 0.85);
}

.asl-member-price {
    font-size: 13px;
    color: var(--asl-text-light);
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    margin-top: 6px;
}

.asl-member-price strong { color: var(--asl-primary); }

/* ── Custom Add to Basket form — centred ── */
.custom-atc-form-x {
    margin: 0;
    padding: 0;
    text-align: center;
}

.custom-atc-row-x {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.custom-qty-label-x {
    font-size: 13px;
    color: var(--asl-text-light);
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    white-space: nowrap;
}

.custom-qty-wrapper-x-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-qty-wrapper-x {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.custom-qty-btn-x {
    width: 36px;
    height: 36px;
    border: 1px solid var(--asl-border);
    border-radius: 4px;
    background: var(--asl-white);
    cursor: pointer;
    font-size: 20px;
    color: var(--asl-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.custom-qty-btn-x:hover {
    background: var(--asl-bg-light);
    border-color: #aaa;
}

.custom-minus-x::after { content: '−'; }
.custom-plus-x::after  { content: '+'; }

.custom-qty-number-x {
    width: 28px;
    height: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    color: var(--asl-text);
    padding: 0;
    -moz-appearance: textfield;
}

.custom-qty-number-x:focus {
    outline: none;
}

.custom-add-btn-x {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 12px;
    background: var(--asl-btn-bg);
    color: var(--asl-btn-text);
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 16px;
}

.custom-add-btn-x:hover {
    background: var(--asl-btn-hover-bg);
}

/* ── Add to Cart Button (legacy WC loop button — hidden, replaced by custom form) ── */
.asl-product-card .button,
.asl-product-card .added_to_cart,
.asl-product-card a.button,
.asl-product-card button.button {
    width: 100% !important;
    margin: auto 0 18px !important;
    padding: 14px 20px !important;
    background: var(--asl-btn-bg) !important;
    background-color: var(--asl-btn-bg) !important;
    color: var(--asl-btn-text) !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-family: var(--asl-font-body) !important;
    line-height: 1 !important;
    letter-spacing: 0.05em !important;
    /* Always visible — override any theme that hides the button until card hover */
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    transform: none;
}

/* Ensure WooCommerce's add-to-cart form wrapper doesn't hide the button either */
.asl-product-card form.cart,
.asl-product-card .woocommerce-loop-product__link ~ form,
.asl-product-card .product_type_simple,
.asl-product-card .add_to_cart_button {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.asl-product-card .button:hover,
.asl-product-card .added_to_cart:hover,
.asl-product-card a.button:hover,
.asl-product-card button.button:hover {
    background: var(--asl-btn-hover-bg) !important;
    background-color: var(--asl-btn-hover-bg) !important;
    color: var(--asl-btn-hover-text) !important;
    transform: translateY(-1px) !important;
    opacity: 1 !important;
}

.asl-product-card .added_to_cart {
    background: #28a745 !important;
    background-color: #28a745 !important;
}

/* Bottom Pagination */
.asl-pagination {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--asl-border);
}

.asl-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.asl-pagination li {
    margin: 0;
}

.asl-pagination a,
.asl-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--asl-border);
    border-radius: 4px;
    color: var(--asl-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.asl-pagination a:hover {
    background: var(--asl-primary);
    color: var(--asl-white);
    border-color: var(--asl-primary);
}

.asl-pagination .current {
    background: var(--asl-primary);
    color: var(--asl-white);
    border-color: var(--asl-primary);
}

.asl-no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: var(--asl-text-light);
    font-family: 'Open Sans', sans-serif;
}

/* Loading State */
.asl-loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.asl-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--asl-border);
    border-top-color: var(--asl-primary);
    border-radius: 50%;
    animation: asl-spin 0.8s linear infinite;
}

@keyframes asl-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */

/* Large tablets / small desktops — keep 3 columns */
@media (max-width: 1200px) {
    .asl-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

/* Tablets — slide-in sidebar, 2-column grid */
@media (max-width: 992px) {
    .asl-shop-wrapper {
        flex-direction: column;
        padding: 15px;
        gap: 0;
    }

    /* Sidebar becomes an off-canvas drawer */
    .asl-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: var(--asl-white);
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
        transition: left 0.3s ease;
    }

    .asl-sidebar.active {
        left: 0;
    }

    .asl-sidebar-close {
        display: block;
    }

    /* Force correct font in mobile sidebar */
    .asl-sidebar,
    .asl-filter-title,
    .asl-filter-option,
    .asl-filter-option span,
    .asl-show-more,
    .asl-count {
        font-family: 'Playfair Display', Georgia, serif !important;
    }

    .asl-filter-toggle {
        display: flex;
    }

    .asl-shop-controls {
        padding: 12px 0;
        margin-bottom: 20px;
    }

    /* Sticky apply/clear inside drawer */
    .asl-filter-actions {
        position: sticky;
        bottom: 0;
        background: var(--asl-white);
        padding: 15px 0 16px;
        border-top: 1px solid var(--asl-border);
        z-index: 10000;
        margin-bottom: 80px;
    }

    /* Controls bar */
    .asl-shop-controls {
        padding: 12px 0;
        margin-bottom: 20px;
        gap: 10px;
    }

    .asl-controls-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .asl-top-pagination {
        display: none;
    }

    /* 2-column grid */
    .asl-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Scale down oversized type inside cards */
    .asl-product-title {
        font-size: 14px;
        min-height: unset;
    }
}

/* Mobile landscape / large phones */
@media (max-width: 768px) {
    .asl-shop-wrapper {
        padding: 10px;
    }

    .asl-shop-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Sort + per-page sit side by side */
    .asl-controls-right {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .asl-sort-container,
    .asl-per-page {
        flex: 1 1 calc(50% - 4px);
        min-width: 130px;
    }

    .asl-orderby,
    .asl-per-page-select {
        width: 100%;
        max-width: 100%;
        padding: 8px 30px 8px 10px;
        font-size: 13px;
    }

    .asl-sort-container label,
    .asl-per-page label {
        font-size: 13px;
        white-space: nowrap;
    }

    /* Cards */
    .asl-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .asl-card-body {
        padding: 10px 10px 0;
    }

    .asl-product-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .asl-product-meta {
        margin-bottom: 6px;
        font-size: 11.5px;
    }

    .asl-price-amount,
    .asl-price-amount .woocommerce-Price-amount,
    .asl-price-amount bdi {
        font-size: 17px;
    }

    .asl-price-label {
        font-size: 12px;
    }

    /* Tighter custom ATC form on small cards */
    .custom-add-btn-x {
        font-size: 11px;
        padding: 0 10px;
        letter-spacing: 0.3px;
    }

    .custom-qty-btn-x {
        width: 26px;
    }

    .custom-qty-number-x {
        width: 28px;
        font-size: 13px;
    }

    .asl-stock-warning,
    .asl-product-card .asl-stock-warning {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }

    .asl-country-name {
        font-size: 11px;
    }
}

/* Small phones — single column */
@media (max-width: 480px) {
    .asl-shop-wrapper {
        padding: 8px;
    }

    .asl-products-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Sort / per-page stack vertically on very small screens */
    .asl-sort-container,
    .asl-per-page {
        flex: 1 1 100%;
    }

    .asl-filter-toggle {
        width: 100%;
        justify-content: center;
    }

    .asl-flag-img {
        width: 20px !important;
    }
}

/* Sidebar Overlay for Mobile */
.asl-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.asl-sidebar-overlay.active {
    display: block;
}

/* ── Mobile fixed filter button ── */
@media (max-width: 992px) {
    .asl-filter-toggle {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9997;
        background: var(--asl-primary);
        color: #fff;
        border: none;
        border-radius: 30px;
        padding: 14px 32px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
        font-size: 15px;
        font-weight: 700;
        font-family: 'Playfair Display', Georgia, serif;
        white-space: nowrap;
        width: auto;
        justify-content: center;
    }

    .asl-filter-toggle:hover {
        background: var(--asl-primary-hover);
        color: #fff;
        border-color: transparent;
    }

    /* Add padding to bottom of product grid so last card isn't hidden behind button */
    .asl-main-content {
        padding-bottom: 80px;
    }
}

/* ── Force correct colour on sort/per-page selects ── */
.asl-orderby,
.asl-per-page-select,
.asl-orderby option,
.asl-per-page-select option {
    color: var(--asl-text) !important;
    font-family: 'Playfair Display', Georgia, serif !important;
}

/* ═══════════════════════════════════════════════════
   FEATURED PRODUCT SLIDER  [averys_featured_slider]
   ═══════════════════════════════════════════════════ */
.asl-featured-slider-wrap {
    position: relative;
    padding: 0 44px 40px;
}

.asl-featured-slider-wrap {
    position: relative;
    padding: 0 44px;
}

.asl-featured-slider-wrap .swiper {
    padding-bottom: 50px !important;
    overflow: hidden !important;
}

.asl-featured-slider-wrap .swiper-wrapper {
    align-items: stretch;
}

.asl-featured-slider-wrap .swiper-slide {
    height: auto;
}

/* ── Slide card ── */
.asl-fs-card {
    background: var(--asl-white, #fff);
    border: 1px solid var(--asl-border, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Image ── */
.asl-fs-image-link {
    display: block;
    text-decoration: none;
}

.asl-fs-image-wrap {
    background: #f5f3ef;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.asl-fs-image-wrap img {
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
}

/* ── Body ── */
.asl-fs-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
    gap: 10px;
}

.asl-fs-title {
    font-size: min(var(--asl-fs-title, 22px), 20px);
    line-height: 1.3;
    min-height: calc(1.3em * 2);
    height: calc(1.3em * 2);
    margin-bottom: 0;
}

/* ── Excerpt ── */
.asl-fs-excerpt {
    font-size: 13px;
    font-style: italic;
    color: var(--asl-text-light, #666);
    line-height: 1.55;
    margin: 0;
    min-height: calc(1.55em * 3);
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Price ── */
.asl-fs-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.asl-fs-price-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--asl-text, #333);
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-fs-price-amount .woocommerce-Price-amount,
.asl-fs-price-amount bdi {
    font-size: 22px;
    font-weight: 700;
    font-family: 'Playfair Display', Georgia, serif;
}

.asl-fs-price-amount del {
    display: inline-block;
    font-size: 0.75em;
    line-height: 1.2;
    color: var(--asl-text-light, #666);
    font-weight: 400;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    vertical-align: baseline;
}

.asl-fs-price-amount del .woocommerce-Price-amount,
.asl-fs-price-amount del bdi {
    font-size: 1em;
    line-height: inherit;
}

.asl-fs-price-label {
    font-size: 13px;
    color: var(--asl-text-light, #666);
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
}

/* ── View Product button ── */
.asl-fs-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: var(--asl-btn-bg, #3a5777);
    color: var(--asl-btn-text, #fff) !important;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--asl-font-body, 'Open Sans', sans-serif);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease;
    box-sizing: border-box;
}

.asl-fs-btn:hover {
    background: var(--asl-btn-hover-bg, #4a6787);
    color: var(--asl-btn-hover-text, #fff) !important;
}

/* ── Swiper nav overrides ── */
.asl-featured-slider-wrap .swiper-button-prev,
.asl-featured-slider-wrap .swiper-button-next {
    color: var(--asl-primary, #3a5777);
    width: 28px;
    height: 28px;
    margin-top: -14px;
    top: calc(50% - 20px);
}

.asl-featured-slider-wrap .swiper-button-prev {
    left: 6px;
}

.asl-featured-slider-wrap .swiper-button-next {
    right: 6px;
}

.asl-featured-slider-wrap .swiper-button-prev:after,
.asl-featured-slider-wrap .swiper-button-next:after {
    font-size: 22px;
    font-weight: 700;
}

.asl-featured-slider-wrap .swiper-pagination-bullet-active {
    background: var(--asl-primary, #3a5777);
}
