:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background:
        radial-gradient(circle at top, rgba(255, 248, 191, 0.08), transparent 28%),
        linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 88%, #000));
}

body.menu-overlay-open {
    overflow: hidden;
}

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

button,
input {
    font: inherit;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    padding: 14px 14px 22px;
}

.app-main {
    width: min(100%, 430px);
    margin: 0 auto;
}

.topbar {
    width: min(100%, 430px);
    margin: 0 auto 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    display: grid;
    place-items: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    cursor: pointer;
}

.icon-bars,
.icon-search,
.icon-close {
    width: 20px;
    height: 20px;
    position: relative;
    display: inline-block;
}

.icon-bars::before,
.icon-bars::after,
.icon-bars {
    background: transparent;
}

.icon-bars::before,
.icon-bars::after,
.icon-search::before,
.icon-search::after,
.icon-close::before,
.icon-close::after {
    content: '';
    position: absolute;
}

.icon-bars::before {
    top: 2px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.icon-search::before {
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    top: 1px;
    left: 1px;
}

.icon-search::after {
    width: 8px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    bottom: 2px;
    right: 0;
    border-radius: 999px;
}

.icon-close::before,
.icon-close::after {
    width: 18px;
    height: 2px;
    background: currentColor;
    top: 9px;
    left: 1px;
    border-radius: 999px;
}

.icon-close::before {
    transform: rotate(45deg);
}

.icon-close::after {
    transform: rotate(-45deg);
}

.hero-card {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
    background: color-mix(in srgb, var(--card) 8%, #000);
}

.hero-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8.3;
    object-fit: cover;
}

.hero-image.is-hidden {
    display: none;
}

.hero-image-fallback {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 248, 191, 0.18), transparent 26%),
        linear-gradient(135deg, #533024, #2a1511);
}

.brand-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 4px 12px;
    flex-wrap: wrap;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 250px;
}

.brand-logo {
    max-width: 90px;
    width: auto;
    height: auto;
    max-height: 64px;
    object-fit: cover;
    border-radius: 18px;
    background: rgba(255, 248, 191, 0.12);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
    flex: 0 0 auto;
}

.brand-fallback {
    display: block;
    font-weight: 800;
    color: var(--text);
    background: transparent;
    box-shadow: none;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy {
    min-width: 0;
}

.brand-copy h1 {
    margin: 0;
    font-size: 1.38rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--card);
}

.brand-copy p {
    margin: 8px 0 0;
    opacity: 0.72;
    font-size: 0.88rem;
    color: var(--card);
}

.lang-pills {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.lang-pill {
    border: 0;
    min-width: 42px;
    padding: 8px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card) 30%, transparent);
    color: var(--text);
    font-weight: 700;
    font-size: 0.82rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lang-pill.active {
    background: var(--card);
}

.section-chip-wrap {
    padding: 10px 0 16px;
}

.section-chip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.section-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    max-width: 100%;
    text-align: center;
}

.content-section {
    padding-bottom: 18px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--card);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.text-link:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.text-link:active {
    transform: translateY(0);
    opacity: 0.9;
}

@media (max-width: 360px) {
    .section-chip-row {
        gap: 10px;
    }

    .section-chip {
        min-width: 0;
        flex: 1 1 auto;
    }

    .text-link {
        flex: 0 0 auto;
    }
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.category-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.35)),
        linear-gradient(135deg, #684033, #2f1713);
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
    isolation: isolate;
}

.category-card-image {
    background-blend-mode: overlay, normal;
}

.category-card-fallback {
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 248, 191, 0.24), transparent 30%),
        linear-gradient(135deg, #7c4b3b, #4b2a22);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.62));
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(255, 248, 191, 0.14));
}

.category-title {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    color: #f8f2df;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.product-stack {
    display: grid;
    gap: 12px;
}

.product-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    color: var(--text);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.product-thumb {
    width: 92px;
    height: 92px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(42, 18, 15, 0.08);
    flex: 0 0 auto;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumb-fallback {
    background:
        radial-gradient(circle at 25% 25%, rgba(255, 248, 191, 0.45), transparent 35%),
        linear-gradient(135deg, #7a4a3b, #4b2a22);
}

.product-copy {
    min-width: 0;
}

.product-copy h3 {
    margin: 2px 0 6px;
    font-size: 1rem;
    line-height: 1.15;
}

.product-copy p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    opacity: 0.82;
}

.price {
    margin-top: 9px;
    font-size: 0.95rem;
    font-weight: 800;
}

.empty-state {
    padding: 24px 16px;
    text-align: center;
    border-radius: 20px;
    background: rgba(255, 248, 191, 0.08);
    color: rgba(248, 242, 223, 0.82);
}

.footer-note {
    padding: 100px 10px 6px;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.72;
    color: var(--card);
}

.drawer,
.search-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 50;
}

.drawer.open,
.search-modal.open {
    display: block;
}

.drawer::before,
.search-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.drawer-panel {
    position: relative;
    width: min(88vw, 380px);
    height: 100%;
    margin-right: auto;
    padding: 18px;
    background: var(--bg);
    color: var(--text);
    overflow-y: auto;
    transform: translateX(-12px);
}

.drawer-head,
.search-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text);
}

.drawer-head strong {
    color: var(--card);
}

.drawer-section + .drawer-section {
    margin-top: 18px;
}

.drawer-section-title {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    background: var(--card);
    color: var(--text);
    text-transform: uppercase;
}

.drawer-list {
    display: grid;
    gap: 10px;
}

.drawer-category-nav {
    display: grid;
    gap: 14px;
}

.drawer-category-group {
    display: grid;
    gap: 8px;
}

.drawer-category-main {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: var(--card);
    color: var(--text);
    transition: filter 0.18s ease, transform 0.18s ease;
}

.drawer-category-main-image {
    overflow: hidden;
}

.drawer-category-main-fallback {
    background: var(--card);
}

.drawer-category-thumb {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--bg);
    background-size: cover;
    background-position: center;
    flex: 0 0 44px;
}

.drawer-category-main:hover,
.drawer-category-main:active,
.drawer-row:hover,
.drawer-row:active,
.drawer-category-child:hover,
.drawer-category-child:active {
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.drawer-category-name {
    min-width: 0;
    font-weight: 700;
    line-height: 1.25;
}

.drawer-category-children {
    display: grid;
    gap: 6px;
    padding-left: 14px;
    margin-left: 16px;
    border-left: 1px solid rgba(42, 18, 15, 0.12);
}

.drawer-category-child {
    padding: 8px 12px;
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    font-size: 0.92rem;
    opacity: 0.9;
    transition: filter 0.18s ease, transform 0.18s ease;
}

.drawer-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    transition: filter 0.18s ease, transform 0.18s ease;
}

.drawer-icon {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    color: currentColor;
    flex: 0 0 18px;
    font-size: 18px;
    line-height: 1;
}

.drawer-icon i {
    width: 18px;
    height: 18px;
    display: block;
    line-height: 18px;
}

.drawer-value {
    min-width: 0;
    word-break: break-word;
    line-height: 1.35;
}

.search-modal {
    place-items: center;
}

.search-panel {
    position: relative;
    width: min(92vw, 430px);
    padding: 18px;
    border-radius: 24px;
    margin: auto;
    background: var(--background);
    color: var(--text);
}

.search-form {
    display: grid;
    gap: 12px;
}

.search-form input {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--text) 28%, transparent);
    border-radius: 16px;
    padding: 14px 16px;
    background: var(--card);
    color: var(--text);
}

.search-form input::placeholder {
    color: color-mix(in srgb, var(--text) 55%, transparent);
}

.search-results {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    max-height: 52vh;
    overflow: auto;
    color: var(--text);
}

.search-result {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
    transition: filter 0.18s ease, transform 0.18s ease;
}

.search-result strong {
    font-size: 0.96rem;
    color: var(--text);
}

.search-result small {
    color: color-mix(in srgb, var(--text) 74%, transparent);
    line-height: 1.35;
}

.search-result .search-price {
    font-weight: 800;
    color: var(--text);
}

.search-result .search-category {
    font-size: 0.8rem;
    color: color-mix(in srgb, var(--text) 70%, transparent);
}

.search-result:hover,
.search-result:active {
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.search-results .empty-state {
    background: var(--card);
    color: var(--text);
}

.search-title-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
}

@media (min-width: 768px) {
    .app-shell {
        padding-top: 18px;
    }
}

@media (max-width: 420px) {
    .brand-block {
        flex-basis: 100%;
    }

    .lang-pills {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .brand-row {
        align-items: flex-start;
    }
}
