* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.logo-subtitle {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.logo-subtitle span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.search-container {
    flex: 1;
    max-width: 400px;
}

.search-box {
    position: relative;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box i {
    color: #7f8c8d;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-switch {
    position: relative;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-switch label {
    display: block;
    width: 50px;
    height: 25px;
    background: #3498db;
    border-radius: 25px;
    position: relative;
    cursor: pointer;
}

.toggle-switch label:after {
    content: '';
    position: absolute;
    width: 21px;
    height: 21px;
    background: white;
    border-radius: 50%;
    top: 2px;
    right: 2px;
    transition: 0.3s;
}

.toggle-switch input[type="checkbox"]:checked+label:after {
    left: 2px;
}

.language-flags {
    display: flex;
    gap: 5px;
}

.flag {
    width: 30px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.flag.active {
    opacity: 1;
}

/* Branch Info */
.branch-info {
    background: white;
    border-bottom: 1px solid #ecf0f1;
    padding: 15px 0;
}

.branch-details h2 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.branch-details p {
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-width: 100%;
    width: 100%;
    align-items: start;
}

/* Desktop: Force 6 columns when screen is wide enough */
@media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-image {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px 15px 15px;
    text-align: center;
}

.category-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

/* Products Section */
.products-section {
    animation: fadeIn 0.5s ease-in;
}

.back-button {
    margin-bottom: 20px;
}

.back-button button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    transition: background 0.3s;
}

.back-button button:hover {
    background: #2980b9;
}

#categoryTitle {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 100%;
    width: 100%;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.product-price {
    font-size: 1.1rem;
    color: #3498db;
    font-weight: bold;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }

    .container {
        padding: 0 15px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        position: relative;
    }

    .logo {
        align-self: flex-start;
        width: 100%;
    }

    .search-container {
        width: 100%;
        max-width: none;
        order: 2;
    }

    .header-actions {
        position: absolute;
        top: 0;
        right: 0;
        order: 1;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
        justify-items: center;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
        justify-items: center;
    }

    .category-card,
    .product-card {
        width: 100%;
        max-width: 350px;
    }

    .branch-details {
        text-align: center;
    }

    .branch-details h2 {
        font-size: 1.3rem;
    }

    .branch-details p {
        font-size: 0.9rem;
        justify-content: center;
    }

    #categoryTitle {
        font-size: 1.5rem;
        padding: 0 10px;
    }

    .main-content {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .logo-subtitle span {
        font-size: 0.9rem;
    }

    .logo-subtitle small {
        font-size: 0.7rem;
    }

    .category-image,
    .product-image {
        height: 150px;
        background-size: contain;
        background-repeat: no-repeat;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card,
    .product-card {
        max-width: 100%;
    }

    .search-box {
        padding: 10px 15px;
    }

    .search-box input {
        font-size: 0.9rem;
    }

    .header-actions {
        gap: 10px;
    }

    .toggle-switch label {
        width: 40px;
        height: 20px;
    }

    .toggle-switch label:after {
        width: 16px;
        height: 16px;
    }

    .flag {
        width: 25px;
        height: 16px;
    }

    #categoryTitle {
        font-size: 1.3rem;
    }

    .back-button button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}