/*
 * store/store_theme.css
 * Shared Store UI theme — based on product_detail.php.
 * Central source of truth for colors, background, typography and navbar sizing.
 */
:root {
    --navy-1: #08182d;
    --navy-2: #0d2b52;
    --navy-3: #18467f;
    --navy0: var(--navy-1);
    --navy1: var(--navy-2);
    --navy2: var(--navy-3);
    --blue: #2f73d6;

    --gold-1: #fff8de;
    --gold-2: #f7dc86;
    --gold-3: #d9ad32;
    --gold-4: #9c6c08;
    --goldA: var(--gold-1);
    --goldB: var(--gold-2);
    --goldC: var(--gold-3);
    --goldD: var(--gold-4);

    --ink: #0f1728;
    --muted: #667085;
    --line: #dce7f6;
    --surface: rgba(255, 255, 255, .94);
    --success: #16803a;

    --radius: 22px;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --shadow: 0 18px 44px rgba(10, 25, 60, .13);
    --shadow-main: 0 18px 44px rgba(10, 25, 60, .13);
    --shadow-soft: 0 10px 28px rgba(10, 25, 60, .09);
    --ring: 0 0 0 4px rgba(246, 216, 120, .25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: "Sarabun", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    background:
        radial-gradient(1000px 500px at 100% -130px, rgba(246, 216, 120, .24), transparent 58%),
        radial-gradient(760px 400px at -10% -100px, rgba(100, 180, 255, .18), transparent 56%),
        linear-gradient(180deg, #f8fbff 0%, #eef6ff 45%, #edf3fb 100%);
}

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

/* ===== Shared navbar: product_detail baseline ===== */
.store-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding-top: env(safe-area-inset-top);
    color: #fff;
    background: linear-gradient(135deg, var(--navy-3), var(--navy-2) 58%, var(--navy-1));
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 10px 30px rgba(6, 21, 43, .18);
}

.store-nav .nav-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.store-nav .brand-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    color: #fff4cb;
    text-decoration: none;
    font-weight: 900;
}

.store-nav .brand-link:hover,
.store-nav .brand-link:focus-visible {
    color: #fff8de;
}

.store-nav .brand-badge {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    color: #2b1b00;
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2), var(--gold-3), var(--gold-4));
    border: 1px solid rgba(255, 246, 201, .32);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.store-nav .brand-badge img {
    width: 108%;
    height: 108%;
    object-fit: contain;
    display: block;
}

.store-nav .brand-title {
    min-width: 0;
    max-width: 290px;
    line-height: 1.05;
}

.store-nav .brand-title strong {
    display: block;
    overflow: hidden;
    color: #fff4cb;
    font-size: .98rem;
    font-weight: 900;
    letter-spacing: .04em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.store-nav .brand-title small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: rgba(255, 255, 255, .72);
    font-size: .70rem;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.store-nav .nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-width: 0;
    flex-shrink: 0;
}

.store-nav .nav-pill {
    min-height: 40px;
    padding: 0 .82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: .80rem;
    font-weight: 900;
    white-space: nowrap;
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .17);
    transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.store-nav .nav-pill:hover,
.store-nav .nav-pill:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.store-nav .nav-pill.is-gold {
    color: #2b1b00;
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2), var(--gold-3));
    border-color: rgba(255, 246, 201, .35);
}

.store-nav .nav-pill.is-gold:hover,
.store-nav .nav-pill.is-gold:focus-visible {
    color: #241600;
    box-shadow: 0 8px 18px rgba(217, 173, 50, .20);
}

.store-nav .nav-lang-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .15);
}

.store-nav .nav-lang-link {
    min-width: 42px;
    min-height: 32px;
    padding: 0 .58rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: rgba(255, 255, 255, .86);
    text-decoration: none;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.store-nav .nav-lang-link:hover,
.store-nav .nav-lang-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .10);
}

.store-nav .nav-lang-link.is-active {
    color: #2b1b00;
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
}

/* Shared focus treatment */
.store-nav a:focus-visible,
.store-nav button:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

@media (max-width: 767.98px) {
    .store-nav .brand-title {
        max-width: 180px;
    }
}

@media (max-width: 575.98px) {
    .store-nav .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .store-nav .nav-row {
        min-height: 66px;
        gap: 7px;
    }

    .store-nav .brand-link {
        gap: .5rem;
    }

    .store-nav .brand-badge {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 13px;
    }

    .store-nav .brand-title {
        max-width: 112px;
    }

    .store-nav .brand-title strong {
        font-size: .88rem;
        letter-spacing: .02em;
    }

    .store-nav .brand-title small {
        font-size: .62rem;
    }

    .store-nav .nav-actions {
        gap: 5px;
    }

    .store-nav .nav-pill {
        min-width: 40px;
        width: 40px;
        min-height: 40px;
        padding: 0;
    }

    .store-nav .nav-pill span {
        display: none;
    }

    .store-nav .nav-lang-switch {
        gap: 2px;
        padding: 3px;
    }

    .store-nav .nav-lang-link {
        min-width: 32px;
        min-height: 32px;
        padding: 0 6px;
        font-size: .68rem;
    }
}

@media (max-width: 420px) {
    .store-nav .brand-title {
        max-width: 92px;
    }

    .store-nav .brand-title small {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .store-nav * {
        transition: none !important;
    }
}

/* ===== STORE SHARED THEME V2 — 2026-08-13 =====
 * One navbar + one visual baseline for Store list/detail/frame pages.
 * Page-specific layout stays in assets/css/pages/*.css.
 */
.store-nav {
    isolation: isolate;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.store-nav .container.nav-row {
    width: 100%;
    min-height: 68px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.store-nav .brand-badge {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
}

.store-nav .brand-title strong {
    font-size: .95rem;
}

.store-nav .nav-pill {
    min-width: 40px;
    min-height: 40px;
    height: 40px;
    padding: 0 .78rem;
}

.store-nav .nav-lang-switch {
    min-height: 40px;
    align-items: center;
}

.store-nav .nav-lang-link {
    min-height: 30px;
}

/* shared soft surfaces */
.store-surface,
.store-panel {
    border: 1px solid rgba(10, 35, 71, .09);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 575.98px) {
    .store-nav .container.nav-row {
        min-height: 60px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .store-nav .brand-badge {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
    }

    .store-nav .brand-title {
        max-width: 118px;
    }

    .store-nav .brand-title strong {
        font-size: .86rem;
    }

    .store-nav .nav-pill {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
    }

    .store-nav .nav-lang-switch {
        min-height: 38px;
        padding: 3px;
    }

    .store-nav .nav-lang-link {
        min-width: 31px;
        min-height: 30px;
        padding: 0 5px;
        font-size: .66rem;
    }
}
