:root {
    --primary-green: #6da32d;
    --hover-green: #5a8a24;
    --light-bg: #f3f8ee;
    --text-gray: #666;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* TOP BAR */
.top-bar {
    background: #f8f8f8;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-gray);
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.shipping-promo {
    color: var(--primary-green);
    font-weight: bold;
    margin-left: 15px;
}
.top-right a {
    text-decoration: none;
    color: inherit;
    margin-left: 15px;
}

/* hover */
.top-right a:hover {
    color: #6da32d;   /* your BUYPCB green */
}

.top-right a:hover i {
    color: #6da32d;
}

/* HEADER */
.main-header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 160px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: #333;
    cursor: pointer;
}
.logo span {
    color: var(--primary-green);
}

.desktop-nav {
    display: flex;
    gap: 50px;
}
.desktop-nav a {
    text-decoration: none;
    color: #444;
    font-size: 13px;
    font-weight: 700;
    transition: 0.3s;
}
.desktop-nav a:hover,
.nav-active {
    color: var(--primary-green);
}
.ai-link {
    color: var(--primary-green) !important;
}

/* HEADER ICONS */
.header-icons i {
    color: #000 !important;
    transition: color 0.3s ease;
}
.header-icons i:hover {
    color: var(--hover-green) !important;
}
.mobile-only i:hover {
    color: var(--hover-green) !important;
}

.header-icons {
    display: flex;
    gap: 20px;
    font-size: 20px;
    color: #000;
    margin-left: auto;
}

/* Mobile Toggle Button */
.mobile-only {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid var(--border-color);
}
.mobile-nav a {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #444;
    font-size: 14px;
    font-weight: 600;
}
.mobile-nav a:hover {
    background: var(--light-bg);
    color: var(--primary-green);
}
.mobile-nav.active {
    display: flex;
}

/* SEARCH */
.search-row {
    margin-top: 20px;
}
.search-wrapper {
    display: flex;
    max-width: 590px;
    margin: 0 auto;
}
.search-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px 0 0 6px;
    outline: none;
}
.search-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 6px 6px 0;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== UPDATED FOOTER (Matched to home.css) ===== */
.main-footer {
    background-color: #fcfcfc;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    margin-top: 50px;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    text-align: center;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.footer-col p, .footer-col li {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
    text-align: center;
}

.footer-col ul { 
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-col h3 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.footer-col h3 a:hover {
    color: var(--primary-green);
}


.footer-col ul a { 
    text-decoration: none; 
    color: var(--text-gray); 
    transition: 0.3s; 
    display: block;
    margin-bottom: 8px;
}

.footer-col ul a:hover { 
    color: var(--primary-green); 
}

.social-links { 
    display: flex; 
    gap: 15px; 
    margin-top: 15px;
    justify-content: center;
}

.social-links a {
    width: 35px;
    height: 35px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    text-decoration: none;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #888;
    width: 100%;
}

/* PRIVACY PAGE ONLY */
.privacy-hero {
    background: linear-gradient(180deg, #f6fbf1, #ffffff);
    text-align: center;
    padding: 70px 20px 50px;
    border-bottom: 1px solid var(--border-color);
}

.privacy-hero h1 {
    font-size: 36px;
    color: #111;
    margin-bottom: 10px;
}

.privacy-hero p {
    color: var(--text-gray);
    font-size: 14px;
    max-width: 600px;
    margin: 0 auto;
}

.privacy-content {
    max-width: 900px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.privacy-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 25px;
}

.privacy-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.privacy-card h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #111;
}

.privacy-card p,
.privacy-card li {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
}

.privacy-card ul {
    padding-left: 20px;
    margin: 15px 0;
}

.privacy-card li {
    margin-bottom: 8px;
}

/* ===== HIDE SUPPORT EMAIL BELOW 510px ===== */
@media (max-width: 510px) {
    /* Target the first span in .top-left (which contains the support email) */
    .top-left span:first-child {
        display: none !important;
    }
    /* Adjust top-right spacing when email is hidden */
    .top-right a {
        margin-left: 12px;
    }
}

/* ===== MOBILE (Portrait) 320px – 480px ===== */
@media (max-width: 480px) {
    /* Show Free Shipping in header */
    .top-left { 
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    .shipping-promo { 
        font-size: 11px;
        white-space: nowrap;
        margin-left: 0;
    }
    /* Adjust header to accommodate the visible shipping promo */
    .header-flex { 
        gap: 10px; 
        justify-content: space-between;
    }
    .desktop-nav { display: none; }
    .mobile-only { display: block; }
    .header-icons { font-size: 18px; gap: 15px; }
    
    .privacy-hero {
        padding: 40px 15px 30px;
    }
    .privacy-hero h1 {
        font-size: 28px;
    }
    .privacy-hero p {
        font-size: 13px;
        padding: 0 10px;
    }
    .privacy-content {
        margin: 30px auto;
        padding: 0 15px;
        gap: 20px;
    }
    .privacy-card {
        padding: 20px;
        border-radius: 10px;
    }
    .privacy-card h2 {
        font-size: 18px;
    }
    
    .search-wrapper { flex-direction: column; }
    .search-wrapper input { border-radius: 6px; }
    .search-btn { 
        border-radius: 6px; 
        margin-top: 10px; 
        padding: 12px; 
        justify-content: center; 
    }
    
    /* Footer Mobile */
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }
    .footer-col {
        align-items: center;
    }
    .footer-col h3,
    .footer-col p,
    .footer-col li {
        text-align: center;
    }
    .footer-col ul {
        align-items: center;
    }
    .social-links { justify-content: center; }
    
    /* Mobile nav specific */
    .mobile-nav { display: none; }
    .mobile-nav.active { display: flex; }
}

/* ===== MOBILE (Landscape) 481px – 767px ===== */
@media (min-width: 481px) and (max-width: 767px) {
    /* Ensure support email is visible again in landscape mode above 510px */
    .top-left span:first-child {
        display: inline !important;
    }
    .header-flex { gap: 40px; }
    .desktop-nav { display: none; }
    .mobile-only { display: block; }
    
    .privacy-hero {
        padding: 50px 20px 40px;
    }
    .privacy-hero h1 {
        font-size: 32px;
    }
    .privacy-content {
        margin: 40px auto;
        padding: 0 20px;
    }
    .privacy-card {
        padding: 25px;
    }
    
    /* Footer Mobile Landscape */
    .footer-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 30px; 
    }
    .footer-col {
        align-items: center;
    }
    .footer-col h3,
    .footer-col p,
    .footer-col li {
        text-align: center;
    }
    .footer-col ul {
        align-items: center;
    }
    .social-links { justify-content: center; }
    
    .search-wrapper { max-width: 100%; }
    
    /* Mobile nav specific */
    .mobile-nav { display: none; }
    .mobile-nav.active { display: flex; }
}

/* ===== TABLET (Portrait) 768px – 1024px ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    .header-flex { gap: 60px; }
    .desktop-nav { gap: 30px; }
    .mobile-nav { display: none !important; }
    .mobile-only { display: none !important; }
    .desktop-nav { display: flex !important; }
    
    .privacy-hero {
        padding: 60px 30px 50px;
    }
    .privacy-hero h1 {
        font-size: 34px;
    }
    .privacy-content {
        max-width: 95%;
        margin: 40px auto;
        padding: 0 20px;
    }
    
    /* Footer Tablet */
    .footer-grid { 
        grid-template-columns: 1.5fr 1fr 1fr; 
        gap: 30px; 
    }
    .footer-col {
        align-items: center;
    }
    .footer-col h3,
    .footer-col p,
    .footer-col li {
        text-align: center;
    }
    .footer-col ul {
        align-items: center;
    }
    .social-links { justify-content: center; }
}

/* ===== LAPTOPS / DESKTOPS 1025px – 1280px ===== */
@media (min-width: 1025px) and (max-width: 1280px) {
    .header-flex { gap: 100px; }
    .desktop-nav { gap: 40px; }
    .container { max-width: 1100px; }
    .mobile-nav { display: none !important; }
    .mobile-only { display: none !important; }
    .desktop-nav { display: flex !important; }
    
    .privacy-content {
        max-width: 85%;
    }
    
    .footer-grid { 
        grid-template-columns: 1.5fr 1fr 1fr 1fr; 
        gap: 30px; 
    }
    .footer-col {
        align-items: center;
    }
    .footer-col h3,
    .footer-col p,
    .footer-col li {
        text-align: center;
    }
    .footer-col ul {
        align-items: center;
    }
    .social-links { justify-content: center; }
}

/* ===== EXTRA LARGE SCREENS 1440px+ ===== */
@media (min-width: 1440px) {
    .container { max-width: 1400px; }
    .header-flex { gap: 200px; }
    .desktop-nav { gap: 50px; }
    .mobile-nav { display: none !important; }
    .mobile-only { display: none !important; }
    .desktop-nav { display: flex !important; }
    
    .privacy-hero {
        padding: 80px 20px 60px;
    }
    .privacy-hero h1 {
        font-size: 40px;
    }
    .privacy-content {
        max-width: 900px;
        margin: 60px auto;
    }
    
    .footer-grid { 
        grid-template-columns: 1.5fr 1fr 1fr 1fr; 
        gap: 40px; 
    }
    .footer-col {
        align-items: center;
    }
    .footer-col h3,
    .footer-col p,
    .footer-col li {
        text-align: center;
    }
    .footer-col ul {
        align-items: center;
    }
    .social-links { justify-content: center; }
}

/* ===== TABLET LANDSCAPE / SMALL LAPTOP 1025px-1280px (Adjustment) ===== */
@media (min-width: 1025px) and (max-width: 1280px) {
    .desktop-nav { gap: 30px; }
    .header-flex { gap: 120px; }
}

/* Additional responsive adjustments */
@media (max-width: 992px) {
    .privacy-content {
        padding: 0 20px;
    }
}

/* 1. Ensure consistent navigation behavior for larger screens */
@media (min-width: 993px) {
    .mobile-nav {
        display: none !important;
    }
    .mobile-only {
        display: none !important;
    }
    .desktop-nav {
        display: flex !important;
    }
}

/* 2. Refine the 768px - 1024px block to prevent overlaps */
@media (min-width: 768px) and (max-width: 1024px) {
    .header-flex {
        gap: 30px; /* Reduced gap to prevent logo/nav collision */
        justify-content: space-between;
    }
    .desktop-nav {
        gap: 15px; /* Tighter spacing for tablet portrait */
    }
    .desktop-nav a {
        font-size: 12px;
    }
    .container {
        max-width: 95%; /* Give more breathing room */
    }
}

/* Update the general top-bar responsive behavior */
@media (max-width: 767px) {
    .top-bar .container {
        justify-content: space-between;
        padding: 5px 15px;
        flex-wrap: wrap;
    }
    .top-left {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 5px;
    }
    .top-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

/* Fix for very small screens (below 350px) */
@media (max-width: 350px) {
    .shipping-promo {
        font-size: 10px !important;
    }
    .top-right a {
        font-size: 11px;
        margin-left: 8px;
    }
    .privacy-hero h1 {
        font-size: 24px !important;
    }
    .privacy-card {
        padding: 15px !important;
    }
}

/* Smooth scrolling for anchor links within privacy page */
html {
    scroll-behavior: smooth;
}