/* =============================================================
   header.css  —  Announcement Bar + Modern Overlay Header
   Save as:  assets/css/header.css
   ============================================================= */

/* --------------------------------------------------
   1. RESET CONFLICTS
-------------------------------------------------- */
body {
    padding-top: 0 !important;
    margin-top: 0 !important;
    overflow-x: hidden;
}

/* --------------------------------------------------
   2. ANNOUNCEMENT BAR
-------------------------------------------------- */
.announcement-bar {
    position: relative;
    z-index: 10001;
    width: 100%;
    background: #111111;
    height: 36px;
    overflow: hidden;
    display: flex;
    align-items: center;
    transition: height 0.35s ease, opacity 0.35s ease;
}

/* Hidden state when scrolled */
.announcement-bar.hide {
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Sliding track — contains two copies for seamless loop */
.ann-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    /* JS sets animation-duration dynamically */
    animation: annSlide 18s linear infinite;
}

/* Pause on hover */
.announcement-bar:hover .ann-track {
    animation-play-state: paused;
}

@keyframes annSlide {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Single item inside the track */
.ann-item {
    display: inline-flex;
    align-items: center;
    padding: 0 48px;
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
}

/* Separator dot between items */
.ann-item::after {
    content: '·';
    margin-left: 48px;
    opacity: 0.4;
    font-size: 14px;
}

/* Last item in each set — no trailing dot */
.ann-item:last-child::after {
    content: '';
    margin: 0;
}

/* Clickable item */
.ann-item a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 1px;
    transition: border-color 0.2s, color 0.2s;
}

.ann-item a:hover {
    color: #d4af6a;
    border-color: #d4af6a;
}

/* --------------------------------------------------
   3. HEADER SHELL
-------------------------------------------------- */
.modern-header {
    position: fixed;
    top: 36px;             /* sits right below announcement bar */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10000;
    background: #101010;
    padding: 20px 48px;
    transition: top 0.35s ease,
                padding 0.3s ease,
                background 0.4s ease,
                backdrop-filter 0.4s ease;
}

/* When user scrolls past 60px — announcement bar gone, header darkens */
.modern-header.scrolled {
    top: 0;
    padding: 13px 48px;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* --------------------------------------------------
   4. HEADER INNER LAYOUT  (3-column flex)
-------------------------------------------------- */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* ---- LEFT col ---- */
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

/* ---- CENTER col ---- */
.logo-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-center .main-logo {
    max-height: 54px;
    width: auto;
    display: block;
    /* invert dark logos to white for transparent header */
    filter: brightness(0) invert(1);
    transition: max-height 0.3s ease, filter 0.3s ease;
}

.modern-header.scrolled .logo-center .main-logo {
    max-height: 42px;
}

/* ---- RIGHT col ---- */
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

/* --------------------------------------------------
   5. HAMBURGER BUTTON
-------------------------------------------------- */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    outline: none;
}

.hamburger-btn .bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: #ffffff;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: left center;
}

/* Animate to X when mobile nav is open */
.hamburger-btn.open .bar:nth-child(1) { transform: rotate(45deg) translate(1px, -1px); }
.hamburger-btn.open .bar:nth-child(2) { opacity: 0; width: 0; }
.hamburger-btn.open .bar:nth-child(3) { transform: rotate(-45deg) translate(1px, 1px); }

/* --------------------------------------------------
   6. HEADER ICON BUTTONS  (search, whatsapp, user, cart)
-------------------------------------------------- */
.hdr-icon {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 17px;
    cursor: pointer;
    position: relative;
    padding: 0;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
    outline: none;
}

.hdr-icon:hover         { opacity: 0.65; }
.hdr-icon i             { color: #ffffff !important; }
.whatsapp-icon i        { font-size: 20px; }

/* Cart badge */
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ffffff;
    color: #111111;
    font-size: 9.5px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 2px;
}

/* --------------------------------------------------
   7. SEARCH BAR  (drops inside header)
-------------------------------------------------- */
.search-overlay {
    display: none;
    padding: 10px 48px 14px;
    animation: searchDrop 0.25s ease forwards;
}

.search-overlay.active {
    display: block;
}

@keyframes searchDrop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    padding-bottom: 4px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 4px 0;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.search-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    padding: 0;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.search-btn:hover { opacity: 1; }

/* --------------------------------------------------
   8. CUSTOMER DROPDOWN
-------------------------------------------------- */
.customer-dropdown {
    position: relative;
}

.customer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    outline: none;
}

.customer-dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #ebebeb;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.customer-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-header h4 {
    margin: 0 0 3px;
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.dropdown-header p {
    margin: 0;
    font-size: 11px;
    color: #999;
}

.dropdown-body { padding: 8px 0; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 12.5px;
    color: #333 !important;
    text-decoration: none !important;
    transition: background 0.18s;
}

.dropdown-item:hover {
    background: #f7f7f7;
    color: #000 !important;
}

.dropdown-item i {
    width: 14px;
    color: #aaa;
    font-size: 12px;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 6px 0;
}

.logout-item            { color: #e74c3c !important; }
.logout-item i          { color: #e74c3c; }

/* --------------------------------------------------
   9. HERO SLIDER — flush with top, behind header
-------------------------------------------------- */
#bootstrap-touch-slider,
#bootstrap-touch-slider.hero-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    height: calc(100vh - 36px);
    min-height: 560px;
    position: relative;
}

#bootstrap-touch-slider .item {
    height: calc(100vh - 36px);
    min-height: 560px;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
}

/* Slide text pushes down past transparent header */
.slide-text {
    padding-top: 110px;
}

/* Carousel prev/next arrows */
#bootstrap-touch-slider .carousel-control {
    width: 48px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.3s;
}

#bootstrap-touch-slider:hover .carousel-control {
    opacity: 0.6;
}

#bootstrap-touch-slider .carousel-control:hover {
    opacity: 1;
}

/* --------------------------------------------------
   10. HIDE LEGACY ELEMENTS
-------------------------------------------------- */
.nav.main-navigation  { display: none !important; }
.social-icons         { display: none !important; }
/* Old floating sidebar toggle — hide if not needed */
.floating-sidebar-toggle { display: none !important; }

/* --------------------------------------------------
   11. RESPONSIVE
-------------------------------------------------- */
@media (max-width: 992px) {
    .modern-header          { padding: 16px 30px; }
    .modern-header.scrolled { padding: 11px 30px; }
    .search-overlay         { padding: 10px 30px 14px; }
}

@media (max-width: 768px) {
    .announcement-bar  { height: 32px; }
    .ann-item          { font-size: 10.5px; letter-spacing: 1.5px; padding: 0 32px; }
    .ann-item::after   { margin-left: 32px; }

    .modern-header          { top: 32px; padding: 13px 18px; }
    .modern-header.scrolled { top: 0;    padding: 10px 18px; }

    #bootstrap-touch-slider,
    #bootstrap-touch-slider .item {
        height: calc(100svw * 1.15);
        min-height: 380px;
    }

    .logo-center .main-logo       { max-height: 40px; }
    .modern-header.scrolled .logo-center .main-logo { max-height: 34px; }

    .header-right { gap: 16px; }
    .hdr-icon     { font-size: 16px; }

    .search-overlay  { padding: 10px 18px 14px; }

    .slide-text { padding-top: 80px; }
}

@media (max-width: 480px) {
    .header-right { gap: 14px; }
    .whatsapp-icon { display: none; } /* hide on very small screens if crowded */
}


