/**
 * HDM Homepage Styles v2.0
 * Premium Homepage Design with Pattern Integration
 * 
 * BRAND GUIDELINES:
 * Brown: #6A4532
 * Gold: #C89737
 * Cream: #FDF9F6
 * 
 * PATTERN ASSETS:
 * - Main Pattern: hdm-Pattern-01.png
 * - Secondary Icon: HDM-secondary-icon-01.png
 * 
 * INSTALLATION:
 * Save to: flatsome-child/assets/css/hdm-homepage.css
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES
   ============================================================================ */

:root {
    --hdm-brown: #6A4532;
    --hdm-brown-dark: #4a2f22;
    --hdm-brown-light: #8B6249;
    --hdm-gold: #C89737;
    --hdm-gold-dark: #a87e2c;
    --hdm-gold-light: #D4A84A;
    --hdm-cream: #FDF9F6;
    --hdm-cream-dark: #F5EFE7;
    --hdm-white: #ffffff;
    --hdm-text: #2d2d2d;
    --hdm-text-muted: #6b7280;
    --hdm-border: #e5e7eb;
    --hdm-success: #10b981;
    --hdm-error: #dc2626;
    
    /* Pattern URLs - Update these with your actual URLs */
    --hdm-pattern-main: url('https://staging.habeshadiasporamarket.co.uk/wp-content/uploads/2026/01/hdm-Pattern-01.png');
    --hdm-pattern-icon: url('https://staging.habeshadiasporamarket.co.uk/wp-content/uploads/2026/01/HDM-secondary-icon-01.png');
}

/* ============================================================================
   GOOGLE FONTS
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ============================================================================
   HOMEPAGE BASE STYLES
   ============================================================================ */

.hdm-homepage {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--hdm-text);
    line-height: 1.6;
}

.hdm-homepage h1,
.hdm-homepage h2,
.hdm-homepage h3,
.hdm-homepage h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

/* ============================================================================
   HERO SECTION WITH PATTERNS
   ============================================================================ */

.hdm-hero-wrapper {
    position: relative;
    overflow: hidden;
}

.hdm-hero-wrapper .ux-banner {
    position: relative;
}

/* Pattern decorations in hero */
.hdm-hero-wrapper::before {
    content: '';
    position: absolute;
    left: -50px;
    top: 20%;
    width: 300px;
    height: 400px;
    background-image: var(--hdm-pattern-main);
    background-size: 120px;
    opacity: 0.08;
    border-radius: 20px;
    transform: rotate(-15deg);
    z-index: 1;
    animation: hdmFloat 8s ease-in-out infinite;
    pointer-events: none;
}

.hdm-hero-wrapper::after {
    content: '';
    position: absolute;
    right: -30px;
    bottom: 10%;
    width: 250px;
    height: 250px;
    background-image: var(--hdm-pattern-icon);
    background-size: 80px;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.12;
    border-radius: 50%;
    z-index: 1;
    animation: hdmRotate 20s linear infinite;
    pointer-events: none;
}

@keyframes hdmFloat {
    0%, 100% { transform: rotate(-15deg) translateY(0); }
    50% { transform: rotate(-12deg) translateY(-20px); }
}

@keyframes hdmRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Hero Content */
.hdm-hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
    animation: hdmFadeInUp 0.8s ease;
}

@keyframes hdmFadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hdm-hero-badge {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(200, 151, 55, 0.4);
}

.hdm-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--hdm-brown);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hdm-hero-title span {
    color: var(--hdm-gold);
    position: relative;
}

.hdm-hero-title span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--hdm-gold), transparent);
    opacity: 0.3;
    border-radius: 4px;
}

.hdm-hero-subtitle {
    font-size: 1.25rem;
    color: var(--hdm-text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hdm-hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================================
   BUTTONS - BRAND ALIGNED
   ============================================================================ */

.hdm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: 'DM Sans', sans-serif;
}

.hdm-btn-primary {
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
    box-shadow: 0 8px 25px rgba(200, 151, 55, 0.35);
}

.hdm-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(200, 151, 55, 0.45);
    color: var(--hdm-white);
}

.hdm-btn-secondary {
    background: var(--hdm-white);
    color: var(--hdm-brown);
    border: 2px solid var(--hdm-brown);
}

.hdm-btn-secondary:hover {
    background: var(--hdm-brown);
    color: var(--hdm-white);
}

/* ============================================================================
   SECTION HEADERS WITH PATTERN ACCENTS
   ============================================================================ */

.hdm-section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.hdm-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.hdm-section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--hdm-brown);
    margin-bottom: 12px;
}

.hdm-section-subtitle {
    font-size: 1.1rem;
    color: var(--hdm-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================================================
   PRODUCT GRID - ULTRA RESPONSIVE
   ============================================================================ */

.hdm-products-grid {
    display: grid;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Column variations */
.hdm-products-grid.hdm-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.hdm-products-grid.hdm-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.hdm-products-grid.hdm-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.hdm-products-grid.hdm-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ============================================================================
   PRODUCT CARD - BRAND ALIGNED
   ============================================================================ */

.hdm-product-card {
    background: var(--hdm-white);
    border: 1px solid var(--hdm-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(106, 69, 50, 0.06);
}

/* Card-level hover effects gated behind @media (hover: hover) to prevent
   sticky-hover on touch devices (tap leaves lifted/scaled state until next
   tap elsewhere). Pre-existing rule, gated as a touch-UX fix. */
@media (hover: hover) {
    .hdm-product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px rgba(106, 69, 50, 0.15);
        border-color: var(--hdm-gold);
    }
}

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

/* Product Image */
.hdm-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--hdm-cream);
}

.hdm-product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.hdm-product-picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hdm-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .hdm-product-card:hover .hdm-product-img {
        transform: scale(1.08);
    }
}

/* Badges */
.hdm-sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(200, 151, 55, 0.4);
}

.hdm-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--hdm-brown) 0%, var(--hdm-brown-dark) 100%);
    color: var(--hdm-white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.hdm-preorder-badge {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

/* Hover Overlay */
.hdm-product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top, 
        rgba(106, 69, 50, 0.92) 0%,
        rgba(106, 69, 50, 0.6) 40%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

@media (hover: hover) {
    .hdm-product-card:hover .hdm-product-overlay {
        opacity: 1;
    }
}

.hdm-product-actions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 0;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

@media (hover: hover) {
    .hdm-product-card:hover .hdm-product-actions {
        transform: translateY(0);
    }
}

/* Action Buttons */
.hdm-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--hdm-brown);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    pointer-events: auto !important;
    z-index: 10;
}

.hdm-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hdm-btn-icon {
    font-size: 26px;
    line-height: 1;
}

.hdm-btn-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Customize Button - Purple */
.hdm-btn-customize {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: var(--hdm-white);
}

.hdm-btn-customize:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    color: var(--hdm-white);
}

/* Add to Cart Button - Gold */
.hdm-btn-add-cart {
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
}

.hdm-btn-add-cart:hover {
    background: linear-gradient(135deg, var(--hdm-gold-dark) 0%, #8a6623 100%);
    color: var(--hdm-white);
}

.hdm-btn-add-cart.loading {
    opacity: 0.7;
    cursor: wait;
}

.hdm-btn-add-cart.added {
    background: linear-gradient(135deg, var(--hdm-success) 0%, #059669 100%);
}

/* View Details Button */
.hdm-btn-view {
    background: rgba(255, 255, 255, 0.98);
    color: var(--hdm-brown);
}

.hdm-btn-view:hover {
    background: var(--hdm-cream);
    color: var(--hdm-gold);
}

/* Mobile Quick Add */
.hdm-mobile-quick-add {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    border: 3px solid var(--hdm-white);
    border-radius: 50%;
    color: var(--hdm-white);
    font-size: 22px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(200, 151, 55, 0.5);
    z-index: 3;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hdm-mobile-quick-add:active {
    transform: scale(0.92);
}

.hdm-mobile-quick-add.loading {
    background: #9ca3af;
    pointer-events: none;
}

.hdm-mobile-quick-add.added {
    background: var(--hdm-success);
}

.hdm-mobile-customize {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

/* Product Info */
.hdm-product-info {
    padding: 16px 18px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.hdm-product-title-link {
    text-decoration: none;
    color: inherit;
}

.hdm-product-title-link:hover {
    color: var(--hdm-gold);
}

.hdm-product-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--hdm-text);
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    transition: color 0.2s ease;
}

.hdm-product-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--hdm-brown);
    margin-top: auto;
}

.hdm-product-price del {
    color: #9ca3af;
    font-weight: 400;
    margin-right: 8px;
    font-size: 14px;
}

.hdm-product-price ins {
    text-decoration: none;
    color: var(--hdm-gold);
}

/* Out of Stock */
.hdm-product-card.out-of-stock {
    opacity: 0.75;
}

.hdm-product-card.out-of-stock .hdm-product-img {
    filter: grayscale(30%);
}

/* No Products Message */
.hdm-no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--hdm-text-muted);
    font-size: 1.1rem;
    background: var(--hdm-cream);
    border-radius: 12px;
    grid-column: 1 / -1;
}

/* ============================================================================
   VALUE PROPOSITIONS SECTION
   ============================================================================ */

.hdm-value-props {
    position: relative;
    overflow: hidden;
}

/* Pattern decoration */
.hdm-value-props::before {
    content: '';
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    height: 350px;
    background-image: var(--hdm-pattern-main);
    background-size: 100px;
    opacity: 0.06;
    border-radius: 50%;
    animation: hdmRotate 25s linear infinite;
    pointer-events: none;
}

.hdm-value-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.hdm-value-card {
    text-align: center;
    padding: 32px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.hdm-value-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
}

.hdm-value-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
}

.hdm-value-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--hdm-white);
    margin-bottom: 8px;
}

.hdm-value-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin: 0;
}

/* ============================================================================
   VENDOR CTA SECTION WITH PATTERNS
   ============================================================================ */

.hdm-vendor-cta {
    position: relative;
    overflow: hidden;
}

/* Multiple pattern layers */
.hdm-vendor-cta::before {
    content: '';
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%) rotate(15deg);
    width: 300px;
    height: 400px;
    background-image: var(--hdm-pattern-main);
    background-size: 100px;
    opacity: 0.05;
    border-radius: 20px;
    pointer-events: none;
}

.hdm-vendor-cta::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: 20%;
    width: 200px;
    height: 200px;
    background-image: var(--hdm-pattern-icon);
    background-size: 60px;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08;
    animation: hdmFloat 6s ease-in-out infinite;
    pointer-events: none;
}

.hdm-vendor-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    margin-bottom: 20px;
}

.hdm-vendor-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--hdm-brown);
    margin-bottom: 16px;
}

.hdm-vendor-text {
    font-size: 1.1rem;
    color: var(--hdm-text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Vendor Steps */
.hdm-vendor-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.hdm-step-card {
    background: var(--hdm-white);
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(106, 69, 50, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.hdm-step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(106, 69, 50, 0.15);
}

.hdm-step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(200, 151, 55, 0.4);
}

.hdm-step-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--hdm-brown);
    margin-bottom: 10px;
}

.hdm-step-text {
    font-size: 0.9rem;
    color: var(--hdm-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ============================================================================
   NEWSLETTER SECTION WITH PATTERN
   ============================================================================ */

.hdm-newsletter {
    background: linear-gradient(135deg, var(--hdm-brown) 0%, var(--hdm-brown-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hdm-newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hdm-pattern-main);
    background-size: 150px;
    opacity: 0.04;
    pointer-events: none;
}

.hdm-newsletter-wrapper {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hdm-newsletter-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    color: var(--hdm-white);
    margin-bottom: 12px;
}

.hdm-newsletter-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

.hdm-newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.hdm-newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 16px 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--hdm-white);
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s ease;
}

.hdm-newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hdm-newsletter-input:focus {
    outline: none;
    border-color: var(--hdm-gold);
    background: rgba(255, 255, 255, 0.15);
}

.hdm-newsletter-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--hdm-gold) 0%, var(--hdm-gold-dark) 100%);
    color: var(--hdm-white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 6px 20px rgba(200, 151, 55, 0.4);
}

.hdm-newsletter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(200, 151, 55, 0.5);
}

/* ============================================================================
   TRUST BADGES SECTION
   ============================================================================ */

.hdm-trust-section {
    position: relative;
}

.hdm-trust-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}

.hdm-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hdm-brown);
}

.hdm-trust-icon {
    font-size: 1.5rem;
}

/* ============================================================================
   BLOG SECTION
   ============================================================================ */

.hdm-blog-section {
    position: relative;
}

/* ============================================================================
   RESPONSIVE: DESKTOP L (1920px+)
   ============================================================================ */

@media (min-width: 1920px) {
    .hdm-products-grid.hdm-columns-4 {
        gap: 32px;
    }
    
    .hdm-product-title {
        font-size: 17px;
    }
    
    .hdm-product-price {
        font-size: 19px;
    }
}

/* ============================================================================
   RESPONSIVE: TABLET (768px - 1023px)
   ============================================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .hdm-products-grid.hdm-columns-4,
    .hdm-products-grid.hdm-columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hdm-products-grid {
        gap: 12px;
    }
    
    .hdm-value-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hdm-vendor-steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .hdm-product-info {
        padding: 14px 14px 16px;
    }
    
    .hdm-product-title {
        font-size: 14px;
        min-height: 40px;
    }
    
    .hdm-product-price {
        font-size: 15px;
    }
    
    .hdm-action-btn {
        padding: 14px 16px;
    }
    
    .hdm-btn-icon {
        font-size: 22px;
    }
    
    .hdm-hero-wrapper::before,
    .hdm-hero-wrapper::after {
        display: none;
    }
}

/* ============================================================================
   RESPONSIVE: MOBILE L (480px - 767px)
   ============================================================================ */

@media (min-width: 480px) and (max-width: 767px) {
    .hdm-products-grid.hdm-columns-3,
    .hdm-products-grid.hdm-columns-4,
    .hdm-products-grid.hdm-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hdm-products-grid {
        gap: 8px;
    }
    
    .hdm-product-overlay {
        display: none !important;
    }
    
    .hdm-mobile-quick-add {
        display: flex !important;
    }
    
    .hdm-value-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .hdm-vendor-steps {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
    }
    
    .hdm-product-info {
        padding: 12px 12px 14px;
    }
    
    .hdm-product-title {
        font-size: 13px;
        min-height: 36px;
    }
    
    .hdm-product-price {
        font-size: 14px;
    }
    
    .hdm-hero-cta-group {
        flex-direction: column;
        align-items: center;
    }
    
    .hdm-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hdm-hero-wrapper::before,
    .hdm-hero-wrapper::after,
    .hdm-vendor-cta::before,
    .hdm-vendor-cta::after {
        display: none;
    }
}

/* ============================================================================
   RESPONSIVE: MOBILE M (375px - 479px)
   ============================================================================ */

@media (min-width: 375px) and (max-width: 479px) {
    .hdm-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .hdm-product-overlay {
        display: none !important;
    }
    
    .hdm-mobile-quick-add {
        display: flex !important;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .hdm-value-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hdm-value-card {
        padding: 24px 16px;
    }
    
    .hdm-product-info {
        padding: 10px 10px 12px;
    }
    
    .hdm-product-title {
        font-size: 12px;
        min-height: 34px;
    }
    
    .hdm-product-price {
        font-size: 13px;
    }
    
    .hdm-sale-badge,
    .hdm-stock-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .hdm-newsletter-form {
        flex-direction: column;
    }
    
    .hdm-newsletter-input {
        min-width: 100%;
    }
    
    .hdm-trust-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}

/* ============================================================================
   RESPONSIVE: MOBILE S (320px - 374px)
   ============================================================================ */

@media (max-width: 374px) {
    .hdm-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .hdm-product-card {
        border-radius: 10px;
    }
    
    .hdm-product-overlay {
        display: none !important;
    }
    
    .hdm-mobile-quick-add {
        display: flex !important;
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 8px;
        right: 8px;
    }
    
    .hdm-product-info {
        padding: 8px 8px 10px;
    }
    
    .hdm-product-title {
        font-size: 11px;
        min-height: 30px;
    }
    
    .hdm-product-price {
        font-size: 12px;
    }
    
    .hdm-sale-badge {
        font-size: 9px;
        padding: 3px 8px;
        top: 8px;
        left: 8px;
    }
    
    .hdm-stock-badge {
        font-size: 9px;
        padding: 3px 8px;
        top: 8px;
        right: 8px;
    }
    
    .hdm-hero-title {
        font-size: 2rem;
    }
    
    .hdm-hero-subtitle {
        font-size: 1rem;
    }
    
    .hdm-section-title {
        font-size: 1.75rem;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.hdm-product-image-link:focus-visible,
.hdm-action-btn:focus-visible,
.hdm-mobile-quick-add:focus-visible,
.hdm-product-title-link:focus-visible {
    outline: 3px solid var(--hdm-gold);
    outline-offset: 2px;
}

/* ============================================================================
   END HDM HOMEPAGE STYLES v2.0
   ============================================================================ */


/* ============================================================================
   ============================================================================
   SHOP / ARCHIVE PAGE ENHANCEMENTS v1.0
   Based on House of Bruar Audit — February 2026
   ============================================================================
   ============================================================================ */


/* ============================================================================
   ENHANCEMENT 1: FULL-WIDTH DESKTOP LAYOUT
   Problem: Product grid cramped, not using full screen width
   Fix: Expand wrapper, override Flatsome constraints, add 5-col on wide screens
   ============================================================================ */

/* --- Page-level wrapper (applied to .hdm-shop-wrapper or parent container) --- */
.hdm-shop-wrapper,
.hdm-shop-wrap {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 30px !important;
    box-sizing: border-box !important;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Override Flatsome .row / .container max-width on shop pages */
body.woocommerce.archive .row,
body.woocommerce.archive .container,
body.woocommerce.archive .row-main,
body.post-type-archive-product .row,
body.post-type-archive-product .container,
body.post-type-archive-product .row-main,
body.tax-product_cat .row,
body.tax-product_cat .container,
body.tax-product_cat .row-main {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Shop grid: sidebar + product area */
.hdm-shop-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    width: 100%;
}

/* Ensure products grid stretches fully */
.hdm-products-grid {
    width: 100%;
}

/* Wide screens (≥1440px) — 3 columns with sidebar, full width */
@media (min-width: 1440px) {
    .hdm-shop-wrapper,
    .hdm-shop-wrap {
        max-width: 100% !important;
        padding: 0 40px !important;
    }

    .hdm-products-grid,
    .hdm-products-grid.hdm-columns-4,
    .hdm-products-grid.hdm-columns-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Ultrawide (≥1600px) — 4 columns (280px sidebar + gap leaves ~1200px for grid) */
@media (min-width: 1600px) {
    .hdm-products-grid,
    .hdm-products-grid.hdm-columns-3,
    .hdm-products-grid.hdm-columns-4,
    .hdm-products-grid.hdm-columns-5 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Standard desktop (1024–1439px) — 3 columns */
@media (min-width: 1024px) and (max-width: 1439px) {
    .hdm-products-grid,
    .hdm-products-grid.hdm-columns-3,
    .hdm-products-grid.hdm-columns-4,
    .hdm-products-grid.hdm-columns-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Collapse sidebar on tablet */
@media (max-width: 1023px) {
    .hdm-shop-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================================
   ENHANCEMENT 2: SORT BAR VISIBLE ON DESKTOP
   Problem: .hdm-mobile-bar hidden above 991px — sort/filter controls invisible
   Fix: Force visible at all widths, style as filter-bar
   ============================================================================ */

.hdm-mobile-bar,
.hdm-filter-bar {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    background: var(--hdm-white, #ffffff);
    padding: 12px 0;
    border-bottom: 1px solid var(--hdm-border, #e5e7eb);
    margin-bottom: 20px;
    gap: 16px;
}

/* Result count (left side) */
.hdm-result-count {
    font-size: 14px;
    color: var(--hdm-brown, #6A4532);
    font-weight: 500;
    white-space: nowrap;
}

/* Sort dropdown (right side) */
.hdm-mobile-bar .orderby,
.hdm-mobile-bar select,
.hdm-sorting-select,
.hdm-filter-bar select {
    border: 1px solid var(--hdm-gold, #C89737);
    border-radius: 6px;
    padding: 8px 36px 8px 14px;
    font-size: 14px;
    color: var(--hdm-brown, #6A4532);
    background: var(--hdm-white, #ffffff);
    cursor: pointer;
    outline: none;
    min-width: 200px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C89737' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hdm-mobile-bar .orderby:focus,
.hdm-mobile-bar select:focus,
.hdm-sorting-select:focus,
.hdm-filter-bar select:focus {
    border-color: var(--hdm-brown, #6A4532);
    box-shadow: 0 0 0 2px rgba(200, 151, 55, 0.2);
}

/* "← All Categories" link in mobile bar — style as neutral on desktop */
.hdm-mobile-bar > a {
    font-size: 14px;
    color: var(--hdm-brown, #6A4532);
    text-decoration: none;
    font-weight: 500;
}

/* Mobile: stack sort bar controls */
@media (max-width: 767px) {
    .hdm-mobile-bar,
    .hdm-filter-bar {
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 10px;
    }

    .hdm-result-count {
        width: 100%;
        text-align: center;
        font-size: 13px;
    }

    .hdm-mobile-bar .orderby,
    .hdm-mobile-bar select,
    .hdm-sorting-select {
        min-width: unset;
        flex: 1;
        max-width: 200px;
    }
}


/* ============================================================================
   ENHANCEMENT 3: BREADCRUMBS
   Problem: No breadcrumbs anywhere on the page
   Fix: Add styled breadcrumb bar (injected via JS)
   ============================================================================ */

.hdm-breadcrumbs {
    font-size: 13px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--hdm-brown, #6A4532);
    padding: 14px 0;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdm-breadcrumbs a {
    color: #999;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hdm-breadcrumbs a:hover {
    color: var(--hdm-brown, #6A4532);
}

.hdm-breadcrumb-sep {
    margin: 0 8px;
    color: var(--hdm-gold, #C89737);
    font-size: 12px;
}

.hdm-breadcrumb-current {
    color: var(--hdm-brown, #6A4532);
    font-weight: 500;
}

@media (max-width: 767px) {
    .hdm-breadcrumbs {
        font-size: 12px;
        padding: 10px 0;
    }

    .hdm-breadcrumb-sep {
        margin: 0 5px;
    }
}


/* ============================================================================
   ENHANCEMENT 4: PRODUCT CARD HOVER — REFINED
   Existing hover: translateY(-6px) + box-shadow on .hdm-product-card:hover
   Existing image zoom: scale(1.08) on .hdm-product-img
   Enhancement: Add subtle border glow, smoother image transition
   NOTE: Not overriding existing — these complement the existing hover rules
   ============================================================================ */

/* Image container already has overflow:hidden — just ensure smooth transition */
.hdm-product-image img,
.hdm-product-image picture,
.hdm-product-picture {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override inline transition to include box-shadow */
.hdm-product-card {
    transition: box-shadow 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease !important;
}


/* ============================================================================
   ENHANCEMENT 5: SHOP TRUST BADGES BAR
   Problem: No trust/confidence section on shop pages
   Note: .hdm-trust-item and .hdm-trust-icon already exist for homepage
         Using .hdm-shop-trust-* prefix to avoid conflict
   ============================================================================ */

.hdm-shop-trust-bar {
    background: var(--hdm-cream, #FDF9F6);
    padding: 40px 20px;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--hdm-border, #e5e7eb);
}

.hdm-shop-trust-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.hdm-shop-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
}

.hdm-shop-trust-icon {
    font-size: 28px;
    line-height: 1;
}

.hdm-shop-trust-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--hdm-brown, #6A4532);
    letter-spacing: 0.02em;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (max-width: 767px) {
    .hdm-shop-trust-bar {
        padding: 30px 16px;
        margin-top: 30px;
    }

    .hdm-shop-trust-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .hdm-shop-trust-icon {
        font-size: 24px;
    }

    .hdm-shop-trust-label {
        font-size: 13px;
    }
}


/* ============================================================================
   ENHANCEMENT 6: BACK-TO-TOP BUTTON
   Problem: No back-to-top button
   Fix: Fixed gold circle, appears after scroll, smooth animation
   ============================================================================ */

.hdm-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hdm-gold, #C89737) 0%, var(--hdm-gold-dark, #a87e2c) 100%);
    color: var(--hdm-white, #ffffff);
    border: none;
    font-size: 20px;
    font-weight: 700;
    line-height: 48px;
    text-align: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 16px rgba(200, 151, 55, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.hdm-back-to-top:hover {
    background: linear-gradient(135deg, var(--hdm-brown, #6A4532) 0%, var(--hdm-brown-dark, #4a2f22) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 69, 50, 0.35);
}

.hdm-back-to-top.hdm-btt-visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 767px) {
    .hdm-back-to-top {
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 18px;
        bottom: 16px;
        right: 16px;
    }
}

/* ============================================================================
   ENHANCEMENT 7: PRODUCT TEXT REFINEMENTS
   Existing styles: .hdm-product-title has -webkit-line-clamp: 2 (line 579)
                    .hdm-product-price has color + weight (line 587)
                    .hdm-product-price del/ins styled (lines 594-604)
   Enhancement: Ensure consistent sale price styling with gold accent
   ============================================================================ */

/* Reinforce sale price gold (existing uses var(--hdm-gold), this ensures specificity) */
.hdm-product-price ins,
.hdm-product-price ins .woocommerce-Price-amount,
.hdm-product-card .hdm-product-price ins {
    color: var(--hdm-gold, #C89737);
    font-weight: 700;
    text-decoration: none;
}

/* Reinforce strikethrough grey */
.hdm-product-price del,
.hdm-product-price del .woocommerce-Price-amount,
.hdm-product-card .hdm-product-price del {
    color: #9ca3af;
    font-weight: 400;
    opacity: 1;
    text-decoration: line-through;
    margin-right: 6px;
}


/* ============================================================================
   ENHANCEMENT 8: GRID COLUMN OVERRIDES (Tablet + Mobile)
   Ensures 3 cols tablet, 2 cols mobile — no exceptions
   ============================================================================ */

/* Tablet 768–1023px: 3 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .hdm-products-grid,
    .hdm-products-grid.hdm-columns-3,
    .hdm-products-grid.hdm-columns-4,
    .hdm-products-grid.hdm-columns-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Mobile ≤767px: 2 columns always */
@media (max-width: 767px) {
    .hdm-products-grid,
    .hdm-products-grid.hdm-columns-2,
    .hdm-products-grid.hdm-columns-3,
    .hdm-products-grid.hdm-columns-4,
    .hdm-products-grid.hdm-columns-5 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ============================================================================
   ENHANCEMENT 9: COMPACT CATEGORY HEADER
   Problem: .hdm-shop-header has padding:40px + margin-bottom:40px (inline style)
   Fix: Override to 15px compact spacing
   ============================================================================ */

.hdm-shop-header {
    padding: 15px 20px !important;
    margin-bottom: 15px !important;
}

/*
 * FIX: Search results heading ("SEARCH RESULTS: 'JEBENA'")
 *
 * The inline <style> in <main> injects:
 *   .hdm-shop-header h1 { font-size: clamp(1.8rem,4vw,2.5rem); letter-spacing:3px; ... }
 *
 * That rule uses selector `.hdm-shop-header h1` (specificity 0-1-1).
 * We must match the EXACT same selector to override it — a different
 * class (.hdm-shop-title) never matched the bare <h1> element.
 * !important ensures we beat the inline style regardless of load order.
 *
 * Desktop result: 28px max (was 40px), letter-spacing 1.5px (was 3px)
 * Mobile result:  16px, capitalize, 0.5px spacing — fits in 2 lines max
 */
.hdm-shop-header h1 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: clamp(1.2rem, 3vw, 1.75rem) !important; /* was clamp(1.8rem,4vw,2.5rem) */
    letter-spacing: 1.5px !important;                   /* was 3px */
}

/* Also tighten breadcrumbs-to-title gap */
.hdm-breadcrumbs + .hdm-shop-header {
    margin-top: 0 !important;
}

/* ── Tablet (≤768px) ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hdm-shop-header {
        padding: 20px 15px !important;
        margin-bottom: 15px !important;
    }

    .hdm-shop-header h1 {
        font-size: 1.25rem !important;  /* ~20px */
        letter-spacing: 1px !important;
        line-height: 1.3 !important;
    }
}

/* ── Phone (≤480px) ──────────────────────────────────────────────────────── */
/* On 375px, uppercase + 3px letter-spacing caused 4-line wrap & 135px height.
   capitalize + 16px + 0.5px spacing fits in ~2 lines (~50px). */
@media (max-width: 480px) {
    .hdm-shop-header {
        padding: 14px 12px !important;
        margin-bottom: 10px !important;
    }

    .hdm-shop-header h1 {
        font-size: 1rem !important;            /* ~16px */
        text-transform: capitalize !important; /* "Search Results: 'Jebena'" not ALL CAPS */
        letter-spacing: 0.5px !important;
        line-height: 1.3 !important;
    }

    .hdm-shop-header p {
        font-size: 0.85rem !important;
        margin-top: 6px !important;
    }

    .hdm-mobile-bar {
        padding: 8px 0 !important;
        gap: 6px !important;
    }
}


/* ============================================================================
   ENHANCEMENT 10: SIDEBAR FILTER LAYOUT & ACCORDION
   .hdm-filters-sidebar has NO CSS from hdm-premium-filters.css for layout
   These rules handle: width, sticky, responsive, accordion collapse
   ============================================================================ */

/* -- Sidebar container: fixed 280px, sticky, scrollable -- */
.hdm-filters-sidebar {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 100px;
    background: var(--hdm-cream, #FDF9F6);
    border-radius: 12px;
    padding: 0 0 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--hdm-gold, #C89737) transparent;
}

.hdm-filters-sidebar::-webkit-scrollbar {
    width: 5px;
}

.hdm-filters-sidebar::-webkit-scrollbar-thumb {
    background: var(--hdm-gold, #C89737);
    border-radius: 3px;
}

/* -- Header inside sidebar -- */
.hdm-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid var(--hdm-gold, #C89737);
    position: sticky;
    top: 0;
    background: var(--hdm-cream, #FDF9F6);
    z-index: 2;
    border-radius: 12px 12px 0 0;
}

.hdm-filters-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hdm-brown, #6A4532);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Desktop: hide close button (it's for mobile drawer) */
.hdm-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--hdm-brown, #6A4532);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* -- Mobile toggle button: hidden on desktop -- */
.hdm-mobile-toggle {
    display: none;
}

/* -- Mobile filter button in mobile bar -- */
.hdm-mobile-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hdm-mobile-filter-btn {
    display: none;  /* Hidden on desktop */
}

@media (max-width: 1023px) {
    .hdm-mobile-filter-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        background: var(--hdm-cream, #FDF9F6);
        border: 1px solid var(--hdm-border, #e5e7eb);
        border-radius: 6px;
        color: var(--hdm-brown, #6A4532);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        font-family: 'DM Sans', sans-serif;
        white-space: nowrap;
        transition: all 0.2s ease;
    }

    .hdm-mobile-filter-btn:hover {
        border-color: var(--hdm-gold, #C89737);
        color: var(--hdm-gold, #C89737);
    }

    .hdm-mobile-filter-btn svg {
        flex-shrink: 0;
    }
}

/* -- Filter form padding -- */
.hdm-filter-form {
    padding: 0;
}

/* -- Filter group accordion -- */
.hdm-filter-group {
    border-bottom: 1px solid var(--hdm-border, #e5e7eb);
}

.hdm-filter-group:last-child {
    border-bottom: none;
}

.hdm-filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--hdm-brown, #6A4532);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: color 0.2s ease;
    text-align: left;
}

.hdm-filter-toggle:hover {
    color: var(--hdm-gold, #C89737);
}

.hdm-toggle-icon {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    color: var(--hdm-gold, #C89737);
    transition: transform 0.2s ease;
}

/* -- CRITICAL: Accordion content COLLAPSED by default -- */
/* Uses max-height + CSS transition for smooth animation */
/* !important overrides hdm-premium-filters.css and hdm-homepage.css */
.hdm-filter-options {
    display: block !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    opacity: 0 !important;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease !important;
}

/* Open state — toggled by JS adding .hdm-open class */
.hdm-filter-options.hdm-open {
    max-height: 600px !important;
    opacity: 1 !important;
    padding: 0 0 8px !important;
}

/* -- Filter option items (checkboxes) -- */
.hdm-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    font-size: 13px;
    color: var(--hdm-text, #2d2d2d);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.hdm-filter-option:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hdm-filter-option input[type="checkbox"] {
    accent-color: var(--hdm-gold, #C89737);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.hdm-filter-option small {
    color: #9ca3af;
    font-size: 12px;
    margin-left: auto;
}

/* -- Color swatch in filter -- */
.hdm-color-option {
    gap: 10px;
}

.hdm-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--hdm-border, #e5e7eb);
    flex-shrink: 0;
}

/* -- Clear All button at bottom -- */
.hdm-clear-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 12px 20px 4px;
    padding: 10px;
    background: none;
    border: 1px solid var(--hdm-border, #e5e7eb);
    border-radius: 6px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.hdm-clear-btn:hover {
    border-color: var(--hdm-gold, #C89737);
    color: var(--hdm-gold, #C89737);
}

/* -- Active filter heading highlight -- */
.hdm-filter-toggle.hdm-filter-active span:first-child {
    color: var(--hdm-gold, #C89737);
}

/* -- Mobile filter count badge -- */
.hdm-filter-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--hdm-gold, #C89737);
}

/* -- Overlay for mobile drawer -- */
.hdm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.hdm-overlay.hdm-overlay-active {
    display: block;
}

/* ============================================================================
   SIDEBAR RESPONSIVE: Hide on tablet/mobile, show mobile toggle
   ============================================================================ */

@media (max-width: 1023px) {
    /* Hide sidebar, show mobile toggle */
    .hdm-filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        max-height: 100vh;
        z-index: 999;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .hdm-filters-sidebar.hdm-sidebar-active {
        display: block;
        transform: translateX(0);
    }

    .hdm-close-btn {
        display: block;
    }

    .hdm-mobile-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        background: var(--hdm-cream, #FDF9F6);
        border: 1px solid var(--hdm-border, #e5e7eb);
        border-radius: 8px;
        color: var(--hdm-brown, #6A4532);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 16px;
        font-family: 'DM Sans', sans-serif;
        width: 100%;
    }
}

/* ============================================================================
   ENSURE .hdm-layout accommodates new sidebar width
   ============================================================================ */

.hdm-layout {
    display: flex;
    gap: 30px;
}

.hdm-main {
    flex: 1;
    min-width: 0;
}

/* -- Clear All Filters (top of sidebar) -- */
.hdm-clear-section {
    padding: 0 0 8px;
}

.hdm-clear-all-btn {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hdm-gold, #C89737);
    background: var(--hdm-cream, #FDF9F6);
    border: 1px solid var(--hdm-gold, #C89737);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hdm-clear-all-btn:hover {
    background: var(--hdm-gold, #C89737);
    color: var(--hdm-white, #ffffff);
}

/* -- Category Navigation Links (above filters) -- */
.hdm-sidebar-categories {
    padding: 0 0 4px;
    border-bottom: 1px solid var(--hdm-border, #e5e7eb);
}

.hdm-sidebar-categories .hdm-sidebar-back {
    display: block;
    padding: 12px 20px;
    background: var(--hdm-brown, #6A4532);
    color: #fff !important;
    text-align: center;
    border-radius: 8px;
    margin: 0 16px 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.hdm-sidebar-categories .hdm-sidebar-back:hover {
    background: #4a2f22;
}

.hdm-sidebar-categories h4 {
    margin: 0 0 8px;
    padding: 0 20px 8px;
    border-bottom: 2px solid var(--hdm-gold, #C89737);
    color: var(--hdm-brown, #6A4532);
    font-size: 14px;
    font-weight: 700;
}

.hdm-sidebar-categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdm-sidebar-categories li {
    margin-bottom: 1px;
}

.hdm-sidebar-categories li a {
    display: block;
    padding: 8px 20px;
    color: var(--hdm-text, #2d2d2d);
    text-decoration: none;
    border-radius: 0;
    font-size: 13px;
    transition: all 0.15s ease;
}

.hdm-sidebar-categories li a:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hdm-sidebar-categories li a.active {
    background: var(--hdm-brown, #6A4532);
    color: #fff;
    font-weight: 600;
}

.hdm-sidebar-categories li a .cat-count {
    float: right;
    color: #9ca3af;
    font-size: 12px;
}

.hdm-sidebar-categories li a.active .cat-count {
    color: rgba(255, 255, 255, 0.7);
}

/* -- Price Range Form -- */
.hdm-price-form-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px 8px;
}

.hdm-price-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    border: 1px solid var(--hdm-border, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
    background: var(--hdm-white, #ffffff);
    transition: border-color 0.2s ease;
}

.hdm-price-input-wrap:focus-within {
    border-color: var(--hdm-gold, #C89737);
}

.hdm-price-symbol {
    padding: 7px 0 7px 8px;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.hdm-price-input-wrap input[type="number"] {
    border: none;
    outline: none;
    padding: 7px 6px 7px 4px;
    width: 100%;
    font-size: 13px;
    color: var(--hdm-brown, #6A4532);
    font-family: 'DM Sans', sans-serif;
    background: transparent;
    -moz-appearance: textfield;
}

.hdm-price-input-wrap input::-webkit-outer-spin-button,
.hdm-price-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hdm-price-dash {
    color: #999;
    font-size: 14px;
    flex-shrink: 0;
}

.hdm-price-go {
    padding: 7px 12px;
    background: var(--hdm-brown, #6A4532);
    color: var(--hdm-white, #ffffff);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.hdm-price-go:hover {
    background: var(--hdm-gold, #C89737);
}

/* -- Price Quick-Select Pills -- */
.hdm-price-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 14px;
}

.hdm-price-pill {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--hdm-brown, #6A4532);
    background: var(--hdm-cream, #FDF9F6);
    border: 1px solid var(--hdm-border, #e5e7eb);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.hdm-price-pill:hover {
    border-color: var(--hdm-gold, #C89737);
    color: var(--hdm-gold, #C89737);
}

.hdm-price-pill.active {
    background: var(--hdm-gold, #C89737);
    border-color: var(--hdm-gold, #C89737);
    color: var(--hdm-white, #ffffff);
}

/* -- Availability Toggle Links -- */
.hdm-toggle-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--hdm-text, #2d2d2d);
    transition: background 0.15s ease;
    cursor: pointer;
}

.hdm-toggle-link:hover {
    background: var(--hdm-cream, #FDF9F6);
}

.hdm-toggle-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--hdm-border, #e5e7eb);
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}

.hdm-toggle-link.hdm-checked .hdm-toggle-check {
    background: var(--hdm-gold, #C89737);
    border-color: var(--hdm-gold, #C89737);
}

.hdm-toggle-link.hdm-checked .hdm-toggle-check::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--hdm-white, #ffffff);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* -- Colour Dot Placeholders -- */
.hdm-colour-placeholders {
    display: flex;
    gap: 10px;
    padding: 8px 16px 14px;
    flex-wrap: wrap;
}

.hdm-colour-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.hdm-colour-dot.disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.hdm-colour-dot:not(.disabled):hover,
.hdm-colour-dot.active {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--hdm-white, #fff), 0 0 0 3px var(--hdm-gold, #C89737);
    cursor: pointer;
}

/* -- Size Pill Placeholders -- */
.hdm-size-placeholders {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 14px;
}

.hdm-size-pill {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--hdm-border, #e5e7eb);
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s ease;
}

.hdm-size-pill.disabled {
    color: #999;
    background: #f9fafb;
    cursor: not-allowed;
}

.hdm-size-pill:not(.disabled) {
    color: var(--hdm-brown, #6A4532);
    background: var(--hdm-white, #ffffff);
    cursor: pointer;
}

.hdm-size-pill:not(.disabled):hover {
    border-color: var(--hdm-gold, #C89737);
    color: var(--hdm-gold, #C89737);
}

.hdm-size-pill.active {
    background: var(--hdm-gold, #C89737);
    border-color: var(--hdm-gold, #C89737);
    color: var(--hdm-white, #ffffff);
}

/* -- Coming Soon Note -- */
.hdm-filter-coming-soon {
    font-size: 12px;
    color: #9ca3af;
    padding: 8px 16px;
    margin: 0;
    font-style: italic;
}

.hdm-filter-coming-soon code {
    font-size: 11px;
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--hdm-brown, #6A4532);
}

/* -- Mobile responsive -- */
@media (max-width: 767px) {
    .hdm-price-form-row {
        padding: 10px 12px 6px;
    }

    .hdm-price-pills {
        padding: 6px 12px 12px;
    }

    .hdm-colour-placeholders,
    .hdm-size-placeholders {
        padding: 6px 12px 12px;
    }

    .hdm-toggle-link {
        padding: 10px 12px;
    }
}


/* ============================================================================
   ENHANCEMENT 11: ACTIVE FILTER TAGS ABOVE GRID
   Shows pills like "Price: £10–£50 ✕" above products when filters active
   ============================================================================ */

.hdm-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 0 16px;
}

.hdm-active-filters-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--hdm-brown, #6A4532);
    white-space: nowrap;
}

.hdm-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--hdm-cream, #FDF9F6);
    border: 1px solid var(--hdm-border, #e5e7eb);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--hdm-brown, #6A4532);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.hdm-filter-tag:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.hdm-filter-tag .hdm-tag-remove {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.hdm-filter-tag:hover .hdm-tag-remove {
    opacity: 1;
}

.hdm-filter-tags-clear {
    font-size: 12px;
    color: var(--hdm-gold, #C89737);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    white-space: nowrap;
}

.hdm-filter-tags-clear:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .hdm-active-filters {
        padding: 0 0 12px;
        gap: 6px;
    }

    .hdm-filter-tag {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* ============================================================================
   ENHANCEMENT 12: VENDOR NAME ON PRODUCT CARDS
   Shows Dokan store name below product title in muted text
   ============================================================================ */

.hdm-product-vendor {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hdm-product-vendor a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hdm-product-vendor a:hover {
    color: var(--hdm-gold, #C89737);
}

.hdm-product-vendor .hdm-vendor-icon {
    font-size: 10px;
    opacity: 0.6;
}

/* ============================================================================
   ENHANCEMENT 13: FILTER COUNT BADGE IN SIDEBAR HEADER
   ============================================================================ */

.hdm-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--hdm-gold, #C89737);
    color: var(--hdm-white, #ffffff);
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 8px;
}

/* ============================================================================
   ENHANCEMENT 14: COLOUR SWATCHES ON PRODUCT CARDS
   House of Bruar style: small circles inline, max 3-4, then +N overflow
   ============================================================================ */

.hdm-card-swatches {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0 4px;
    min-height: 28px;
}

/* When no swatches exist, product-info still has consistent top padding */
.hdm-product-info {
    padding-top: 8px;
}

/* When swatches are present, they handle the top spacing */
.hdm-product-info .hdm-card-swatches:first-child {
    margin-top: -2px;
}

.hdm-card-swatch {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hdm-card-swatch:hover {
    border-color: var(--hdm-gold, #C89737);
    transform: scale(1.15);
    box-shadow: 0 0 0 1px var(--hdm-gold, #C89737);
}

.hdm-card-swatch-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    background:
        linear-gradient(to right, #ccc 50%, #999 50%) top / 100% 50% no-repeat,
        linear-gradient(to right, #999 50%, #ccc 50%) bottom / 100% 50% no-repeat;
    border: 1px solid #ddd;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
    position: relative;
}

.hdm-card-swatch-more:hover {
    border-color: var(--hdm-gold, #C89737);
    transform: scale(1.15);
}

/* ============================================================================
   ENHANCEMENT 15: IMAGE SLIDER ON PRODUCT CARDS
   Dot navigation, swipe support via JS
   ============================================================================ */

.hdm-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hdm-image-slider .hdm-slide {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.35s ease !important;
    pointer-events: none;
}

.hdm-image-slider .hdm-slide:first-child {
    position: relative;
}

.hdm-image-slider .hdm-slide.hdm-slide-active {
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 1;
}

.hdm-slide-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}

.hdm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hdm-dot.hdm-dot-active {
    background: #fff;
    transform: scale(1.2);
}

/* Custom Made badge */
.hdm-custom-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--hdm-gold, #C89737);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 3;
}

/* ============================================================================
   ENHANCEMENT 16: MOBILE CARD CLEANUP
   No borders, reduced padding, larger images, cleaner presentation
   ============================================================================ */

@media (max-width: 767px) {
    .hdm-products-grid {
        gap: 8px !important;
    }

    .hdm-product-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
    }

    .hdm-product-card-inner {
        border-radius: 0;
        overflow: visible;
    }

    .hdm-product-image {
        border-radius: 8px;
        overflow: hidden;
    }

    .hdm-product-info {
        padding: 6px 2px 12px !important;
    }

    .hdm-product-title {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }

    .hdm-product-price {
        font-size: 13px !important;
    }

    .hdm-product-vendor {
        font-size: 11px;
    }

    .hdm-card-swatches {
        padding: 6px 0 2px;
        gap: 4px;
    }

    .hdm-card-swatch {
        width: 18px;
        height: 18px;
        border-radius: 2px;
    }

    .hdm-card-swatch-more {
        width: 18px;
        height: 18px;
        border-radius: 2px;
        font-size: 9px;
    }

    .hdm-slide-dots {
        bottom: 6px;
    }

    .hdm-dot {
        width: 5px;
        height: 5px;
    }
}


/* ============================================================================
   END SHOP / ARCHIVE PAGE ENHANCEMENTS v1.1
   (search heading h1 fix — .hdm-shop-header h1 correct selector, 25 Mar 2026)
   ============================================================================ */