/* ========== headers.css – Complete style for Ogen E-commerce Header ========== */
/* Matches PHP header structure: top bar, main header, navigation, search, icons, dropdowns */
/* Fully responsive, matches original design system with primary orange (#e55a00) */

/* ---------- GLOBAL RESET & VARIABLES ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e55a00;
    --primary-dark: #cc5000;
    --primary-light: #ff6b00;
    --secondary: #222;
    --secondary-light: #333;
    --secondary-dark: #111;
    --text: #222;
    --text-light: #666;
    --text-muted: #999;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --light: #f5f5f5;
    --lighter: #fafafa;
    --white: #ffffff;
    --black: #000000;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.25s ease-in-out;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    font-family: var(--font-family);
    background: whitesmoke;
    overflow-x: hidden;
}

/* ---------- TOP BAR (Phone, Email, Login/Register) ---------- */
.top-bar {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    width: 100%;
    background-color:var(--white);
    margin: 0 auto;
}

.top-bar a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.top-bar a:hover {
    color: var(--primary);
}

.separator {
    margin: 0 10px;
    color: var(--text-muted);
}

/* ---------- MAIN HEADER (Logo, Search, Icons) ---------- */
.header {
    background: var(--white);
    padding: 0px 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: inline-block;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary-dark);
}

/* Logo image specific (circular logo from header) */
.logo img {
    width: 70px;
    height: 70px;
    border-radius: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.logo img:hover {
    transform: scale(1.02);
}

/* ---------- RESPONSIVE SEARCH BOX (Fully visible, no hidden elements) ---------- */
.search-box {
    width: 100%;
    position: relative;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-form {
    display: flex;
    width: 100%;
    border-radius: 48px;
    overflow: hidden;
    background: var(--white);
    border: 2px solid var(--border-light);
    transition: var(--transition);
}

.search-form:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(229, 90, 0, 0.1);
}

.search-form input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    font-size: 15px;
    outline: none;
    background: var(--white);
    font-weight: 400;
    color: var(--text);
}

.search-form input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-form button {
    background: var(--primary);
    border: none;
    padding: 0 22px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* Header Icons (Wishlist & Cart) */
.header-icons {
    display: flex;
    justify-content: flex-end;
    gap: 28px;
    align-items: center;
}

.header-icons a {
    color: var(--text-light);
    font-size: 24px;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
}

.header-icons a:hover {
    color: var(--primary);
    transform: scale(1.05);
}

.count-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ---------- NAVIGATION BAR (Horizontal scroll, no visible scrollbar per spec) ---------- */
.navbar {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    position: relative;
    z-index: 99;
    padding: 0;
  
    width: 100%;
    margin: 0 auto;
}

.navbar .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 12px;
    background: black; /* matches inline style from php header snippet */
}

/* No toggle button — full menu always visible with horizontal scroll */
.navbar-toggler {
    display: none;
}

/* Horizontal scroll wrapper */
.nav-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;   /* hide scrollbar Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.nav-scroll-wrapper::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    width: max-content;
    min-width: 100%;
    gap: 0;
}

.nav-item {
    position: relative;
    flex: 0 0 auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link i {
    font-size: 14px;
}

.nav-link:hover {
    background: var(--primary);
    color: var(--white);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

/* ---------- DROPDOWN MENU (Hover-based, categories) ---------- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    display: none;
    min-width: 220px;
    padding: 8px 0;
    margin: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    list-style: none;
    transform: translateY(0);
    will-change: transform;
}

.dropdown:hover .dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
}

/* Right-aligned dropdown for last items to prevent clipping */
.nav-item:last-child .dropdown-menu,
.nav-item:nth-last-child(2) .dropdown-menu {
    left: auto;
    right: 0;
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-item:hover {
    background: var(--lighter);
    color: var(--primary);
    padding-left: 25px;
}

.dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--border-light);
}

/* ---------- RESPONSIVE DESIGN (Matches all breakpoints from header) ---------- */
@media (max-width: 991px) {
    .logo {
        font-size: 24px;
        
    }
    .logo img {
        width: 60px;
        height: 60px;
    }
    .nav-link {
        padding: 12px 14px;
        font-size: 13px;
    }
    .header-icons {
        gap: 20px;
    }
    .header-icons a {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .header .row {
        row-gap: 12px;
    }
    .search-box {
        width: 100%;
        margin-top: 6px;
        margin-bottom: 4px;
    }
    .search-form input {
        padding: 10px 16px;
        font-size: 14px;
    }
    .search-form button {
        padding: 0 18px;
    }
    #contact{
        display: none !important;
    }
    .logo {
        font-size: 22px;
    }
    .logo img {
        width: 55px;
        height: 55px;
        display: none !important;
    }
    .header-icons {
        gap: 18px;
        justify-content: flex-end;
    }
    .header-icons a {
        font-size: 20px;
    }
    .count-badge {
        font-size: 10px;
        min-width: 16px;
        padding: 1px 5px;
        top: -7px;
        right: -10px;
    }
    .top-bar {
        font-size: 12px;
        padding: 6px 0;
    }
    .separator {
       
        margin: 0 6px;
    }
    .navbar-nav {
        gap: 2px;
    }
    .nav-link {
        padding: 10px 12px;
        font-size: 12px;
    }
    .nav-link i {
        font-size: 12px;
    }
    .dropdown-menu {
        min-width: 200px;
    }
    /* Ensure horizontal scroll wrapper is active */
    .nav-scroll-wrapper {
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 20px;
        display: none !important;
    }
    .logo img {
        width: 48px;
        height: 48px;
    }
    .header-icons {
        gap: 14px;
    }
    .header-icons a {
        font-size: 18px;
    }
    .count-badge {
        font-size: 9px;
        min-width: 14px;
        padding: 1px 4px;
        top: -6px;
        right: -8px;
    }
    .nav-link {
        padding: 8px 10px;
        font-size: 11px;
    }
    .nav-link i {
        font-size: 11px;
        margin-right: 2px;
    }
    .dropdown-item {
        padding: 8px 16px;
        font-size: 12px;
    }
    .search-form input {
        padding: 8px 12px;
        font-size: 13px;
    }
    .search-form button {
        padding: 0 14px;
        font-size: 14px;
    }
    .top-bar {
        font-size: 11px;
    }
    .top-bar a {
        font-size: 11px;
    }
    .separator {
        margin: 0 4px;
    }
}

@media (max-width: 450px) {
    .nav-link {
        padding: 6px 8px;
        font-size: 10px;
    }
    .nav-link i {
        font-size: 10px;
    }
    .logo {
        font-size: 18px;
    }
    .logo img {
        width: 42px;
        height: 42px;
    }
    .header-icons {
        gap: 12px;
    }
    .header-icons a {
        font-size: 17px;
    }
    .count-badge {
        font-size: 8px;
        min-width: 13px;
        padding: 1px 3px;
        top: -5px;
        right: -7px;
    }
    .dropdown-menu {
        min-width: 170px;
    }
    .dropdown-item {
        font-size: 11px;
        padding: 6px 14px;
    }
    .search-form input {
        padding: 7px 10px;
        font-size: 12px;
    }
}

/* Container padding consistency */
.container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Prevent dropdown clipping / overflow issues */
.navbar,
.navbar .container,
.navbar-nav,
.nav-scroll-wrapper {
    overflow: visible !important;
}

/* Touch device optimizations: maintain hover dropdowns and smooth scroll */
@media (hover: none) and (pointer: coarse) {
    .dropdown:hover .dropdown-menu {
        display: none;
    }
    /* optional: you could add click toggle via js, but pure css respects hover only */
    .nav-link:active {
        background: var(--primary);
    }
    .nav-scroll-wrapper {
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }
}

/* Remove any default focus ring for better aesthetics */
.nav-link:focus,
.dropdown-item:focus,
.search-form input:focus,
button:focus {
    outline: none;
}

/* Additional fine-tuning for top-bar inline elements (i + h6) */
.top-bar span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
}

.top-bar span i,
.top-bar span h6 {
    display: inline-block;
    margin: 0;
    font-size: inherit;
    font-weight: normal;
}

.top-bar .separator h6 {
    margin: 0;
    font-weight: 400;
}

/* Ensure icon-text alignment in header for accessibility */
.header-icons a i {
    vertical-align: middle;
}

/* Small extra: navbar container background uses black as inline style, but we ensure consistency */
.navbar .container[style*="background:black"] {
    background: #000 !important;
}