/* ================================================================
   RESPONSIVE MOBILE-FIRST CSS
   Hawa Lebanon - Mobile Shopping Experience
================================================================ */

/* ============================================================
   FIX: Remove decorative overlays that block content on mobile
   These pseudo-elements create transparent layers that trap
   touch events and make content appear under a shadow.
============================================================ */

@media (max-width: 768px) {
    /* CRITICAL: body::before is a fixed full-screen overlay */
    body::before {
        display: none !important;
    }

    /* .lux-section::before overlays every section with gradient */
    .lux-section::before {
        display: none !important;
    }

    /* hero shimmer effect persists and blocks touches */
    .hero-slide::before {
        display: none !important;
    }

    /* Decorative overlays on cards */
    .story-card::before,
    .highlight-card::before,
    .share-btn::before {
        display: none !important;
    }

    /* story-step border overlay */
    .story-step::after {
        display: none !important;
    }

    /* bottle-shine and media-glow effects */
    .bottle-shine,
    .media-glow {
        display: none !important;
    }

    /* Reduce hero overlay opacity for better readability */
    .hero-overlay {
        background: linear-gradient(
            135deg,
            rgba(11, 11, 11, 0.6) 0%,
            rgba(11, 11, 11, 0.3) 50%,
            rgba(183, 155, 91, 0.1) 100%
        ) !important;
    }

    /* Ensure all interactive content stays above any remaining layers */
    .lux-section > .container,
    .hero-lux__content,
    .product-card,
    .signature-card,
    .cart-layout,
    .checkout-layout,
    form,
    button,
    a,
    input,
    select,
    textarea {
        position: relative;
        z-index: 2;
    }
}

/* ============================================================
   FIX: Hero section mobile issues
   - background-attachment: fixed breaks on iOS
   - Overlay too dark on mobile
============================================================ */

@media (max-width: 768px) {
    .hero-slide,
    .hero-bg,
    .hero-media {
        background-attachment: scroll !important;
    }

    .hero-stage,
    .lux-hero-carousel {
        min-height: 60vh;
    }

    .hero-slider {
        height: 60vh;
    }

    .hero-lux__content {
        padding: 40px 0 !important;
    }

    .hero-lux__title {
        font-size: 26px !important;
        line-height: 1.3;
    }

    .hero-lux__subtitle {
        font-size: 14px !important;
    }

    .hero-controls {
        bottom: 16px;
        gap: 16px;
    }
}

/* ============================================================
   HEADER - Responsive with Hamburger Menu
============================================================ */

.lux-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 240, 231, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 18px rgba(0,0,0,0.08);
    padding: 12px 0;
}

.lux-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Brand / Logo */
.lux-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.lux-brand__logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.lux-brand__text h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0b0b0b;
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

.lux-brand__text p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
}

/* Desktop Nav (inside header) */
.lux-nav-desktop {
    display: flex;
    gap: 32px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

/* Mobile Nav (outside header, slide-out) */
.lux-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 24px 40px;
    gap: 0;
    z-index: 9000;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

[dir="rtl"] .lux-nav {
    right: auto;
    left: -100%;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lux-nav.open {
    right: 0;
}

[dir="rtl"] .lux-nav.open {
    left: 0;
}

.nav-link {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 6px;
    transition: color 0.3s;
}

/* Desktop nav link underline */
.lux-nav-desktop .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), #e2c98a);
    transition: width 0.3s ease;
}

.lux-nav-desktop .nav-link:hover::after { width: 100%; }
.lux-nav-desktop .nav-link:hover { color: var(--gold); }

/* Mobile nav link styles */
.lux-nav .nav-link {
    display: block;
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(183, 155, 91, 0.15);
}

.lux-nav .nav-link::after {
    display: none;
}

/* Language toggle in mobile nav */
.nav-lang-toggle {
    display: block;
    margin-top: 20px;
    padding: 14px 20px;
    background: var(--gold);
    color: #fff;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 8999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Desktop language button */
.lux-lang-btn {
    padding: 10px 22px;
    background: var(--gold);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 2px solid var(--gold);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(183, 155, 91, 0.3);
    flex-shrink: 0;
}

.lux-lang-btn:hover {
    background: transparent;
    color: var(--gold);
    transform: translateY(-2px);
}

/* Mobile-only elements hidden on desktop */
.mobile-header-actions { display: none; }

/* Mobile nav hidden on desktop (slide-out is only for mobile) */
@media (min-width: 769px) {
    .lux-nav {
        display: none !important;
    }
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Desktop nav hidden on mobile */
@media (max-width: 768px) {
    .lux-nav-desktop {
        display: none !important;
    }
}

/* Hamburger button */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 9500;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile cart icon */
.mobile-cart-icon {
    color: var(--navy);
    padding: 8px;
    position: relative;
}

/* ============================================================
   MOBILE BREAKPOINT (<= 768px)
============================================================ */

@media (max-width: 768px) {
    /* Header adjustments - OVERRIDE luxury.css mobile rules */
    .lux-header {
        padding: 10px 0;
    }

    .lux-header__inner {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .lux-brand {
        justify-content: flex-start !important;
        text-align: start !important;
    }

    .lux-brand__logo {
        height: 36px;
    }

    .lux-brand__text h1 {
        font-size: 1rem;
    }

    .lux-brand__text p {
        font-size: 0.7rem;
    }

    /* Show mobile actions, hide desktop nav */
    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .desktop-only { display: none !important; }

    /* Container padding */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Footer responsive */
    .lux-footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Cart page responsive */
    .cart-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .cart-item {
        flex-direction: column;
        gap: 12px;
    }

    .cart-media {
        width: 100%;
        max-height: 200px;
    }

    .cart-media img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 12px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 8px;
    }

    .inline-form {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .cart-summary {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 20px;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        z-index: 50;
    }

    /* Checkout responsive */
    .checkout-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .checkout-summary {
        background: rgba(245, 240, 231, 0.5);
        padding: 16px;
        border-radius: 12px;
    }

    /* Section spacing */
    .lux-section {
        padding: 50px 0;
    }
}

/* ============================================================
   VERY SMALL SCREENS (<= 380px)
============================================================ */

@media (max-width: 380px) {
    .lux-brand__text h1 {
        font-size: 0.85rem;
    }

    .lux-brand__logo {
        height: 30px;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ============================================================
   CART TOAST NOTIFICATIONS
============================================================ */

.cart-toast {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-toast.visible {
    bottom: 24px;
}

.cart-toast__content {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(11, 11, 11, 0.9);
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    white-space: nowrap;
}

.cart-toast--success .cart-toast__content {
    background: rgba(37, 211, 102, 0.95);
}

.cart-toast__spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   SAFE AREA (for notch devices)
============================================================ */

@supports (padding: env(safe-area-inset-bottom)) {
    .sticky-buy-bar {
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .quick-buy-content {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .cart-summary {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* ============================================================
   SMOOTH SCROLL
============================================================ */

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* ============================================================
   DISCOUNT BADGE STYLES (was in missing catalog-discount.css)
============================================================ */

.price-discount-horizontal {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.discount-badge-horizontal {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(16, 26, 43, 0.92), rgba(207, 163, 160, 0.9));
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    width: fit-content;
}

.prices-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.price-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-item .label {
    font-size: 12px;
    color: var(--muted);
}

.amount-old {
    font-size: 16px;
    color: var(--muted);
    text-decoration: line-through;
}

.amount-new {
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
}

.amount-regular {
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
}

.price-regular-horizontal {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.separator {
    color: var(--muted);
    font-size: 14px;
}

.save-badge-h {
    background: rgba(183, 155, 91, 0.1);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}

/* Discount tag on product cards */
.discount-tag-professional {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

[dir="rtl"] .discount-tag-professional {
    right: auto;
    left: 12px;
}

.discount-percent-tag {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.discount-text-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
