/* Global Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;
    font-size: 13px;
    background: #e0e0e0 url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSIvPgo8cGF0aCBkPSJNMCA1TDUgMFpNMCAwTDUgNVoiIHN0cm9rZT0iI2NjYyIgc3Ryb2tlLXdpZHRoPSIxIi8+Cjwvc3ZnPg==');
    color: #333;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: #205081;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout Container */
.container {
    width: 960px;
    margin: 20px auto;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Header */
header {
    background: linear-gradient(to bottom, #f9f9f9 0%, #e0e0e0 100%);
    border-bottom: 1px solid #ccc;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 0 #fff;
    margin: 0;
    font-family: Georgia, serif;
    line-height: 0;
}

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
    display: block;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop Navigation */
.desktop-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.desktop-nav ul li {
    display: inline-block;
    margin-right: 5px;
}

.desktop-nav ul li:not(.phone-item) a {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(to bottom, #8cc63f 0%, #6aa81e 50%, #558c14 51%, #7db72f 100%);
    color: #fff;
    text-decoration: none;
    border: 1px solid #44720e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.desktop-nav ul li:not(.phone-item) a:hover {
    background: linear-gradient(to bottom, #9dd552 0%, #7db72f 50%, #6aa81e 51%, #8cc63f 100%);
    text-decoration: none;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;

    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(to bottom, #f9f9f9 0%, #e0e0e0 100%);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding-top: 60px;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


.mobile-nav ul li {
    border-bottom: 1px solid #ccc;
}

.mobile-nav ul li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

.mobile-nav ul li a:hover {
    background: rgba(93, 156, 236, 0.1);
    text-decoration: none;
}

.lang-switcher-mobile {
    padding: 20px;
    text-align: center;
    border-top: 2px solid #ccc;
    margin-top: 20px;
}

/* Hero Section */
.hero {
    background: #dcecfb;
    background: linear-gradient(to bottom, #dcecfb 0%, #b0d4f7 100%);
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid #a0c0e0;
    position: relative;
}

.hero-content {
    background: rgba(255, 255, 255, 0.6);
    padding: 30px;
    border: 1px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.hero h1 {
    font-size: 29px;
    color: #205081;
    text-shadow: 1px 1px 0 #fff;
}

.hero p {
    font-size: 16px;
}

/* Buttons (Glossy Gel Style) */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(to bottom, #f0f0f0 0%, #d0d0d0 50%, #c0c0c0 51%, #e0e0e0 100%);
    border: 1px solid #999;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 0 #fff;
}

.btn:hover {
    background: linear-gradient(to bottom, #fff 0%, #e0e0e0 50%, #d0d0d0 51%, #f0f0f0 100%);
}

.btn-primary {
    background: linear-gradient(to bottom, #8cc63f 0%, #6aa81e 50%, #558c14 51%, #7db72f 100%);
    color: #fff;
    border-color: #44720e;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
    font-size: 17px;
    padding: 10px 26px;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #9dd552 0%, #7db72f 50%, #6aa81e 51%, #8cc63f 100%);
}

/* Categories Grid */
.categories {
    padding: 30px;
    background: url('../images/bg_gradient.png') repeat-x top #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-card {
    display: block;
    text-decoration: none;
    color: #333;
    border: 1px solid #ccc;
    padding: 15px;
    text-align: center;
    background: linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
    border-color: #999;
    box-shadow: 0 0 10px rgba(100, 150, 255, 0.3);
}

.category-title {
    font-weight: bold;
    margin-top: 10px;
    display: block;
    color: #205081;
}

/* Category Page Styles */
.category-page-container {
    padding: 20px;
}

.top-categories {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.category-layout {
    display: flex;
    gap: 20px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ccc;
    height: fit-content;
}

.main-content {
    flex-grow: 1;
}

.product-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Product Page Styles */
.product-page-container {
    padding: 20px;
}

.product-details-layout {
    background: #fff;
    border: none;
    display: flex;
    padding: 30px;
    border-top: 1px solid #ccc;
    background-color: #f9f9f9;
}

.product-main-image {
    width: 100%;
    border: 1px solid #999;
}

.product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #ccc;
}

.product-id {
    color: #666;
    font-size: 11px;
}

.status-in-stock {
    color: green;
}

.status-out-of-stock {
    color: red;
}

.product-specs {
    margin-top: 20px;
    padding: 10px;
    background: #f0f0f0;
    border: 1px solid #ccc;
}

.order-form {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ccc;
}

/* Info Section */
.info-section {
    display: flex;
    padding: 30px;
    border-top: 1px solid #ccc;
    background-color: #f9f9f9;
}

.info-left,
.info-right {
    flex: 1;
    padding: 10px;
}

.info-left img {
    border: 5px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
}

/* Footer */
footer {
    background: linear-gradient(to bottom, #444 0%, #222 100%);
    border-top: 1px solid #000;
    padding: 15px;
    text-align: center;
    font-size: 11px;
    color: #ccc;
}

footer a {
    color: #fff;
    margin: 0 5px;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
    border: 1px solid #aaa;
    padding: 5px;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    width: 100%;
    margin-bottom: 10px;
    background: #fff url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=');
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:focus {
    border-color: #5d9cec;
    box-shadow: 0 0 5px rgba(93, 156, 236, 0.5);
}

/* Utility */
.text-center {
    text-align: center;
}

.mb-10 {
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    position: relative;
}

.close {
    color: #888;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Admin Styles */
body.admin-body {
    background-color: #e0e0e0;
}

.admin-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border: 1px solid #999;
}

.admin-nav {
    background: #333;
    padding: 10px;
    margin-bottom: 20px;
}

.admin-nav a {
    color: #fff;
    margin-right: 15px;
    text-decoration: none;
    font-weight: bold;
}

.admin-nav a:hover {
    text-decoration: underline;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th,
.admin-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.admin-table th {
    background: #f0f0f0;
}

/* Login Page Styles */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: #e0e0e0;
}

.login-container {
    background: #fff;
    padding: 30px;
    border: 1px solid #ccc;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.captcha-group {
    background: #f0f0f0;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    text-align: left;
}

.captcha-label {
    font-weight: bold;
    color: #205081;
}

/* ============================================
   RESPONSIVE STYLES - Mobile First
   ============================================ */

@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 0;
        border: none;
        box-shadow: none;
    }

    /* Header Mobile */
    header {
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .header-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }

    .logo {
        font-size: 22px;
        margin-bottom: 0;
    }

    /* Show burger menu on mobile */
    .burger-menu {
        display: flex;
    }

    /* Hide desktop nav and lang switcher on mobile */
    .desktop-nav,
    .desktop-lang {
        display: none !important;
    }

    /* Show mobile nav */
    .mobile-nav {
        display: block;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 20px 10px;
    }

    /* Category Page Mobile */
    .category-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 10px;
    }

    .category-card img {
        height: 120px !important;
    }

    /* Product Page Mobile */
    .product-details-layout {
        flex-direction: column;
        padding: 15px;
    }

    .info-left,
    .info-right {
        width: 100%;
        padding: 0;
    }

    .info-right {
        margin-top: 20px;
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
    }

    /* Small mobile devices */
    @media (max-width: 480px) {
        .logo {
            font-size: 20px;
        }

        .grid {
            grid-template-columns: 1fr;
            gap: 10px;
        }

        .product-grid {
            grid-template-columns: repeat(2, 1fr);
            /* Keep 2 columns even on small screens if possible, or 1 */
        }

        .hero h1 {
            font-size: 20px;
        }

        .login-container {
            background: #fff;
            padding: 30px;
            border: 1px solid #ccc;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            text-align: center;
        }

        .login-container h2 {
            margin-top: 0;
            color: #333;
            margin-bottom: 20px;
        }

        .categories {
            padding: 15px;
        }

        .category-card {
            padding: 10px;
        }
    }
}

/* Language Switcher Flags */
.lang-switcher,
.lang-switcher-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.desktop-lang {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    z-index: 1000;
}

.lang-switcher a,
.lang-switcher-mobile a {
    display: inline-block;
    opacity: 0.8;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 0 !important;
}

.lang-switcher a:hover,
.lang-switcher a.active,
.lang-switcher-mobile a:hover,
.lang-switcher-mobile a.active {
    opacity: 1;
    transform: scale(1.1);
    background: none;
}

.lang-flag {
    width: 24px;
    height: auto;
    border: 1px solid #ccc;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

/* Phone Item - Icon in green button, number as text */
.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-phone a.phone-icon-btn {
    display: inline-block;
    padding: 4px 4px;
    background: linear-gradient(to bottom, #8cc63f 0%, #6aa81e 50%, #558c14 51%, #7db72f 100%);
    color: #fff;
    text-decoration: none;
    border: 1px solid #44720e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1;
    vertical-align: middle;
}

.header-phone a.phone-icon-btn:hover {
    background: linear-gradient(to bottom, #9dd552 0%, #7db72f 50%, #6aa81e 51%, #8cc63f 100%);
}

.header-phone a.phone-icon-btn svg {
    display: block;
    width: 12px;
    height: 12px;
}

.header-phone .phone-number {
    color: #333;
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    line-height: 1;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 15% auto;
        padding: 20px;
    }
}