/* ============================================================
   AMAZOON MARKET — online supermarket
   Theme matched to logo: navy + smile orange (Amazon-like)
   Light surfaces · RTL · Vazirmatn
   ============================================================ */

:root {
    /* Brand — from logo */
    --navy: #232f3e;
    --navy-dark: #131a22;
    --navy-mid: #37475a;
    --navy-soft: #e8eef5;

    --accent: #ff9900;
    --accent-dark: #e47911;
    --accent-light: #fff6e8;
    --accent-tint: rgba(255, 153, 0, 0.18);

    /* Legacy aliases used across components (= brand accent) */
    --green: var(--accent);
    --green-dark: var(--accent-dark);
    --green-light: var(--accent-light);
    --green-tint: var(--accent-tint);

    /* Surfaces & text */
    --bg: #eaeded;
    --surface: #ffffff;
    --surface-alt: #f5f6f6;
    --border: #d5dbdb;
    --border-strong: #aeb6b6;
    --text: #0f1111;
    --text-muted: #565959;
    --text-soft: #888c8c;
    --text-on-dark: #ffffff;
    --text-on-dark-muted: #d5d9d9;

    /* States */
    --danger: #b12704;
    --danger-light: #fcebea;
    --warning: #c45500;
    --warning-light: #fff4e5;
    --info: #007185;
    --info-light: #e7f6f8;
    --success: #067d62;
    --success-light: #e7f7f2;

    /* Shape */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(15, 17, 17, 0.06);
    --shadow-md: 0 4px 14px rgba(15, 17, 17, 0.08);
    --shadow-lg: 0 10px 28px rgba(15, 17, 17, 0.12);

    /* Metrics */
    --nav-height: 64px;
    --mobile-nav-height: 62px;
    --touch-min: 44px;
    --container: 1180px;
    --transition: 0.2s ease;

    --font-fa: 'Vazirmatn', Tahoma, Arial, sans-serif;
    --bs-font-sans-serif: var(--font-fa);
    --bs-body-font-family: var(--font-fa);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-fa);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
    overflow-x: hidden;
    min-height: 100vh;
}

body, button, input, select, textarea,
.form-control, .form-select, .btn {
    font-family: var(--font-fa);
}

/* Latin digits for prices / phones / counters */
.en-num,
.as-price,
.as-product__price,
.as-product__price-old,
input[type="number"],
input[type="tel"] {
    font-variant-numeric: lining-nums tabular-nums;
    -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
    font-feature-settings: "lnum" 1, "tnum" 1;
}

a {
    color: var(--info);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--accent-dark); }

img { max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--navy);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    opacity: 1;
    margin: 1.25rem 0;
}

.as-container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1rem;
}

main {
    min-height: calc(100vh - var(--nav-height) - 200px);
}

/* ============================================================
   Header — navy chrome (matches logo)
   ============================================================ */
.as-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
}

.as-announcement {
    background: var(--navy-mid);
    color: var(--text-on-dark);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.4rem 1rem;
    border-bottom: 2px solid var(--accent);
}

.as-announcement i {
    opacity: 0.85;
    margin-inline-end: 0.35rem;
    color: var(--accent);
}

.as-header__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--nav-height);
    padding-block: 0.55rem;
}

.as-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    color: var(--text-on-dark);
}

.as-logo:hover { color: var(--text-on-dark); }

.as-logo__mark {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
    padding: 3px;
    border: 1px solid rgba(255, 153, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.as-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.as-logo__name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-on-dark);
    text-transform: lowercase;
}

.as-logo__tag {
    font-size: 0.62rem;
    color: var(--accent);
    font-weight: 600;
}

/* Header search — white field + orange CTA */
.as-header__search {
    flex: 1 1 auto;
    max-width: 560px;
    margin-inline: auto;
}

.as-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding-inline-start: 0.75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    overflow: hidden;
}

.as-search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

.as-search-box__icon {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.as-search-box input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    padding: 0.55rem 0.6rem;
    font-size: 0.9rem;
    color: var(--text);
    min-width: 0;
}

.as-search-box input::placeholder { color: var(--text-soft); }

.as-search-box button {
    border: 0;
    background: var(--accent);
    color: var(--navy-dark);
    border-radius: 0;
    padding: 0.65rem 1.15rem;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.as-search-box button:hover {
    background: var(--accent-dark);
    color: #fff;
}

/* Header actions */
.as-header__actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-inline-start: auto;
}

.as-icon-btn {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-on-dark-muted);
    font-size: 0.65rem;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.as-icon-btn i { font-size: 1.05rem; }

.as-icon-btn:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.as-icon-btn--accent {
    color: var(--navy-dark);
    background: var(--accent);
}
.as-icon-btn--accent:hover {
    background: var(--accent-dark);
    color: #fff;
}

.as-icon-btn__badge {
    position: absolute;
    top: 0;
    inset-inline-start: 4px;
    min-width: 17px;
    height: 17px;
    padding-inline: 3px;
    border-radius: var(--radius-pill);
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   Buttons
   ============================================================ */
.as-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: var(--touch-min);
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-fa);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
}

.as-btn--primary {
    background: linear-gradient(180deg, #ffd814 0%, var(--accent) 100%);
    color: var(--navy-dark);
    border-color: #fcd200;
    font-weight: 700;
    box-shadow: 0 2px 0 rgba(213, 217, 217, 0.5);
}

.as-btn--primary:hover {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--navy-dark);
    border-color: var(--accent-dark);
}

.as-btn--ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

.as-btn--ghost:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-light);
}

.as-btn--soft {
    background: var(--green-light);
    color: var(--green-dark);
}

.as-btn--soft:hover { background: #ffe8bf; color: var(--navy); }

.as-btn--danger {
    background: var(--danger);
    color: #fff;
}

.as-btn--danger:hover { background: #a32f23; color: #fff; }

.as-btn--sm {
    min-height: 36px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}

.as-btn--block {
    width: 100%;
    display: flex;
}

.as-btn:disabled,
.as-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bootstrap button alignment */
.btn {
    font-family: var(--font-fa);
    border-radius: var(--radius-md);
    min-height: var(--touch-min);
}

.btn-primary,
.btn-success {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.btn-primary:hover,
.btn-success:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.btn-outline-primary {
    color: var(--green);
    border-color: var(--green);
}

.btn-outline-primary:hover {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.badge { font-family: var(--font-fa); }

/* ============================================================
   Forms — .as-field family (used by address_fields.html)
   ============================================================ */
.as-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.as-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.as-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.as-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.as-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.as-field--full { grid-column: 1 / -1; }

.as-field__label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.as-field__label i {
    color: var(--green);
    font-size: 0.8rem;
}

.as-input,
.as-select,
.as-textarea,
.form-control,
.form-select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text);
    padding: 0.6rem 0.85rem;
    min-height: var(--touch-min);
    font-size: 16px; /* avoids iOS zoom */
    font-family: var(--font-fa);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.as-textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.7;
}

.as-input:focus,
.as-select:focus,
.as-textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-tint);
    outline: none;
}

.as-input::placeholder,
.as-textarea::placeholder,
.form-control::placeholder {
    color: var(--text-soft);
}

.as-input:disabled,
.as-select:disabled,
.as-textarea:disabled {
    background: var(--surface-alt);
    color: var(--text-soft);
    cursor: not-allowed;
}

.as-field small,
.as-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.as-field--error .as-input,
.as-field--error .as-select,
.as-field--error .as-textarea {
    border-color: var(--danger);
}

.as-error {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.75rem;
    color: var(--danger);
}

.muted-label { color: var(--text-muted); font-weight: 400; }

.as-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
}

.as-check input[type="checkbox"],
.as-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

/* Quantity stepper */
.as-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
}

.as-qty button {
    width: 36px;
    height: 36px;
    border: 0;
    background: var(--surface-alt);
    color: var(--text);
    cursor: pointer;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.as-qty button:hover { background: var(--green-light); color: var(--green); }

.as-qty input {
    width: 44px;
    height: 36px;
    border: 0;
    border-inline: 1px solid var(--border);
    text-align: center;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}

.as-qty input::-webkit-outer-spin-button,
.as-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================================
   Flash messages
   ============================================================ */
.as-flashes {
    position: fixed;
    top: calc(var(--nav-height) + 0.75rem);
    inset-inline-end: 1rem;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(92vw, 380px);
    pointer-events: none;
}

.as-flash {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--green);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    pointer-events: auto;
    animation: asFlashIn 0.25s ease;
}

.as-flash i { margin-top: 0.2rem; color: var(--green); }

.as-flash--danger,
.as-flash--error { border-inline-start-color: var(--danger); background: var(--danger-light); }
.as-flash--danger i,
.as-flash--error i { color: var(--danger); }

.as-flash--warning { border-inline-start-color: var(--warning); background: var(--warning-light); }
.as-flash--warning i { color: var(--warning); }

.as-flash--info { border-inline-start-color: var(--info); background: var(--info-light); }
.as-flash--info i { color: var(--info); }

.as-flash--success { border-inline-start-color: var(--success); background: var(--success-light); }
.as-flash--success i { color: var(--success); }

@keyframes asFlashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Section headings
   ============================================================ */
.as-section {
    padding-block: 1.5rem;
}

.as-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.as-section__title {
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.as-section__title i { color: var(--green); font-size: 0.95rem; }

.as-section__link {
    font-size: 0.82rem;
    color: var(--green);
    white-space: nowrap;
}

.as-empty {
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.as-empty i {
    font-size: 1.8rem;
    color: var(--text-soft);
    margin-bottom: 0.5rem;
    display: block;
}

/* ============================================================
   Home redesign (hypermarket / imported brands)
   ============================================================ */
.page-home .hm-main {
    padding-bottom: 0.5rem;
}

.hm-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(280px, 52vw, 460px);
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
    margin-bottom: 0;
    background: var(--navy-dark);
}

.hm-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hm-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
    transform: scale(1.02);
    animation: hm-hero- ken 18s ease-out both;
}

@keyframes hm-hero-ken {
    from { transform: scale(1.08); }
    to { transform: scale(1.02); }
}

.hm-hero__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(19, 26, 34, 0.92) 0%, rgba(19, 26, 34, 0.72) 42%, rgba(19, 26, 34, 0.35) 72%, rgba(19, 26, 34, 0.2) 100%),
        linear-gradient(0deg, rgba(19, 26, 34, 0.75) 0%, transparent 45%);
    pointer-events: none;
}

.hm-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-block: clamp(1.75rem, 5vw, 3.25rem);
}

.hm-hero__brand {
    margin: 0 0 0.55rem;
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hm-hero__title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.15rem, 2.6vw, 1.65rem);
    font-weight: 700;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.96);
    max-width: 28rem;
}

.hm-hero__subtitle {
    margin: 0 0 1.25rem;
    font-size: clamp(0.92rem, 1.7vw, 1.05rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    max-width: 32rem;
}

.hm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hm-btn {
    min-height: 2.65rem;
    padding-inline: 1.15rem;
    font-weight: 700;
}

.hm-btn--light {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.hm-btn--light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    color: #fff;
}

.hm-body {
    padding-top: 1.25rem;
}

.hm-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.hm-trust__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hm-trust__icon {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 1rem;
}

.hm-trust__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hm-trust__text strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.hm-trust__text small {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.hm-section {
    padding-block: 1.65rem;
}

.hm-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.hm-section__title {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.3;
}

.hm-section__desc {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.hm-section__link {
    flex: 0 0 auto;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-dark);
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--accent-light);
    border: 1px solid transparent;
    transition: border-color var(--transition), background var(--transition);
}

.hm-section__link:hover {
    border-color: rgba(255, 153, 0, 0.45);
    background: #fff;
}

/* Categories — large clickable tiles */
.hm-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.85rem;
}

.hm-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 0.85rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    min-height: 168px;
}

.hm-cat:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--text);
}

.hm-cat__media {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-alt);
}

.hm-cat__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.hm-cat:hover .hm-cat__media img {
    transform: scale(1.06);
}

.hm-cat__fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy-soft), var(--accent-light));
    color: var(--navy);
    font-size: 2rem;
}

.hm-cat__name {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    padding-inline: 0.2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hm-cat__go {
    position: absolute;
    top: 0.95rem;
    left: 0.95rem;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    font-size: 0.7rem;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity var(--transition), transform var(--transition);
    box-shadow: var(--shadow-sm);
}

.hm-cat:hover .hm-cat__go {
    opacity: 1;
    transform: translateX(0);
}

/* Brands — clickable logo rail */
.hm-brand-rail {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.hm-brand-rail::-webkit-scrollbar {
    height: 6px;
}

.hm-brand-rail::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-pill);
}

.hm-brand {
    scroll-snap-align: start;
    flex: 0 0 138px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 0.75rem 0.9rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.hm-brand:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text);
}

.hm-brand__logo {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.55rem;
}

.hm-brand__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hm-brand__fallback {
    color: var(--navy-mid);
    font-size: 1.6rem;
}

.hm-brand__name {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Mid promo banner */
.hm-promo {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 220px;
    border-radius: calc(var(--radius-lg) + 2px);
    overflow: hidden;
    margin-block: 0.5rem 0.25rem;
    background: var(--navy-dark);
    box-shadow: var(--shadow-md);
}

.hm-promo__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hm-promo__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hm-promo__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(19, 26, 34, 0.88) 0%, rgba(19, 26, 34, 0.55) 48%, rgba(19, 26, 34, 0.25) 100%);
}

.hm-promo__content {
    position: relative;
    z-index: 1;
    grid-column: 1;
    padding: clamp(1.25rem, 3vw, 2rem);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.45rem;
}

.hm-promo__eyebrow {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.hm-promo__title {
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 800;
    line-height: 1.3;
}

.hm-promo__text {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 26rem;
}

/* Product sample rail */
.hm-product-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 150px);
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .hm-product-rail {
        grid-auto-flow: dense;
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
        grid-auto-columns: unset;
        overflow: visible;
    }
}

.hm-product {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.hm-product:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    color: var(--text);
}

.hm-product__img {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-alt);
}

.hm-product__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hm-product__name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.3em;
}

.hm-product__price {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--navy);
}

.hm-product__price small {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-inline-start: 0.15rem;
}

/* Legacy category chips (search / other pages) */
.as-cat-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.6rem;
}

.as-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    text-align: center;
    transition: all var(--transition);
}

.as-cat:hover {
    border-color: var(--green);
    color: var(--green);
    box-shadow: var(--shadow-sm);
}

.as-cat__img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--green-light);
}

.as-cat__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.as-cat__name {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.as-brand__img {
    object-fit: contain;
    background: var(--surface-alt);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.as-brand:hover .as-brand__img {
    background: var(--accent-light);
}

.as-product-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.as-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.as-product-thumb:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .hm-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-promo {
        grid-template-columns: 1fr;
        min-height: 200px;
    }

    .hm-promo__shade {
        background:
            linear-gradient(180deg, rgba(19, 26, 34, 0.55) 0%, rgba(19, 26, 34, 0.88) 100%);
    }
}

@media (max-width: 575.98px) {
    .hm-hero {
        min-height: 320px;
        align-items: flex-end;
    }

    .hm-hero__shade {
        background:
            linear-gradient(180deg, rgba(19, 26, 34, 0.35) 0%, rgba(19, 26, 34, 0.78) 55%, rgba(19, 26, 34, 0.94) 100%);
    }

    .hm-hero__inner {
        text-align: right;
        padding-block: 1.5rem 1.75rem;
    }

    .hm-hero__actions {
        width: 100%;
    }

    .hm-hero__actions .hm-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .hm-trust {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .hm-trust__item {
        padding: 0.7rem 0.65rem;
        gap: 0.5rem;
    }

    .hm-trust__icon {
        width: 2.1rem;
        height: 2.1rem;
        font-size: 0.9rem;
    }

    .hm-trust__text strong {
        font-size: 0.8rem;
    }

    .hm-trust__text small {
        font-size: 0.68rem;
    }

    .hm-section__head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .hm-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .hm-cat {
        min-height: 0;
        padding: 0.65rem;
        gap: 0.55rem;
    }

    .hm-cat__name {
        font-size: 0.88rem;
    }

    .hm-cat__go {
        opacity: 0.85;
        transform: none;
        width: 1.45rem;
        height: 1.45rem;
        top: 0.75rem;
        left: 0.75rem;
    }

    .hm-brand {
        flex-basis: 118px;
        padding: 0.8rem 0.55rem 0.75rem;
    }

    .hm-brand__logo {
        width: 78px;
        height: 78px;
    }

    .hm-brand__name {
        font-size: 0.8rem;
    }

    .hm-promo__content {
        padding: 1.15rem 1rem 1.25rem;
    }

    .hm-product-rail {
        grid-auto-columns: minmax(118px, 128px);
        gap: 0.55rem;
    }
}

@media (min-width: 992px) {
    .hm-cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 1rem;
    }

    .hm-cat {
        min-height: 200px;
        padding: 1rem;
    }

    .hm-brand-rail {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
        overflow: visible;
        scroll-snap-type: none;
    }

    .hm-brand {
        flex: unset;
        min-width: 0;
        width: 100%;
    }

    .hm-brand__logo {
        width: 110px;
        height: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-hero__img {
        animation: none;
        transform: none;
    }

    .hm-cat:hover,
    .hm-brand:hover,
    .hm-product:hover {
        transform: none;
    }
}

/* Legacy category card (used by older pages) */
.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
    transition: all var(--transition);
}

.category-card:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.category-icon { font-size: 1.2rem; color: var(--green); margin-bottom: 0.35rem; }
.category-card h6 { font-size: 0.8rem; margin: 0; }

/* ============================================================
   Product grid & card
   ============================================================ */
.as-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.85rem;
}

.as-product {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.as-product:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.as-product__media {
    position: relative;
    background: var(--surface-alt);
}

.as-product__discount,
.as-product__featured {
    position: absolute;
    top: 0.45rem;
    z-index: 3;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
}

.as-product__discount {
    inset-inline-start: 0.45rem;
    background: var(--danger);
    color: #fff;
}

.as-product__featured {
    inset-inline-end: 0.45rem;
    background: var(--warning-light);
    color: var(--warning);
}

.as-product__brand-img {
    position: absolute;
    bottom: 0.45rem;
    inset-inline-end: 0.45rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--border);
    z-index: 3;
}

.as-product__body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.65rem 0.7rem 0.7rem;
    flex: 1;
}

.as-product__name {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
    margin: 0;
    min-height: 2.6em;
}

.as-product__name a {
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.as-product__name a:hover { color: var(--green); }

.as-product__tag {
    align-self: flex-start;
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.05rem 0.5rem;
}

.as-product__desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.as-product__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.as-product__price {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.as-product__price-old {
    display: block;
    font-size: 0.72rem;
    color: var(--text-soft);
    text-decoration: line-through;
}

.as-stock {
    font-size: 0.68rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.as-stock--ok { color: var(--green); }
.as-stock--low { color: var(--warning); }
.as-stock--out { color: var(--danger); }

.as-product__actions { margin-top: 0.5rem; }

.as-product__actions form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.as-product__actions .as-qty { align-self: stretch; }
.as-product__actions .as-qty input { flex: 1; width: auto; }

/* Legacy product card */
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}

.product-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.product-image { width: 100%; height: 100%; object-fit: cover; }

.product-details-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

/* ============================================================
   Product image slider (macros/product_images.html)
   ============================================================ */
.as-img-gallery { position: relative; width: 100%; }

.as-img-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--surface-alt);
}

.as-img-slider--detail {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.as-img-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.as-img-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
}

.as-img-slider__slide.is-active {
    opacity: 1;
    visibility: visible;
}

.as-img-slider__slide a,
.as-img-slider__slide img {
    display: block;
    width: 100%;
    height: 100%;
}

.as-img-slider__slide img { object-fit: cover; }
.as-img-slider--detail .as-img-slider__slide img { object-fit: contain; }

.as-img-slider__dots {
    position: absolute;
    bottom: 0.4rem;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    z-index: 4;
}

.as-img-slider__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(27, 36, 32, 0.25);
    cursor: pointer;
    transition: all var(--transition);
}

.as-img-slider__dot.is-active {
    background: var(--green);
    width: 16px;
    border-radius: var(--radius-pill);
}

.as-img-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    cursor: pointer;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-img-slider__nav:hover { color: var(--green); border-color: var(--green); }
.as-img-slider__nav--prev { inset-inline-end: 0.5rem; }
.as-img-slider__nav--next { inset-inline-start: 0.5rem; }

.as-img-thumbs {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.as-img-thumbs__item {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
}

.as-img-thumbs__item.is-active { border-color: var(--green); }
.as-img-thumbs__item img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   Panels / tables (shared page shells)
   ============================================================ */
.as-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.as-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block: 1.25rem 0.75rem;
}

.as-page-head h1 { font-size: 1.25rem; margin: 0; }

.as-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.as-back:hover { color: var(--green); }

.as-table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.as-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.as-table th,
.as-table td {
    padding: 0.7rem 0.85rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.as-table th {
    background: var(--surface-alt);
    font-weight: 600;
    color: var(--text-muted);
}

.as-table tbody tr:last-child td { border-bottom: 0; }
.as-table tbody tr:hover { background: var(--surface-alt); }

.as-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-pill);
    background: var(--surface-alt);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.as-chip--ok { background: var(--green-light); color: var(--green-dark); border-color: transparent; }
.as-chip--warn { background: var(--warning-light); color: var(--warning); border-color: transparent; }
.as-chip--danger { background: var(--danger-light); color: var(--danger); border-color: transparent; }
.as-chip--info { background: var(--info-light); color: var(--info); border-color: transparent; }

/* ============================================================
   Admin lite
   ============================================================ */
.as-admin {
    padding-block: 1rem;
}

.as-admin__nav {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.3rem;
    margin-bottom: 1.25rem;
}

.as-admin__nav a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all var(--transition);
}

.as-admin__nav a:hover { background: var(--surface-alt); color: var(--text); }

.as-admin__nav a.is-active {
    background: var(--navy);
    color: #fff;
    box-shadow: inset 0 -2px 0 var(--accent);
}

.as-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.as-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.as-stat__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.as-stat__label i { color: var(--green); }

.as-stat__value {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

/* ============================================================
   Footer — prominent store info
   ============================================================ */
.as-footer {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 55%);
    border-top: 4px solid var(--accent);
    margin-top: 2.5rem;
    padding-block: 2.25rem 1.5rem;
    color: var(--text-on-dark-muted);
    font-size: 1rem;
}

.as-footer__top {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.1fr;
    gap: 1.75rem 2rem;
    align-items: start;
}

.as-footer__brand-block {
    max-width: 28rem;
}

.as-footer__brand {
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.55rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-transform: none;
}

.as-footer__tagline {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

.as-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-content: flex-start;
}

.as-footer__nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.as-footer__nav a i {
    color: var(--accent);
    font-size: 0.95rem;
}

.as-footer__nav a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--navy-dark);
    transform: translateY(-1px);
}

.as-footer__nav a:hover i {
    color: var(--navy-dark);
}

.as-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.as-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 153, 0, 0.22);
    color: inherit;
    text-decoration: none;
}

.as-footer__phone:hover {
    border-color: var(--accent);
    background: rgba(255, 153, 0, 0.12);
}

.as-footer__contact-icon {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 153, 0, 0.15);
    color: var(--accent);
    font-size: 1.1rem;
}

.as-footer__contact-label {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.15rem;
}

.as-footer__contact-value {
    display: block;
    font-size: 1.12rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}

.as-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1.75rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .as-footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 1.35rem;
    }

    .as-footer__brand-block {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .as-footer {
        padding-block: 1.75rem 1.25rem;
    }

    .as-footer__top {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .as-footer__nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .as-footer__nav a {
        justify-content: center;
    }

    .as-footer__contact-value {
        font-size: 1.05rem;
    }
}

/* ============================================================
   Collab / designer footer — matches .as-footer navy + accent
   ============================================================ */
.as-collab {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.as-collab__card {
    max-width: 36rem;
    margin-inline: auto;
    text-align: center;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--navy-mid);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: var(--text-on-dark-muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.as-collab__name {
    margin: 0;
    font-weight: 800;
    color: var(--accent);
    font-size: 0.95rem;
}

.as-collab__text {
    margin: 0.35rem 0 0;
    color: var(--text-on-dark-muted);
}

.as-collab__dot {
    margin-inline: 0.35rem;
    color: var(--accent-dark);
}

.as-collab__phone {
    font-weight: 700;
    color: var(--text-on-dark);
}

.as-collab__handle {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    color: #88909a;
}

.as-collab__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    max-width: 36rem;
    margin: 0.75rem auto 0;
}

.as-collab__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--navy);
    color: var(--text-on-dark-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.as-collab__btn:hover {
    transform: translateY(-2px);
    background: var(--accent);
    border-color: var(--accent);
    color: var(--navy-dark);
    box-shadow: var(--shadow-md);
}

.as-collab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 153, 0, 0.12);
    border: 1px solid rgba(255, 153, 0, 0.35);
    color: var(--accent);
    transition: inherit;
}

.as-collab__btn:hover .as-collab__icon {
    background: rgba(19, 26, 34, 0.12);
    border-color: rgba(19, 26, 34, 0.2);
    color: var(--navy-dark);
}

@media (min-width: 576px) {
    .as-collab__btn {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.75rem;
        padding: 0.7rem 0.85rem;
        font-size: 0.85rem;
        text-align: right;
    }
}

/* ============================================================
   Mobile bottom nav
   ============================================================ */
.as-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 1040;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(27, 36, 32, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.as-bottom-nav__items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.as-bottom-nav__items > li {
    flex: 1 1 0;
    min-width: 0;
}

.as-bottom-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: var(--mobile-nav-height);
    padding: 0.35rem 0.15rem;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.as-bottom-nav a i { font-size: 1.15rem; }
.as-bottom-nav a.is-active { color: var(--green); }

.as-bottom-nav__admin {
    color: var(--navy-dark) !important;
}
.as-bottom-nav__admin i {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--navy-dark);
    font-size: 0.95rem !important;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.35);
}
.as-bottom-nav__admin.is-active,
.as-bottom-nav__admin.is-active span { color: var(--accent) !important; }
.as-bottom-nav__admin.is-active i {
    background: var(--navy);
    color: var(--accent);
}

.as-icon-btn--admin {
    color: var(--navy-dark) !important;
    background: var(--accent) !important;
}
.as-icon-btn--admin:hover {
    background: var(--accent-dark) !important;
    color: #fff !important;
}

.as-bottom-nav__badge {
    position: absolute;
    top: 0.35rem;
    inset-inline-start: 50%;
    margin-inline-start: 6px;
    min-width: 16px;
    height: 16px;
    padding-inline: 3px;
    border-radius: var(--radius-pill);
    background: var(--danger);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   Splash screen (macros/splash_screen.html + js/splash.js)
   ============================================================ */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background:
        radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 153, 0, 0.16) 0%, transparent 62%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(35, 47, 62, 0.9) 0%, #000 70%),
        #05070a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
}

.splash-glow {
    position: absolute;
    width: min(70vw, 420px);
    height: min(70vw, 420px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.22) 0%, transparent 70%);
    filter: blur(8px);
    animation: splashPulse 2.2s ease-in-out infinite;
    pointer-events: none;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.splash-active { overflow: hidden; }

.splash-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: min(92vw, 360px);
    padding: 1rem;
    text-align: center;
}

.splash-logo {
    width: min(58vw, 220px);
    height: auto;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
    padding: 0.85rem 1.1rem;
    box-shadow:
        0 0 0 1px rgba(255, 153, 0, 0.35),
        0 18px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(12px) scale(0.94);
    animation: splashLogoIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.splash-brand {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    text-transform: lowercase;
    opacity: 0;
    transform: translateY(8px);
    animation: splashTextIn 0.45s ease 0.35s forwards;
}

.splash-brand span {
    color: var(--accent);
    font-weight: 600;
}

.splash-welcome {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    opacity: 0;
    transform: translateY(8px);
    animation: splashTextIn 0.5s ease 0.55s forwards;
}

@keyframes splashLogoIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splashTextIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes splashPulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.06); }
}

/* Subtle page entrance */
.as-fade-in {
    animation: asFadeIn 0.35s ease both;
}

@keyframes asFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Utilities
   ============================================================ */
.as-muted { color: var(--text-muted); }
.as-small { font-size: 0.8rem; }
.as-center { text-align: center; }
.as-row { display: flex; align-items: center; gap: 0.5rem; }
.as-row--wrap { flex-wrap: wrap; }
.as-spacer { flex: 1; }
.as-hide-mobile { display: initial; }
.as-only-mobile { display: none; }

.as-scroll-x {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
}

.as-scroll-x > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet */
@media (max-width: 991.98px) {
    .as-logo__tag { display: none; }

    .as-form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile */
@media (max-width: 767.98px) {
    body {
        font-size: 0.9rem;
    }

    body.has-bottom-nav {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0));
    }

    .as-bottom-nav { display: block; }

    .as-container { padding-inline: 0.85rem; }

    .as-header__bar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding-block: 0.4rem;
    }

    .as-header__search {
        order: 3;
        flex: 1 0 100%;
        max-width: 100%;
        margin-inline: 0;
        padding-bottom: 0.35rem;
    }

    .as-header__actions .as-icon-btn span { display: none; }

    .as-search-box button {
        padding-inline: 0.8rem;
    }

    .as-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .as-cat-row {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .as-cat__img,
    .as-cat__icon { width: 42px; height: 42px; }

    .as-form-grid--2,
    .as-form-grid--3 { grid-template-columns: 1fr; }

    .as-hero { padding: 1.25rem 1rem; }

    .as-flashes {
        top: auto;
        bottom: calc(var(--mobile-nav-height) + 0.75rem);
        inset-inline: 0.75rem;
        max-width: none;
    }

    .as-footer { margin-bottom: 0; }

    .as-hide-mobile { display: none !important; }
    .as-only-mobile { display: initial; }

    .as-product__desc { display: none; }

    .as-table th,
    .as-table td { padding: 0.55rem 0.6rem; font-size: 0.8rem; }
}

/* Small phones */
@media (max-width: 400px) {
    .as-logo__name { font-size: 1rem; }
    .as-logo__mark { width: 32px; height: 32px; }
    .as-grid { gap: 0.5rem; }
    .as-product__body { padding: 0.55rem 0.55rem 0.6rem; }
    .as-product__name { font-size: 0.82rem; }
    .as-bottom-nav a { font-size: 0.6rem; }
}

/* Desktop */
@media (min-width: 992px) {
    .as-section { padding-block: 2rem; }
    .as-hero { padding: 2.5rem 2rem; }
    .as-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ============================================================
   Page blocks — cart, product detail, orders, auth, admin forms
   ============================================================ */
.as-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--info-light);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--info);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.as-note i { color: var(--info); margin-top: 0.2rem; }
.as-note--success { background: var(--green-light); border-inline-start-color: var(--green); }
.as-note--success i { color: var(--green); }
.as-note--warning { background: var(--warning-light); border-inline-start-color: var(--warning); }
.as-note--warning i { color: var(--warning); }

/* Two-column page layout (cart, product detail, order pages) */
.as-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding-bottom: 1.5rem;
}

.as-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.as-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

/* Cart / order line items */
.as-line {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.as-line__media {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-alt);
}

.as-line__media img { width: 100%; height: 100%; object-fit: cover; }

.as-line__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.as-line__name {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0;
}

.as-line__name a { color: var(--text); }
.as-line__name a:hover { color: var(--green); }

.as-line__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.85rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.as-line__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.as-line__tools form { display: flex; align-items: center; gap: 0.4rem; }

.as-line__total {
    flex: 0 0 auto;
    text-align: start;
    font-weight: 700;
    white-space: nowrap;
}

/* Order summary panel */
.as-summary {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.as-summary__title {
    font-size: 1rem;
    margin: 0;
}

.as-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.as-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.as-summary__row strong { color: var(--text); }

.as-summary__row--total {
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    font-size: 1rem;
    color: var(--text);
}

.as-summary__row--total strong { color: var(--green); font-size: 1.1rem; }

/* Radio / checkbox cards (delivery type, filters) */
.as-choice-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.as-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
    transition: all var(--transition);
}

.as-choice:hover { border-color: var(--green); }

.as-choice input { margin-top: 0.25rem; width: 18px; height: 18px; accent-color: var(--green); }

.as-choice__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.88rem;
}

.as-choice__body small { color: var(--text-muted); font-size: 0.76rem; }
.as-choice:has(input:checked) { border-color: var(--green); background: var(--green-light); }

/* Product detail */
.as-detail__title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.as-detail__price {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-block: 0.75rem;
}

.as-detail__price-now {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green);
}

.as-detail__price-old {
    font-size: 0.9rem;
    color: var(--text-soft);
    text-decoration: line-through;
}

.as-detail__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.as-detail__desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: pre-line;
}

/* Simple definition list (addresses, order info, support) */
.as-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.86rem;
    margin: 0;
}

.as-dl dt { color: var(--text-muted); font-weight: 400; }
.as-dl dd { margin: 0; }

/* Vertical list panel (addresses, order history) */
.as-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.as-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
}

.as-list__item.is-active { border-color: var(--green); background: var(--green-light); }
.as-list__main { min-width: 0; flex: 1 1 220px; }
.as-list__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Status steps (order status) */
.as-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.as-steps li {
    flex: 1 1 130px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.7rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--surface-alt);
}

.as-steps li.is-done { border-color: transparent; background: var(--green-light); color: var(--green-dark); }
.as-steps li i { margin-inline-end: 0.35rem; }

/* Narrow centred pages (login, register) */
.as-narrow {
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
    padding-block: 1.5rem;
}

.as-narrow__head {
    text-align: center;
    margin-bottom: 1rem;
}

.as-narrow__head h1 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.as-narrow__head p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

.as-code-input {
    text-align: center;
    letter-spacing: 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    min-height: 56px;
}

.as-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.as-form__actions--end { justify-content: flex-end; }

/* ============================================================
   Login / auth page
   ============================================================ */
.page-login .as-footer { display: none; }

.page-login .as-header__search { display: none !important; }

.as-auth-main {
    min-height: calc(100dvh - var(--nav-height) - var(--mobile-nav-height) - 1rem);
    display: flex;
    flex-direction: column;
}

.as-auth {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.5rem 1rem 2rem;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 153, 0, 0.18) 0%, transparent 55%),
        linear-gradient(165deg, #1a2330 0%, var(--navy) 42%, #2b3a4d 100%);
}

.as-auth__glow {
    position: absolute;
    inset: auto 50% 18% auto;
    width: min(90vw, 480px);
    height: 220px;
    transform: translateX(50%);
    background: radial-gradient(ellipse at center, rgba(255, 153, 0, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.as-auth__brand {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: asAuthBrandIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.as-auth__logo {
    display: block;
    width: min(70vw, 240px);
    height: auto;
    margin-inline: auto;
    background: #fff;
    border-radius: 14px;
    padding: 0.85rem 1.15rem;
    box-shadow:
        0 0 0 1px rgba(255, 153, 0, 0.3),
        0 16px 36px rgba(0, 0, 0, 0.28);
}

.as-auth__welcome {
    margin: 0.85rem 0 0;
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 600;
}

.as-auth__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    padding: 1.25rem 1.15rem 1.35rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    animation: asAuthPanelIn 0.5s ease 0.12s both;
}

.as-auth__head {
    text-align: center;
    margin-bottom: 1rem;
}

.as-auth__head h1 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: var(--navy);
}

.as-auth__head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.as-auth__steps {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0 0 1.15rem;
    padding: 0;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.as-auth__steps li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.as-auth__steps-line {
    width: 2rem;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    padding: 0 !important;
}

.as-auth__step-num {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.as-auth__steps .is-current {
    color: var(--navy);
    font-weight: 700;
}

.as-auth__steps .is-current .as-auth__step-num {
    background: var(--accent);
    border-color: var(--accent-dark);
    color: var(--navy-dark);
}

.as-auth__steps .is-done {
    color: var(--success);
}

.as-auth__steps .is-done .as-auth__step-num {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.as-auth__phone {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    min-height: 52px;
    text-align: center;
}

.as-auth__form .as-form__actions { margin-top: 1.15rem; }

.as-auth__alt {
    margin-top: 0.85rem;
    text-align: center;
}

.as-auth__alt--stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.as-auth__alt--stack form {
    margin: 0;
}

.as-auth__alt--stack #resend-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.as-auth__hint {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.as-btn--lg {
    min-height: 50px;
    font-size: 1rem;
    font-weight: 700;
}

@keyframes asAuthBrandIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes asAuthPanelIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
    .as-auth {
        padding-block: 2.5rem;
        gap: 1.5rem;
    }

    .as-auth__panel {
        padding: 1.5rem 1.5rem 1.6rem;
    }
}

@media (max-width: 767.98px) {
    .as-auth {
        min-height: calc(100dvh - var(--nav-height) - var(--mobile-nav-height));
        justify-content: flex-start;
        padding-top: 1.25rem;
    }
}

/* Admin extras */
.as-settings__title {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.as-settings__title:first-of-type { margin-top: 0; }

.as-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.as-inline-form { display: inline-flex; margin: 0; }

.as-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--surface-alt);
    border: 1px solid var(--border);
}

.as-keep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.6rem;
}

.as-keep {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    font-size: 0.75rem;
    background: var(--surface);
}

.as-keep img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.as-gallery-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 1.25rem;
}

.as-gallery-admin__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    background: var(--surface);
    overflow: hidden;
}

.as-gallery-admin__item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.as-gallery-admin__badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: var(--accent);
    color: #131a22;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
}

.as-gallery-admin__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    border: 1px solid #f3c0b8;
    background: #fff5f3;
    color: #a32f23;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.as-gallery-admin__delete:hover {
    background: #a32f23;
    border-color: #a32f23;
    color: #fff;
}

.as-variant-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 1rem;
}

.as-variant-admin__item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    background: var(--surface);
}

.as-variant-admin__item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.as-variant-admin__name {
    font-size: 0.82rem;
    text-align: center;
}

.as-variant-admin__price {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    color: var(--navy);
}

.as-variant-admin__price small {
    font-weight: 600;
    color: var(--text-muted);
}

.as-variant-builder {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0.75rem 0 1.25rem;
}

.as-variant-builder[hidden],
.as-variant-builder.is-collapsed {
    display: none;
}

.as-variant-toggle {
    margin: 0.35rem 0 0.5rem;
    font-weight: 700;
    color: var(--navy);
}

.as-variant-builder__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.as-variant-row {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
    padding: 0.9rem 1rem;
}

.as-variant-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.as-variant-row__title {
    font-size: 0.95rem;
    color: var(--navy);
}

.as-form--variant {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
}

.as-variants {
    width: 100%;
    margin-bottom: 0.85rem;
}

.as-variants__label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.55rem;
    font-weight: 700;
    font-size: 0.92rem;
}

.as-variants__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 0.55rem;
}

.as-variant-chip {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    cursor: pointer;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.45rem;
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.as-variant-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.as-variant-chip__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-alt);
}

.as-variant-chip__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.as-variant-chip__meta {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    width: 100%;
    text-align: center;
}

.as-variant-chip__name {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

.as-variant-chip__price {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--navy);
}

.as-variant-chip__price small {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
}

.as-variant-chip__off {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--danger);
}

.as-variant-chip:hover,
.as-variant-chip.is-selected,
.as-variant-chip:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-tint);
    transform: translateY(-1px);
}

.as-line__variant {
    margin: 0.15rem 0 0.35rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.as-upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.as-upload-preview img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-alt);
}

.as-check--danger {
    color: #a32f23;
    font-size: 0.82rem;
}

.as-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1rem;
}

.as-pagination a,
.as-pagination span {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--surface);
}

.as-pagination a:hover { border-color: var(--green); color: var(--green); }
.as-pagination .is-active { background: var(--green); border-color: var(--green); color: #fff; }

.as-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.as-toolbar .as-field { flex: 1 1 180px; }

@media (max-width: 991.98px) {
    .as-split,
    .as-split--even { grid-template-columns: 1fr; }
    .as-summary { position: static; }
}

@media (max-width: 575.98px) {
    .as-line { flex-wrap: wrap; }
    .as-line__media { width: 64px; height: 64px; }
    .as-line__total { width: 100%; text-align: end; }
    .as-dl { grid-template-columns: 1fr; gap: 0 0.5rem; }
    .as-dl dt { margin-top: 0.35rem; }
}

/* ============================================================
   Search filters toolbar
   ============================================================ */
.as-page-head__sub {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.as-search-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.9rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.as-search-box--page {
    max-width: none;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
}

.as-search-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.as-sort-scroll {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    flex: 1 1 auto;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
}

.as-sort-pill {
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text-muted);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    font-family: var(--font-fa);
    transition: all var(--transition);
}

.as-sort-pill:hover { border-color: var(--accent); color: var(--navy); }
.as-sort-pill.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    box-shadow: inset 0 -2px 0 var(--accent);
}

.as-stock-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    background: var(--surface);
    user-select: none;
}

.as-stock-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.as-stock-toggle i { color: var(--text-soft); }
.as-stock-toggle.is-active,
.as-stock-toggle:has(input:checked) {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}
.as-stock-toggle.is-active i,
.as-stock-toggle:has(input:checked) i { color: var(--success); }

.as-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-fa);
    color: var(--text);
}
.as-filter-toggle em {
    font-style: normal;
    background: var(--accent);
    color: var(--navy-dark);
    border-radius: var(--radius-pill);
    min-width: 1.2rem;
    padding: 0 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
}

.as-filter-sheet {
    display: none;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
}
.as-filter-sheet.is-open { display: block; }

.as-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.as-check-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    cursor: pointer;
    background: var(--surface-alt);
}
.as-check-chip input { accent-color: var(--accent); }
.as-check-chip.is-active,
.as-check-chip:has(input:checked) {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--navy);
}

.as-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.as-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--navy-soft);
    color: var(--navy);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
}
.as-active-filter i { font-size: 0.7rem; opacity: 0.7; }
.as-active-filter--clear {
    background: transparent;
    border: 1px dashed var(--border-strong);
    color: var(--text-muted);
}

@media (max-width: 767.98px) {
    .as-search-toolbar { gap: 0.45rem; }
    .as-filter-toggle { margin-inline-start: auto; }
}


.js-lazy-img:not(.is-lazy-loaded) {
    background: linear-gradient(90deg, #eef1f4 25%, #f7f8fa 50%, #eef1f4 75%);
    background-size: 200% 100%;
    animation: asLazyShimmer 1.1s ease-in-out infinite;
    min-height: 4rem;
}
@keyframes asLazyShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
img.is-lazy-loaded {
    animation: asLazyFade 0.35s ease;
}
@keyframes asLazyFade {
    from { opacity: 0.35; }
    to { opacity: 1; }
}
