@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600&display=swap');

.category-detail .empty-state {
    grid-column: auto;
}
:root {
    color-scheme: dark;
    --bg: #111316;
    --surface: #1b1d21;
    --surface-light: #262a31;
    --text: #f2f5f7;
    --muted: #c2c6cc;
    --accent: #ffb347;
    --accent-2: #ff5f6d;
    --radius: 18px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background-color: #0d0f12;
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px clamp(16px, 4vw, 32px) 60px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--surface);
    border-radius: var(--radius);
    position: sticky;
    top: 12px;
    z-index: 10;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: var(--surface-light);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-2px);
    background: #303540;
}

.icon-home {
    width: 18px;
    height: 18px;
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    mask: url('data:image/svg+xml,%3Csvg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23000" d="M11 3.6L2 12h2v8h6v-6h4v6h6v-8h2L13 3.6a2 2 0 0 0-2 0z"/%3E%3C/svg%3E') center/contain;
}

.brand-text .brand-name {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.brand-text small {
    color: var(--muted);
}

.language-switcher select {
    background: var(--surface-light);
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
}

.hero {
    text-align: center;
    margin: 12px auto 10px;
}

.hero-logo {
    width: 110px;
    height: auto;
    margin-bottom: 6px;
}

.hero-text {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-name {
    font-size: clamp(1.4rem, 1.7vw, 1.9rem);
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.25;
}

.hero-description {
    color: var(--muted);
    line-height: 1.35;
    margin: 0;
    font-size: 0.98rem;
}


.section-title {
    font-size: 1.1rem;
    margin-bottom: 18px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--surface);
    border: none;
    border-radius: 22px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--text);
}

.category-card.active,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    background: linear-gradient(145deg, #242831, #1c1f24);
}

.category-card .image-wrapper {
    width: 100%;
    height: 150px;
    border-radius: 18px;
    background: var(--surface-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-title {
    display: block;
    width: 100%;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    line-height: 1.4;
    font-family: 'Montserrat', 'Poppins', 'Segoe UI', sans-serif;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--surface-light);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.products {
    margin-top: 50px;
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.search-box {
    flex: 1;
    text-align: right;
}

.search-box input {
    width: min(280px, 100%);
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid #2d323a;
    background: var(--surface);
    color: var(--text);
}

.product-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.home .product-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.category-detail .product-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 30px;
    background: var(--surface);
    border-radius: var(--radius);
}

.home .empty-state,
.category-detail .empty-state {
    grid-column: auto;
}

.product-card {
    background: var(--surface);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.home .product-card,
.category-detail .product-card {
    flex-direction: row;
    min-height: 160px;
    align-items: stretch;
}

.product-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: var(--surface-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.home .product-image,
.category-detail .product-image {
    flex: 0 0 160px;
    padding-top: 0;
    height: 160px;
}

.product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 12px;
}

.home .product-image img,
.category-detail .product-image img {
    position: static;
    width: 100%;
    height: 100%;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.home .product-card:hover .product-image img,
.category-detail .product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-meta {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home .product-meta,
.category-detail .product-meta {
    flex: 1;
    justify-content: center;
}

.product-title {
    margin: 0;
    font-weight: 600;
}
.home .product-title {
    font-size: 0.95rem;
}

.product-description {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.product-price {
    margin: 0;
    font-weight: 600;
    color: var(--accent);
}

.home .product-price,
.category-detail .product-price {
    margin-top: auto;
    text-align: right;
    font-size: 1.05rem;
}

.app-footer {
    text-align: center;
    color: var(--muted);
    margin-top: 60px;
    font-size: 0.85rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand {
        flex: 1;
    }

    .language-switcher {
        margin-left: auto;
    }

    .page {
        padding: 12px;
    }
}

@media (max-width: 430px) {
    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .category-title {
        font-size: 0.82rem;
        padding: 7px 10px;
        line-height: 1.25;
        letter-spacing: 0;
        display: block;
        width: 100%;
        white-space: normal !important;
        word-break: normal;
        overflow: visible !important;
        text-overflow: unset !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-orient: unset !important;
    }
    .home .product-title {
        font-size: 0.9rem;
        line-height: 1.35;
    }
    .category-card {
        padding: 18px;
        gap: 14px;
    }
    .category-card .image-wrapper {
        height: 170px;
    }
}

