/* ============================================
   PROFESSIONAL HEADER (Exact Mamaearth Style)
   ============================================ */

/* Promo Bar - Kapiva Style (Premium Dark) */
.promo-bar {
    position: relative;
    background: #1a1a1a !important;
    /* Premium Dark Charcoal */
    color: #ffffff !important;
    height: 26px;
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    overflow: hidden;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.promo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.promo-slider {
    position: relative;
    height: 26px;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.promo-slide {
    position: absolute;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.promo-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.promo-slide b {
    color: #a8e063;
    /* Accent green for codes */
    font-weight: 700;
}

.promo-links {
    position: absolute;
    right: 0;
    display: flex;
    gap: 15px;
}

.promo-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 15px;
}

.promo-links a:hover {
    color: #ffffff;
}

.promo-bar.hide-on-scroll {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-100%);
}

/* Remove old emoji patterns */
.promo-bar::before,
.promo-bar::after {
    display: none !important;
}

/* Professional Header - Relative inside Sticky Placeholder */
.professional-header {
    background: white;
    position: relative;
    top: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.professional-header.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    margin-top: 0 !important;
}

/* Main Header Row */
.header-main-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 4px 0;
    min-height: auto;
}

/* Logo (Left, Bigger) */
.brand-logo {
    flex-shrink: 0;
}

.brand-logo img {
    height: 62px;
    width: auto;
}

/* Pincode Display */
.pincode-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.3s;
}

.pincode-display:hover {
    background: #e9ecef;
}

.pincode-display svg {
    stroke: #4a5568;
}

/* Center Search Container */
.search-container {
    flex: 1;
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    height: 62px;
}

.search-icon {
    position: absolute;
    left: 14px;
    stroke: #718096;
    pointer-events: none;
}

.search-container input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 14px 0 42px;
    font-size: 14px;
    color: #2d3748;
    outline: none;
}

.search-container input::placeholder {
    color: #a0aec0;
}

.search-button {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 0 26px;
    height: 100%;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-button:hover {
    background: #0099d6;
}

.search-button svg {
    stroke: white;
}

/* Right Actions */
.header-actions-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.action-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #2d3748;
    font-size: 11px;
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
    padding: 4px 12px;
}

.action-link:hover {
    color: var(--primary-green);
}

.action-link svg {
    stroke: currentColor;
}

.action-text {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
}

.cart-count-badge {
    position: absolute;
    top: -6px;
    left: 12px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Navigation Bar */
.main-navigation {
    border-top: 1px solid #e9ecef;
    background: white;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: block;
    padding: 3px 16px;
    text-decoration: none;
    color: #4a5568;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transform: translateX(-50%);
    transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-green);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 60%;
}

.nav-links a.highlight {
    color: #ff4757;
}

/* Autocomplete */
.search-autocomplete {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 10;
    max-height: 400px;
    overflow-y: auto;
}

.search-container:focus-within .search-autocomplete {
    display: block;
}

.autocomplete-header {
    padding: 3px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .pincode-display {
        display: none;
    }

    .header-main-row {
        gap: 14px;
    }

    .search-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-main-row {
        flex-wrap: nowrap;
        padding: 8px 0;
        gap: 10px;
    }

    .brand-logo {
        order: 1;
        flex-shrink: 0;
    }

    .brand-logo img {
        height: 32px;
    }

    /* Hide location, account and cart on mobile - they are in bottom nav */
    .header-actions-right {
        display: none !important;
    }

    .pincode-display,
    .pincode-selector-btn,
    .action-link[href*="account"],
    .action-link[href*="cart"],
    .action-link[href*="wishlist"] {
        display: none !important;
    }

    .action-text {
        display: none;
    }

    /* Hide left search icon - button already has icon */
    .search-icon {
        display: none !important;
    }

    .search-container input {
        padding-left: 14px !important;
        font-size: 14px !important;
    }

    .search-container {
        order: 2;
        flex: 1;
        margin-top: 0;
        height: 62px;
    }

    .search-button {
        padding: 0 12px;
    }

    .nav-links {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        white-space: nowrap;
        padding: 4px 14px;
        font-size: 11px;
    }
}

/* ============================================
   PINCODE POPUP MODAL (Premium Style)
   ============================================ */

.pincode-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pincode-popup-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   PINCODE POPUP - ULTRA MODERN 2026
   ============================================ */
.pincode-popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 440px;
    background: linear-gradient(160deg, #ffffff 0%, #f8faf8 50%, #f0f5f0 100%);
    border-radius: 32px;
    padding: 45px 35px;
    z-index: 10002;
    display: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(27, 67, 50, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pincode-popup-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Close Button - Modern */
.popup-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 62px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #999;
}

.popup-close-btn:hover {
    background: linear-gradient(135deg, #1B4332, #2D6A4F);
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(27, 67, 50, 0.3);
}

.popup-close-btn svg {
    stroke: currentColor;
    transition: stroke 0.3s ease;
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Floating Location Icon */
.popup-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 20px;
    width: 90px;
    height: 90px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatIcon 3s ease-in-out infinite;
    box-shadow:
        0 15px 35px rgba(27, 67, 50, 0.2),
        inset 0 -5px 15px rgba(0, 0, 0, 0.05);
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 15px 35px rgba(27, 67, 50, 0.2);
    }

    50% {
        transform: translateY(-12px) scale(1.05);
        box-shadow: 0 25px 50px rgba(27, 67, 50, 0.25);
    }
}

/* Title */
.pincode-popup-modal h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.popup-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: #777;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Premium Input */
.popup-input-group {
    margin-bottom: 25px;
}

.popup-input-group input {
    width: 100%;
    padding: 20px 24px;
    border: 2px solid #e5e5e5;
    border-radius: 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    text-align: center;
    letter-spacing: 10px;
    font-weight: 700;
    color: #1B4332;
    transition: all 0.3s ease;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.popup-input-group input:focus {
    outline: none;
    border-color: #1B4332;
    box-shadow:
        0 0 0 5px rgba(27, 67, 50, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.popup-input-group input::placeholder {
    letter-spacing: 0;
    font-weight: 500;
    font-size: 15px;
    color: #bbb;
}

/* Gradient Buttons */
.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.popup-btn {
    padding: 18px 28px;
    border: none;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.popup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.popup-btn:hover::before {
    left: 100%;
}

.popup-btn span {
    font-size: 18px;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 50%, #1B4332 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 10px 30px rgba(27, 67, 50, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(27, 67, 50, 0.45);
    background-position: right center;
}

.popup-btn-secondary {
    background: linear-gradient(135deg, #40916C 0%, #52B788 50%, #40916C 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 10px 30px rgba(64, 145, 108, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-btn-secondary:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(64, 145, 108, 0.45);
    background-position: right center;
}

/* Result Messages */
.pincode-popup-modal .pincode-result {
    text-align: center;
    padding: 14px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.pincode-popup-modal .pincode-result.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid rgba(21, 87, 36, 0.1);
}

.pincode-popup-modal .pincode-result.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid rgba(114, 28, 36, 0.1);
}

/* Footer */
.popup-footer {
    text-align: center;
    padding-top: 22px;
    border-top: 2px dashed rgba(27, 67, 50, 0.15);
}

.popup-footer p {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: #1B4332;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Pincode Selector Button Styling */
.pincode-selector-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #2d3748 !important;
}

.pincode-selector-btn:hover {
    color: #2D5016 !important;
    transform: scale(1.05) !important;
}

.pincode-selector-btn .action-text {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .pincode-popup-modal {
        padding: 35px 25px;
        border-radius: 28px;
        max-width: 95%;
    }

    .pincode-popup-modal h3 {
        font-size: 24px;
    }

    .popup-icon {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .popup-input-group input {
        font-size: 18px;
        letter-spacing: 8px;
        padding: 18px 20px;
    }

    .popup-btn {
        padding: 16px 24px;
    }
}

/* ============================================
   MOBILE DRAWER RESET (Fix for screenshot)
   ============================================ */

/* Hide by default everywhere */
.mobile-menu-drawer,
.mobile-menu-overlay,
.mobile-menu-toggle {
    display: none;
}

/* Ensure drawer is fixed/hidden off-screen when desktop wants to show it */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu-drawer.active {
    display: block;
    left: 0;
}

.mobile-menu-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

/* Specific Tablet/Mobile Show */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
}