:root {
    --primary-color: #022f4a;
    --primary-hover: #4338ca;
    --accent-color: #10b981;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.logo a {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.lang-switcher {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 20px;
}

.lang-switcher a {
    padding: 4px 12px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 16px;
}

.lang-switcher a.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 1.25rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    border-radius: 0 0 50px 50px;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Sections */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 60px 0 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 15px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid #d7d7d7;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.product-card .btn {
    background: #2e2e2e;
}

.product-card .btn:hover {
    background: #1a1a1a;
}

.product-card h3 {
    font-size: 0.95rem;
}

.product-card .price-tag {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Footer */
.site-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-info h3 span {
    color: var(--primary-color);
}

.footer-info p {
    color: var(--text-muted);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-seo h4 {
    margin-bottom: 20px;
}

.footer-seo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    margin-left: 15px;
}

.lang-toggle {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.lang-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 150px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    padding: 10px;
    z-index: 100;
    margin-top: 10px;
}

.lang-dropdown:hover .lang-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Bridge the gap for hover stability */
.lang-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    /* Covers the margin-top gap */
}

.lang-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.lang-menu a:hover,
.lang-menu a.active {
    background: #f1f5f9;
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f8fafc;
}

@media (max-width: 900px) {
    .site-header .container {
        position: relative;
    }

    /* Mobile Menu Toggle Visibility */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Main Nav Mobile Layout */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        /* Position relative to the header container bottom */
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
        gap: 15px;
        z-index: 1000;
        /* Ensure it's on top */
        margin-top: 15px;
        /* Slight gap from header */
        border-radius: 0 0 16px 16px;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-link {
        display: block;
        padding: 10px 0;
        text-align: center;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .pagination .btn {
        width: auto !important;
        min-width: 40px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px !important;
    }

    /* Language Dropdown Mobile */
    .lang-dropdown {
        width: 100%;
        margin-left: 0;
    }

    .lang-toggle {
        width: 100%;
        justify-content: center;
    }

    .lang-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-top: 10px;
        display: none;
    }

    .lang-dropdown:hover .lang-menu {
        display: flex;
    }

    /* Adjust container padding on mobile */
    .container {
        padding: 0 15px;
    }

    /* Stack Footer on Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Adjust Hero Size on Mobil */
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .site-footer {
        margin-top: 40px !important;
        padding: 40px 0 20px !important;
    }

    /* Table Responsive */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Homepage 2 columns products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 5px !important;
    }

    .product-card {
        padding: 10px !important;
        border-radius: 12px !important;
        min-width: 0;
        /* Critical for grid item shrinking */
        overflow: hidden;
        /* Ensure content stays inside */
    }

    .product-card .price-tag {
        font-size: 1rem !important;
    }

    .product-card h3 {
        font-size: 0.9rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        /* Ensure text respects container width */
        display: block;
    }

    .product-card div[style*="height: 140px"] {
        height: 100px !important;
        margin-bottom: 10px !important;
    }

    .product-card .btn {
        padding: 8px 5px !important;
        font-size: 0.8rem !important;
    }
}