:root {
    --primary: #1eb2a6;
    --primary-dark: #158b82;
    --secondary: #ffa07a;
    --text-color: #333333;
    --text-muted: #666666;
    --bg-color: #f7f9fa;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* === Navbar === */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

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

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* === Buttons === */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(30, 178, 166, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(30, 178, 166, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* === Main layout === */
.main-content {
    flex: 1;
}

/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, #1eb2a6 0%, #158b82 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* === Catalog Section === */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--text-color);
}

.section-title span {
    color: var(--primary);
}

.catalog-section {
    padding: 60px 0;
}

.categories-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

/* === Category Folder Card === */
.category-folder-card {
    transition: var(--transition);
    cursor: pointer;
}

.category-folder-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.category-folder-card .folder-cover img {
    transition: transform 0.5s ease;
}

.category-folder-card:hover .folder-cover img {
    transform: scale(1.1);
}

.category-folder-card i {
    transition: var(--transition);
}

.category-folder-card:hover i {
    transform: scale(1.1) rotate(-5deg);
    color: #ffd54f !important;
}

.product-img {
    height: 200px;
    background-color: #eaeaea;
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05); /* subtle zoom on hover */
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.badge {
    background-color: var(--secondary);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: auto;
    margin-bottom: 15px;
}

.product-card .btn {
    width: 100%;
    text-align: center;
}

/* === Product Details === */
.product-detail-section {
    padding: 60px 0;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.product-gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.product-meta h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.product-meta .category {
    display: inline-block;
    padding: 5px 12px;
    background-color: rgba(30, 178, 166, 0.1);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.product-meta .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
}

.product-meta .desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 40px;
}

/* === Footer === */
.footer {
    background-color: var(--white);
    border-top: 1px solid var(--border);
    padding: 60px 0 0 0;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info p {
    color: var(--text-muted);
    margin-top: 15px;
}

.footer-links h4, .footer-contact h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    background-color: #f1f1f1;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-container {
        padding: 10px 15px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo img {
        height: 45px !important; /* Smaller logo in mobile */
    }

    .logo span {
        font-size: 1.1rem !important; /* Smaller text next to logo */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 65px;
        left: 0;
        background-color: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-icon {
        display: block;
    }

    /* Hero Responsive */
    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 1.4rem; /* Even smaller to be more proportional */
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    /* Section Title */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .product-detail-wrapper {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    .product-meta h1 {
        font-size: 1.8rem;
    }

    .product-meta .price {
        font-size: 1.5rem;
    }

    .categories-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .categories-filter::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    .filter-btn {
        flex-shrink: 0;
    }
}

/* Admin Styles (simplified) */
.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-color);
}

.admin-login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 178, 166, 0.2);
}

/* Admin Dashboard */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #1e1e2d;
    color: #a2a3b7;
    padding-top: 20px;
    flex-shrink: 0;
    transition: var(--transition);
}

.admin-sidebar .logo {
    color: white;
    padding: 0 20px;
    margin-bottom: 30px;
    display: block;
}

.admin-nav li a {
    display: block;
    padding: 15px 20px;
    color: #a2a3b7;
    transition: all 0.3s;
}

.admin-nav li a:hover, .admin-nav li a.active {
    background: #1b1b28;
    color: white;
    border-left: 3px solid var(--primary);
}

.admin-content {
    flex: 1;
    background: #f2f3f8;
    padding: 30px;
    min-width: 0; /* Prevent flex overflow */
}

.admin-header {
    background: white;
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -30px -30px 30px -30px;
}

.sidebar-toggle, .admin-mobile-nav {
    display: none;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* === Admin Responsive === */
@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        height: 65px !important;
        z-index: 2000 !important;
        background: #1e1e2d !important;
        padding-top: 0 !important;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.2) !important;
        display: block !important;
    }
    
    .admin-sidebar .logo {
        display: none !important;
    }
    
    .admin-nav {
        display: flex !important;
        width: 100% !important;
        height: 100% !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .admin-nav li {
        flex: 1 !important;
        height: 100% !important;
        display: flex !important;
    }
    
    .admin-nav li a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 5px 0 !important;
        font-size: 0.62rem !important;
        gap: 2px !important;
        color: #a2a3b7 !important;
        text-align: center !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .admin-nav li a i {
        font-size: 1.4rem !important;
        margin-bottom: 2px !important;
    }
    
    .admin-nav li a:hover, .admin-nav li a.active {
        background: #2b2b3f !important;
        color: white !important;
        border-left: none !important;
        border-top: 3px solid var(--primary) !important;
    }
    
    .admin-content {
        padding: 15px !important;
        margin-top: 60px !important;
        padding-bottom: 80px !important;
    }
    
    .admin-mobile-nav {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: white !important;
        z-index: 1500 !important;
        align-items: center !important;
        padding: 0 20px !important;
        box-shadow: var(--shadow) !important;
        justify-content: center !important;
    }

    .sidebar-toggle, .sidebar-overlay {
        display: none !important;
    }
    
    .admin-header {
        margin: -15px -15px 15px -15px !important;
        padding: 15px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    
    .admin-header .btn-group {
        width: 100% !important;
        display: flex !important;
        gap: 10px !important;
    }
    
    .admin-header .btn {
        flex: 1 !important;
        text-align: center !important;
        padding: 10px !important;
    }
    
    .admin-header h2 {
        font-size: 1.3rem !important;
    }
    
    /* Responsive Grid in Forms */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}
