/* ========================================
   MODERN CLEAN HEADER DESIGN
   Based on Behance Reference
   ========================================
   
   Features:
   - Clean red ribbon with contact info
   - Logo + integrated search + action buttons
   - No separate category dropdown
   - Fully responsive
   - No bugs or glitches
   ======================================== */

/* ========================================
   1. RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c83d3d;
    --primary-hover: #a83030;
    --text-color: #333;
    --border-color: #e9ecef;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

main {
    min-height: calc(100vh - 400px);
}

.hidden {
    display: none !important;
}

/* ========================================
   2. SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* ========================================
   3. TOP RIBBON
   ======================================== */
.ribbon {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/*.ribbon::after {*/
/*    content: '';*/
/*    position: absolute;*/
/*    top: 100%;*/
/*    left: 50%;*/
/*    transform: translateX(-50%);*/
/*    width: 0;*/
/*    height: 0;*/
/*    border-left: 12px solid transparent;*/
/*    border-right: 12px solid transparent;*/
/*    border-top: 12px solid #c83d3d;*/
/*}*/

.ribbon-left {
    flex: 1;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.ribbon-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.ribbon-link {
    color: white;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ribbon-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ribbon-link i {
    font-size: 14px;
}

.social-icons-ribbon {
    padding: 5px 8px;
}

/* ========================================
   4. MAIN NAVIGATION BAR
   ======================================== */
#nav-container-to-replace {
    position: sticky;
    top: 0;
    z-index: 998;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.navbar {
    background: white;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ========================================
   5. LOGO SECTION
   ======================================== */
.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    flex-shrink: 0;
}

.navbar .logo img {
    height: 55px;
    width: 50px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.navbar .logo img:hover {
    transform: scale(1.05);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.9;
}

.logo-link img {
  pointer-events: none;
}

.logo-link .brand-name {
  pointer-events: none;
}

.navbar #brand-name-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    font-style: italic;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.navbar #brand-name-header:hover {
    color: var(--primary-hover);
}

/* ========================================
   6. NAV ELEMENTS CONTAINER
   ======================================== */
.nav-elements-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ========================================
   7. MODERN INTEGRATED SEARCH BAR
   ======================================== */
.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 700px;
    height: 50px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-container:hover,
.search-container:focus-within {
    box-shadow: 0 4px 16px rgba(200, 61, 61, 0.2);
    border-color: var(--primary-hover);
}

/* Category Dropdown Inside Search */
.select-wrapper {
    position: relative;
    min-width: 170px;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.search-category {
    width: 100%;
    height: 50px;
    padding: 0 35px 0 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    outline: none;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    appearance: none;
}

.search-category option {
    background: white;
    color: var(--text-color);
}

.chevron-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--primary-color);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.search-category:focus ~ .chevron-icon {
    transform: translateY(-50%) rotate(180deg);
}

/* Search Input Container */
.search-input-container {
    display: flex;
    flex-grow: 1;
    align-items: center;
    padding: 0 15px;
}

.search-input {
    flex-grow: 1;
    height: 50px;
    padding: 0 10px;
    font-size: 14px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-color);
}

.search-input::placeholder {
    color: #999;
}

/* Voice Icon */
.voice-icon {
    font-size: 18px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-icon:hover {
    background: rgba(200, 61, 61, 0.1);
    transform: scale(1.1);
}

/* Search Button */
.search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e94545 100%);
    color: white;
    border: none;
    padding: 0 28px;
    height: 50px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 50px 50px 0;
    margin-right: -17px;
    flex-shrink: 0;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: scale(1.02);
}

.search-btn i {
    font-size: 16px;
}

/* ========================================
   8. ACTION BUTTONS (RIGHT SIDE)
   ======================================== */
.navbar-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.navbar-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
}

.navbar-nav a i {
    font-size: 16px;
}

.navbar-nav a:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e94545 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 61, 61, 0.3);
}

/* Login Link - Special Style */
#login-link {
    border: 1px solid var(--primary-color);
}

/* Post Requirement - Primary Button */
#post-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e94545 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(200, 61, 61, 0.2);
}

#post-link:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 16px rgba(200, 61, 61, 0.4);
}

/* Become A Seller Button */
#seller-link {
    background: var(--bg-light);
}

#seller-link:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e94545 100%);
    color: white;
}

/* ========================================
   9. DROPDOWN (ACCOUNT, MORE)
   ======================================== */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.dropdown.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    padding: 12px 18px;
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background: linear-gradient(90deg, rgba(200, 61, 61, 0.05) 0%, transparent 100%);
    color: var(--primary-color);
    padding-left: 24px;
}

.dropdown-content a i {
    font-size: 16px;
    color: #6c757d;
    width: 18px;
}

.dropdown-content a:hover i {
    color: var(--primary-color);
}

/* Hide categories dropdown completely */
.categories-dropdown-header {
    display: none !important;
}

/* Hide cart icon */
.cart-icon {
    display: none !important;
}

/* Hide more menu dropdown */
.more-menu-dropdown {
    display: none !important;
}

/* ========================================
   10. MOBILE MENU TOGGLE
   ======================================== */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--primary-color);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(200, 61, 61, 0.1);
}

/* ========================================
   11. BOTTOM NAVIGATION (MOBILE)
   ======================================== */
.navbar-nav-bottom {
    display: none;
    background: white;
    padding: 12px 0;
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 1000;
    border-radius: 25px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.navbar-nav-bottom ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    margin: 0;
}

.navbar-nav-bottom a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.navbar-nav-bottom i {
    font-size: 22px;
    color: #495057;
    transition: all 0.3s ease;
}

.navbar-nav-bottom span {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

.navbar-nav-bottom a:hover {
    background: rgba(200, 61, 61, 0.05);
}

.navbar-nav-bottom a:hover i,
.navbar-nav-bottom a:hover span {
    color: var(--primary-color);
}

.navbar-nav-bottom .home-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e94545 100%);
    padding: 14px 20px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(200, 61, 61, 0.4);
    border: 3px solid white;
}

.navbar-nav-bottom .home-icon i,
.navbar-nav-bottom .home-icon span {
    color: white;
}

/* ========================================
   12. FOOTER
   ======================================== */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(236, 240, 241, 0.1);
}

.footer-column h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-column ul li a i {
    color: #7f8c8d;
}

.footer-column ul li a:hover i {
    color: var(--primary-color);
}

.footer-logo-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
}

.footer-logo span,
#brand-name-footer {
    font-size: 24px;
    font-weight: 700;
    color: white;
    cursor: pointer;
}

.footer-description {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.8;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(200, 61, 61, 0.4);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: rgba(0, 0, 0, 0.2);
    margin-top: 40px;
}

.footer-copy {
    color: #bdc3c7;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* ========================================
   13. FLOATING BUTTONS
   ======================================== */
.whatsapp-btn,
.call-btn,
.back-to-home-btn {
    position: fixed;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 3px solid white;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    bottom: 150px;
}

.call-btn {
    background: linear-gradient(135deg, #34b7f1 0%, #007bff 100%);
    bottom: 220px;
}

.back-to-home-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    bottom: 290px;
}

.whatsapp-btn i,
.call-btn i,
.back-to-home-btn i {
    color: white;
    font-size: 26px;
}

.whatsapp-btn:hover,
.call-btn:hover,
.back-to-home-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* ========================================
   14. MEDIA QUERIES - MOBILE RESPONSIVE
   ======================================== */

/* Tablets (1024px) */
@media screen and (max-width: 1024px) {
    .navbar {
        padding: 12px 30px;
    }

    .search-container {
        max-width: 500px;
    }

    .navbar .logo {
        min-width: 180px;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-logo-section {
        grid-column: 1 / -1;
    }
}

/* Tablets & Mobile (768px) */
@media screen and (max-width: 768px) {
    /* Ribbon */
    .ribbon {
        padding: 8px 20px;
        font-size: 12px;
    }

    .ribbon-right {
        display: none;
    }

    .ribbon-left {
        text-align: center;
        width: 100%;
    }

    /* Navbar */
    .navbar {
        padding: 10px 20px;
        gap: 15px;
    }

    .navbar .logo {
        min-width: auto;
    }

    .navbar .logo img {
        height: 50px;
        width: 50px;
    }

    #brand-name-header {
        display: none;
    }

    /* Search Container */
    .search-container {
        max-width: 100%;
        height: 46px;
    }

    .select-wrapper {
        display: none;
    }

    .search-input {
        height: 46px;
        font-size: 13px;
        padding: 0 8px;
    }

    .search-btn {
        height: 46px;
        padding: 0 20px;
    }

    /* Mobile Menu */
    .menu-toggle {
        display: block;
        order: 3;
    }

    .navbar-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        transition: left 0.4s ease;
        z-index: 9999;
        overflow-y: auto;
        align-items: stretch;
    }

    .navbar-nav.open {
        left: 0;
    }

    .navbar-nav a {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 18px;
        border-radius: 12px;
        margin-bottom: 8px;
        border: 1px solid #c83d3d !important;
        background: #ebebeb !important;
        color: #c83d3d !important;
    }

    #post-link,
    #seller-link {
        background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    }

    /* Bottom Navigation */
    .navbar-nav-bottom {
        display: block;
    }

    /* Footer */
    footer {
        margin-bottom: 90px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Hide floating buttons on mobile */
    .whatsapp-btn,
    .call-btn,
    .back-to-home-btn {
        display: none;
    }
}

/* Small Mobile (600px) */
@media screen and (max-width: 600px) {
    .ribbon {
        padding: 6px 15px;
        font-size: 11px;
    }

    .navbar {
        padding: 8px 15px;
    }

    .navbar .logo img {
        height: 45px;
        width: 45px;
    }

    .search-container {
        height: 42px;
    }

    .search-input {
        height: 42px;
        font-size: 12px;
    }

    .search-btn {
        height: 42px;
        padding: 0 18px;
    }

    .voice-icon {
        font-size: 16px;
    }

    .navbar-nav-bottom {
        bottom: 5px;
        left: 5px;
        right: 5px;
    }

    .navbar-nav-bottom i {
        font-size: 20px;
    }

    .navbar-nav-bottom span {
        font-size: 10px;
    }

    .footer-container {
        padding: 0 20px;
    }
}

/* Extra Small Mobile (480px) */
@media screen and (max-width: 480px) {
    .ribbon-left {
        font-size: 10px;
    }

    .navbar .logo img {
        height: 40px;
        width: 40px;
    }

    .search-container {
        height: 40px;
    }

    .search-input,
    .search-btn {
        height: 40px;
    }

    .search-btn {
        padding: 0 16px;
    }

    .footer-logo span,
    #brand-name-footer {
        font-size: 20px;
    }

    .footer-description {
        font-size: 13px;
    }
}

/* ========================================
   15. ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus-visible {
    outline: 2px solid rgba(200, 61, 61, 0.5);
    outline-offset: 2px;
}