/* ================================
   HEADER TOP BAR — Logo | Banner | Contacts
   ================================ */

.header-top-bar {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 180px;
    background: radial-gradient(circle at center, #d32f2f 0%, #000033 100%);
    position: sticky;
    top: 0;
    z-index: 1100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
    overflow: visible;
}

/* ---- Logo Column ---- */
.header-logo-col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 240px;
    background: transparent;
    padding: 10px 30px;
    text-decoration: none;
    z-index: 5;
}

.header-logo-col img {
    height: 120px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
    mix-blend-mode: multiply;
    /* Removes white background from logo image */
}

/* ---- Banner Column ---- */
.header-banner-col {
    flex: 1;
    background: transparent;
    display: flex;
    align-items: center;
    overflow: visible;
    /* Allow image overflow */
    position: relative;
    cursor: pointer;
}

/* Subtle inner glow */
.header-banner-col::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

#headerBannerInner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 32px 0 40px;
    transition: opacity 0.4s ease;
}

#headerBannerInner.banner-fade-out {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

#headerBannerInner.banner-fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.banner-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    z-index: 10;
    /* Higher priority for legibility */
    position: relative;
}

.banner-prefix {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    /* Squeezed */
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.banner-part-name {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 3rem;
    /* Squeezed font */
    font-weight: 950;
    color: var(--accent-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    text-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    margin-top: 2px;
}

.banner-img-wrap {
    /* Stretch full height of the banner, image absolutely fills right side */
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-shrink: 0;
    overflow: visible;
    padding-right: 0;
    padding-bottom: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: relative;
    /* Glow effect behind the image — makes it look lit from within */
    min-width: 280px;
}

/* Ambient glow behind image - vibrant red harmonization */
.banner-img-wrap::before {
    content: '';
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle at 70% 50%, rgba(45, 52, 54, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
}

/* Precise soft ground-shadow for visual anchoring */
.banner-img-wrap::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 40px;
    width: 280px;
    height: 35px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, transparent 80%);
    filter: blur(8px);
    z-index: 1;
    pointer-events: none;
    transform: perspective(1200px) rotateX(75deg);
    animation: shadowPulse 4s ease-in-out infinite;
}

@keyframes shadowPulse {

    0%,
    100% {
        transform: perspective(1200px) rotateX(75deg) scale(1);
        opacity: 1;
    }

    50% {
        transform: perspective(1200px) rotateX(75deg) scale(0.85);
        opacity: 0.6;
    }
}

#bannerPartImg {
    /* Seamlessly integrated product image */
    height: 150px;
    /* Reduced to fit header height better */
    width: auto;
    max-width: 300px;
    object-fit: contain;
    display: block;
    border: none !important;
    background: transparent !important;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.4));
    transition: opacity 0.3s ease;
    /* Floating Animation */
    transform: perspective(1200px) rotateY(-5deg) translateY(-5px);
    transform-origin: center right;
    z-index: 2;
    position: relative;
    animation: partFloat 4s ease-in-out infinite;
}

@keyframes partFloat {

    0%,
    100% {
        transform: perspective(1200px) rotateY(-5deg) translateY(-5px);
    }

    50% {
        transform: perspective(1200px) rotateY(-2deg) translateY(-18px);
    }
}


#bannerPartImg.banner-fade-in {
    transform: perspective(1200px) rotateY(-4deg) translateY(-5px);
}

#bannerPartImg.banner-fade-out {
    opacity: 0;
    transform: translateY(10px) perspective(1200px) rotateY(-4deg);
}

.banner-specials-tag {
    font-family: 'Kaushan Script', 'Cursive', sans-serif;
    font-size: 1.4rem;
    color: #FFFFFF;
    transform: rotate(-3deg);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    margin-left: auto;
    padding-right: 20px;
    z-index: 3;
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 20px;
    align-self: center;
}

/* ---- Contacts & Actions Columns ---- */
.header-contacts-col,
.header-actions-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
    gap: 12px;
}

.header-contacts-col {
    flex: 0 0 200px;
}

.header-actions-col {
    flex: 0 0 160px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.hdr-contact-btn,
.hdr-action-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    border: none;
    position: relative;
}

.hdr-contact-btn:hover,
.hdr-action-btn:hover {
    background: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hdr-contact-btn.phone {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.hdr-contact-btn.whatsapp {
    background: #25D366;
    color: #fff;
}

.hdr-contact-btn.email {
    background: #4a90d9;
    color: #fff;
}

/* ================================
   NAV BAR — Transparent Category Bar (overlays hero)
   ================================ */

.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0;
    background: transparent;
    border-bottom: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Solid white navbar when scrolling past hero */
.navbar.scrolled {
    position: fixed;
    top: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .categories-btn-v2 {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .nav-cat-link {
    color: #636366;
}

.navbar.scrolled .nav-cat-link:hover {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.04);
}

.navbar.scrolled .nav-cat-link::after {
    background: var(--accent-primary, #B8860B);
}

.navbar.scrolled .nav-icon-btn-v2 {
    color: #1C1C1E;
}

.navbar.scrolled .mobile-hamburger {
    color: #1C1C1E;
}

/* Solid navbar for non-hero pages (catalog, product details, etc.) */
.navbar.navbar-solid {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar-solid .categories-btn-v2 {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    text-shadow: none;
}

.navbar-solid .categories-btn-v2:hover,
.navbar-solid .categories-btn-v2.active {
    background: rgba(0, 0, 0, 0.1);
    color: #1C1C1E;
}

.navbar-solid .nav-cat-link {
    color: #636366;
    text-shadow: none;
}

.navbar-solid .nav-cat-link:hover {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.04);
}

.navbar-solid .nav-cat-link::after {
    background: var(--accent-primary, #B8860B);
}

.navbar-solid .nav-icon-btn-v2 {
    color: #1C1C1E;
    text-shadow: none;
}

.navbar-solid .mobile-hamburger {
    color: #1C1C1E;
    text-shadow: none;
}

.nav-content-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    height: 48px;
}

/* Branding — hidden, logo in top bar */
.logo {
    display: none;
}

/* Category Button */
.categories-btn-v2 {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 48px;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.categories-btn-v2:hover,
.categories-btn-v2.active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.categories-btn-v2::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 60px;
    background: transparent;
    z-index: 10000;
}

/* ---- Inline Category Links (JamesEdition style) ---- */
.nav-cat-links {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 48px;
}

.nav-cat-link {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-decoration: none;
    padding: 0 14px;
    height: 48px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-cat-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-cat-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-cat-link:hover::after {
    width: 60%;
}

/* ---- Nav Links V2 (Mobile slide-out) ---- */
.nav-links-v2 {
    display: none;
}

.nav-link-v2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    padding: 12px 0;
    text-decoration: none;
    display: block;
}

.nav-link-v2:hover {
    color: var(--accent-primary);
}

/* Mobile Contact Info (Inside Menu) */
.mobile-contact-info {
    display: none;
    margin-top: var(--space-6, 48px);
    padding-top: var(--space-6, 48px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-direction: column;
    gap: var(--space-3, 24px);
}

/* Actions */
.nav-actions-v2 {
    display: flex;
    align-items: center;
    gap: 0;
    height: 48px;
}

/* ---- Nav Search V2 ---- */
.nav-search-v2 {
    flex: 0 0 320px;
    margin: 0 20px;
    position: relative;
    z-index: 10;
}

.search-form-v2 {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 4px 6px 4px 18px;
    transition: all 0.3s ease;
}

.navbar.scrolled .search-form-v2,
.navbar.navbar-solid .search-form-v2 {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.search-form-v2:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.15);
}

.navbar.scrolled .search-form-v2:focus-within,
.navbar.navbar-solid .search-form-v2:focus-within {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.search-input-v2 {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 0;
    outline: none;
    width: 100%;
}

.navbar.scrolled .search-input-v2,
.navbar.navbar-solid .search-input-v2 {
    color: #1c1c1e;
}

.search-input-v2::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar.scrolled .search-input-v2::placeholder,
.navbar.navbar-solid .search-input-v2::placeholder {
    color: #8e8e93;
}

.search-submit-v2 {
    background: var(--accent-primary);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-submit-v2:hover {
    transform: scale(1.1);
    background: var(--accent-secondary);
}

@media (max-width: 1200px) {
    .nav-search-v2 {
        flex: 0 0 240px;
    }
}

@media (max-width: 992px) {
    .nav-search-v2 {
        display: none;
        /* Hide in mobile navbar, will be in mobile menu if needed */
    }
}

.nav-icon-btn-v2 {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    padding: 0 16px;
    height: 48px;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-icon-btn-v2:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle-wrapper {
    display: none;
}

.cart-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #d32f2f;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-hamburger {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 16px;
    height: 48px;
    align-items: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

@media (max-width: 992px) {
    .header-top-bar {
        height: 64px;
        overflow: hidden;
        /* Prevent wide banner from pushing width */
        width: 100%;
        max-width: 100vw;
    }

    .header-banner-col {
        overflow: hidden;
        max-width: 100%;
    }

    .header-logo-col {
        flex: 0 0 110px;
        padding: 4px 8px;
    }

    .header-logo-col img {
        height: 56px;
    }

    .banner-part-name {
        font-size: 1.3rem;
    }

    .banner-prefix {
        font-size: 0.8rem;
    }

    .banner-specials-tag {
        display: none;
    }

    #bannerPartImg {
        height: 56px;
        max-width: 120px;
        /* Reset complex transforms for mobile stability */
        transform: none !important;
        filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    }

    #headerBannerInner {
        padding: 0 16px;
    }

    .header-contacts-col,
    .header-actions-col {
        flex: 0 0 auto;
        padding: 0 8px;
        gap: 6px;
    }

    .header-actions-col {
        border-left: none;
    }

    .hdr-contact-btn,
    .hdr-action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .mobile-hamburger {
        display: flex;
        padding: 0;
        height: 30px;
        width: 30px;
        justify-content: center;
    }

    .nav-links-v2 {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        padding: 80px 24px;
        transform: translateX(100%);
        visibility: hidden;
        /* Prevent horizontal overflow trigger */
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
        z-index: 2000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }

    .nav-links-v2.active {
        transform: translateX(0);
        visibility: visible;
    }

    .mobile-contact-info {
        display: flex;
    }
}

@media (max-width: 992px) {

    /* ── Hide contact column only — keep actions visible (cart, hamburger, filter) ── */
    .header-contacts-col {
        display: none !important;
    }

    /* ── Hide nav category links bar on mobile ── */
    .nav-cat-links {
        display: none !important;
    }

    /* ── Let banner fill the remaining header width ── */
    .header-banner-col {
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    .banner-specials-tag {
        display: none;
    }
}

/* ── Mobile Bottom Navigation ──────────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 9000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8e8e93;
    background: none;
    border: none;
    gap: 4px;
    padding: 8px 0;
    flex: 1;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.bottom-nav-item.active {
    color: var(--accent-primary, #B8860B);
}

.bottom-cart-icon {
    position: relative;
}

.bottom-cart-icon .cart-badge {
    top: -8px;
    right: -10px;
}

@media (max-width: 992px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Offset footer padding so it doesn't get covered */
    body {
        padding-bottom: 70px;
    }

    /* Reposition FAB WhatsApp if it conflicts */
    .fab-whatsapp {
        bottom: 85px;
    }
}

/* Fix for Catalog Page Mobile Cart Visibility */
@media (max-width: 992px) {
    .header-actions-col {
        position: relative;
        right: 0;
        top: 0;
    }

    .catalog-sidebar {
        z-index: 9500;
    }
}

/* ── Floating WhatsApp Button ──────────────────── */
.fab-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease;
    animation: fab-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1s both;
}

.fab-whatsapp:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.55);
}

/* Pulse ring */
.fab-whatsapp::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.4);
    animation: fab-pulse 2.5s ease infinite;
}

@keyframes fab-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    60% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes fab-pop {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Show on all screens — hide on desktop if preferred */
@media (min-width: 993px) {
    .fab-whatsapp {
        /* Still visible on desktop but subtler */
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        bottom: 32px;
        right: 32px;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}