/**
 * Store-wide visual polish — matches auth/admin quality bar
 */

:root {
    --store-surface: #ffffff;
    --store-bg: #f3f5f8;
    --store-ink: #0f172a;
    --store-muted: #64748b;
    --store-line: #e2e8f0;
    --store-radius: 1rem;
    --store-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}

body.bg-gray-50,
body[data-theme="light"] {
    background: var(--store-bg) !important;
    color: var(--store-ink);
}

.main-content {
    min-height: 55vh;
}

/* Page hero / header — compact so catalog content starts sooner */
.sp-page {
    padding-bottom: 2.5rem;
}

.sp-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(700px 220px at 0% 0%, rgba(var(--primary-rgb, 15, 118, 110), 0.08), transparent 55%),
        #fff;
    border-bottom: 1px solid var(--store-line);
    margin-bottom: 1rem;
}

.sp-hero__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.85rem 1rem 1rem;
}

@media (min-width: 768px) {
    .sp-hero__inner { padding: 1rem 1.5rem 1.1rem; }
}

.sp-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    color: var(--store-muted);
}

.sp-crumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.sp-crumb a:hover { color: var(--primary, #0f766e); }

.sp-crumb__sep {
    font-size: 0.6rem;
    opacity: 0.7;
}

.sp-hero__title {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--store-ink);
    line-height: 1.25;
}

.sp-hero__subtitle {
    margin: 0.25rem 0 0;
    max-width: 40rem;
    color: var(--store-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.sp-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .sp-container { padding: 0 1.5rem; }
}

/* Surfaces */
.sp-panel {
    background: var(--store-surface);
    border: 1px solid var(--store-line);
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow);
}

.sp-panel--pad { padding: 1.25rem; }
@media (min-width: 768px) {
    .sp-panel--pad { padding: 1.75rem; }
}

.sp-panel__title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--store-ink);
}

.sp-soft {
    background: #f8fafc;
    border: 1px solid var(--store-line);
    border-radius: 0.9rem;
}

/* Forms */
.sp-field { margin-bottom: 1rem; }
.sp-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}
.sp-field input,
.sp-field select,
.sp-field textarea {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: 0.8rem;
    border: 1px solid #dbe3ee;
    background: #fff;
    font: inherit;
    color: var(--store-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sp-field textarea { min-height: 8rem; resize: vertical; }
.sp-field input:focus,
.sp-field select:focus,
.sp-field textarea:focus {
    outline: none;
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 15, 118, 110), 0.16);
}

.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0 1.15rem;
    border: 0;
    border-radius: 0.85rem;
    background: var(--button-color, var(--primary, #0f766e));
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--primary-rgb, 15, 118, 110), 0.18);
    transition: transform 0.15s ease, filter 0.15s ease;
}
.sp-btn:hover { filter: brightness(1.05); transform: translateY(-1px); color: #fff; }
.sp-btn--ghost {
    background: #fff;
    color: var(--store-ink);
    border: 1px solid var(--store-line);
    box-shadow: none;
}
.sp-btn--ghost:hover { color: var(--primary, #0f766e); border-color: var(--primary, #0f766e); filter: none; }

/* Empty / info */
.sp-empty {
    text-align: center;
    padding: 3rem 1.25rem;
}
.sp-empty__icon {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.1);
    color: var(--primary, #0f766e);
    font-size: 1.4rem;
}
.sp-empty__title {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
    font-weight: 800;
}
.sp-empty__text {
    margin: 0 0 1.25rem;
    color: var(--store-muted);
}

.sp-alert {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}
.sp-alert.hidden {
    display: none !important;
}
.sp-alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.sp-alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.sp-alert--info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Content prose pages */
.sp-prose {
    color: #475569;
    line-height: 1.7;
    font-size: 0.98rem;
}
.sp-prose h2 {
    margin: 0 0 0.75rem;
    color: var(--store-ink);
    font-size: 1.15rem;
    font-weight: 800;
}
.sp-prose p { margin: 0 0 1rem; }
.sp-prose ul { margin: 0 0 1rem; padding-inline-start: 1.2rem; }

/* Feature grid */
.sp-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}
@media (min-width: 768px) {
    .sp-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.sp-feature {
    text-align: center;
    padding: 1.25rem 1rem;
}
.sp-feature__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.85rem;
    border-radius: 0.9rem;
    display: grid;
    place-items: center;
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.1);
    color: var(--primary, #0f766e);
}
.sp-feature h3 {
    margin: 0 0 0.35rem;
    font-size: 0.98rem;
    font-weight: 700;
}
.sp-feature p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--store-muted);
    line-height: 1.5;
}

/* Contact info tiles */
.sp-info-tile {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.1rem 1.15rem;
}
.sp-info-tile__icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.8rem;
    display: grid;
    place-items: center;
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.1);
    color: var(--primary, #0f766e);
    flex-shrink: 0;
}
.sp-info-tile__label {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.sp-info-tile__value {
    margin: 0;
    font-weight: 700;
    color: var(--store-ink);
    word-break: break-word;
}

/* Catalog toolbar */
.sp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.sp-toolbar__count {
    font-size: 0.9rem;
    color: var(--store-muted);
}
.sp-toolbar__count strong { color: var(--store-ink); }

/* Checkout / cart steps */
.sp-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
}
.sp-step {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
}
.sp-step.is-active { color: var(--primary, #0f766e); }
.sp-step__num {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.75rem;
}
.sp-step.is-active .sp-step__num {
    background: var(--primary, #0f766e);
    color: #fff;
}
.sp-step.is-done { color: #059669; }
.sp-step.is-done .sp-step__num {
    background: #059669;
    color: #fff;
}
.sp-step__line {
    width: 2rem;
    height: 2px;
    background: #e2e8f0;
}
.sp-step__line--done { background: #059669; }
@media (min-width: 640px) {
    .sp-step__line { width: 3.5rem; }
}

/* Account */
.sp-account-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 1.15rem;
    background:
        radial-gradient(420px 160px at 0% 0%, rgba(var(--primary-rgb, 15, 118, 110), 0.22), transparent 60%),
        linear-gradient(135deg, var(--primary, #0f766e), color-mix(in srgb, var(--primary, #0f766e) 75%, #0f172a));
    color: #fff;
}
.sp-account-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 800;
    flex-shrink: 0;
}
.sp-account-name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
}
.sp-account-email {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    opacity: 0.85;
    word-break: break-all;
}
.sp-account-nav {
    display: flex;
    flex-direction: column;
    padding: 0.55rem;
    gap: 0.2rem;
}
.sp-account-nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}
.sp-account-nav a:hover { background: #f8fafc; color: var(--primary, #0f766e); }
.sp-account-nav a.is-active {
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.1);
    color: var(--primary, #0f766e);
}
.sp-account-nav__danger { color: #dc2626 !important; }
.sp-account-nav__danger:hover { background: #fef2f2 !important; }

.sp-field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--store-muted);
}

.sp-btn--sm {
    min-height: 2.15rem;
    padding: 0 0.85rem;
    font-size: 0.82rem;
    box-shadow: none;
}

.sp-table-wrap { overflow-x: auto; }
.sp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.sp-table th,
.sp-table td {
    padding: 0.85rem 0.65rem;
    text-align: start;
    border-bottom: 1px solid var(--store-line);
    vertical-align: middle;
}
.sp-table th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.sp-table tbody tr:hover { background: #f8fafc; }
.sp-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sp-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.sp-badge--warn { background: #fff7ed; color: #c2410c; }
.sp-badge--info { background: #eff6ff; color: #1d4ed8; }
.sp-badge--accent { background: #f0fdfa; color: #0f766e; }
.sp-badge--ok { background: #ecfdf5; color: #047857; }
.sp-badge--err { background: #fef2f2; color: #b91c1c; }

.sp-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.sp-meta-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}
.sp-meta-value {
    display: block;
    font-weight: 700;
    color: var(--store-ink);
    word-break: break-word;
}

.sp-summary { display: flex; flex-direction: column; gap: 0.65rem; }
.sp-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
    color: #475569;
}
.sp-summary__row--total {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--store-line);
    font-size: 1.05rem;
    color: var(--store-ink);
}
.sp-summary__row--total strong { color: var(--primary, #0f766e); }

/* Home section polish */
.sp-section {
    padding: 2rem 0;
}
.sp-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.sp-section__title {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--store-ink);
}
.sp-section__sub {
    margin: 0.35rem 0 0;
    color: var(--store-muted);
    font-size: 0.92rem;
}

/* Motion */
.sp-rise {
    animation: spRise 0.55s ease both;
}
@keyframes spRise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Products filter sticky */
.catalog-filters.filters-panel,
#filtersPanel.catalog-filters {
    position: sticky;
    top: 5.5rem;
}

/* ========================================================================
   Catalog page — layout, filters, toolbar
   ======================================================================== */
.catalog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .catalog-layout {
        grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
        gap: 1.75rem;
    }
}

.catalog-filters {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 !important;
    overflow: hidden;
}

.catalog-filters__head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem 0.15rem;
    border-bottom: 0;
    background: transparent;
    flex-shrink: 0;
}

.catalog-filters__head-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-filters__close {
    display: none;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    place-items: center;
}

.catalog-filters__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.catalog-filters__clear {
    font-size: 0.75rem;
    font-weight: 700;
    color: #dc2626;
    text-decoration: none;
    white-space: nowrap;
}

.catalog-filters__clear:hover {
    text-decoration: underline;
}

.catalog-filters__section {
    padding: 1rem 1.15rem 1.15rem;
    border-bottom: 1px solid var(--store-line);
}

.catalog-filters__section:last-child {
    border-bottom: 0;
}

.catalog-filters__label {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.catalog-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    max-height: min(28rem, 58vh);
    overflow-y: auto;
    padding-inline-end: 0.15rem;
    scrollbar-width: thin;
}

.catalog-nav__group {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.catalog-nav__row {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 0.15rem;
}

.catalog-nav__row .catalog-nav__link {
    flex: 1;
    min-width: 0;
}

.catalog-nav__link {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
    padding: 0.5rem 0.65rem;
    border-radius: 0.7rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

.catalog-nav__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    unicode-bidi: isolate;
    min-width: 0;
    flex: 0 1 auto !important;
    max-width: calc(100% - 2.75rem);
}

.catalog-nav__count {
    min-width: 1.5rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    margin: 0 !important;
}

.catalog-nav__toggle {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    transition: transform 0.2s ease, background 0.15s ease, color 0.15s ease;
}

.catalog-nav__toggle:hover {
    background: #f1f5f9;
    color: var(--store-ink);
}

.catalog-nav__group.is-open > .catalog-nav__row .catalog-nav__toggle {
    transform: rotate(180deg);
    color: var(--primary, #0f766e);
}

.catalog-nav__link:hover {
    background: #f1f5f9;
    color: var(--store-ink);
}

.catalog-nav__link.is-active {
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.12);
    color: var(--primary, #0f766e);
}

.catalog-nav__link.is-current-branch {
    color: var(--store-ink);
    background: #f8fafc;
}

.catalog-nav__link.is-active .catalog-nav__count {
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.2);
    color: var(--primary, #0f766e);
}

.catalog-nav__children {
    display: none;
    width: 100%;
    margin: 0.1rem 0 0.25rem;
    padding-inline-start: 0.7rem;
    border-inline-start: 2px solid #e2e8f0;
    flex-direction: column;
    gap: 0.1rem;
    box-sizing: border-box;
}

.catalog-nav__group.is-open > .catalog-nav__children {
    display: flex;
}

.catalog-nav__children .catalog-nav__link {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.38rem 0.55rem;
    color: #64748b;
}

.catalog-subs {
    margin-bottom: 1.15rem;
}

.catalog-subs__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.catalog-subs__head h2 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--store-ink);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.catalog-subs__head h2 i {
    color: var(--primary, #0f766e);
    font-size: 0.85rem;
}

.catalog-subs__all {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary, #0f766e);
    text-decoration: none;
    white-space: nowrap;
}

.catalog-subs__all:hover {
    text-decoration: underline;
}

.catalog-subs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.65rem;
}

@media (max-width: 640px) {
    .catalog-subs__grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.6rem;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
}

.catalog-subcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 0.55rem 0.7rem;
    border: 1px solid var(--store-line, #e2e8f0);
    border-radius: 1rem;
    background: #fff;
    text-decoration: none;
    color: var(--store-ink);
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    min-width: 6.75rem;
    scroll-snap-align: start;
}

.catalog-subcard:hover {
    border-color: rgba(var(--primary-rgb, 15, 118, 110), 0.45);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

.catalog-subcard.is-active {
    border-color: var(--primary, #0f766e);
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.08);
    box-shadow: 0 0 0 1px var(--primary, #0f766e);
}

.catalog-subcard__media {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #f1f5f9;
    display: grid;
    place-items: center;
}

.catalog-subcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-subcard__letter {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary, #0f766e);
}

.catalog-subcard__name {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-subcard__count {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
}

.catalog-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary, #0f766e);
}

.catalog-price-row__sep {
    color: #94a3b8;
    font-weight: 500;
}

.catalog-price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.catalog-price-inputs .sp-field label {
    display: block;
    margin-bottom: 0.35rem;
}

.catalog-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    user-select: none;
}

.catalog-check input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--primary, #0f766e);
}

.catalog-mobile-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0.25rem;
}

.catalog-mobile-toggle__chevron {
    margin-inline-start: auto;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.catalog-mobile-toggle.is-open .catalog-mobile-toggle__chevron {
    transform: rotate(180deg);
}

.catalog-filters-backdrop {
    display: none;
}

@media (min-width: 1024px) {
    .catalog-mobile-toggle,
    .catalog-filters__close,
    .catalog-filters-backdrop {
        display: none !important;
    }
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow);
}

.catalog-toolbar__count {
    margin: 0;
    font-size: 0.9rem;
    color: var(--store-muted);
}

.catalog-toolbar__count strong {
    color: var(--store-ink);
}

.catalog-toolbar__sort {
    min-width: 11.5rem;
    margin: 0 !important;
}

.catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.catalog-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.1);
    color: var(--primary, #0f766e);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.catalog-chip:hover {
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.18);
}

.catalog-chip i {
    font-size: 0.65rem;
    opacity: 0.8;
}

/* Catalog / offers grid: never stretch a few cards across the full width */
.sp-page .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    justify-content: start;
}

.sp-page .product-grid > * {
    display: block !important;
    max-width: 100%;
}

@media (min-width: 480px) {
    .sp-page .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
        gap: 0.9rem;
    }
}

@media (min-width: 768px) {
    .sp-page .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 230px));
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .sp-page .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 240px));
        gap: 1.1rem;
    }
}

/* Shorter product images on listing pages */
.sp-page .product-card__image {
    aspect-ratio: 4 / 3;
}

.sp-page .product-card__body {
    padding: 0.7rem 0.75rem 0.85rem !important;
}

.sp-page .product-card__title {
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.35rem !important;
    font-weight: 700 !important;
}

.sp-page .product-card__btn {
    min-height: 2.15rem !important;
    font-size: 0.8rem !important;
    padding: 0.45rem 0.65rem !important;
}

.sp-page .product-card__price {
    font-size: 0.95rem !important;
}

.sp-page .product-card__price-old {
    font-size: 0.78rem !important;
}

@media (max-width: 1023px) {
    .catalog-aside {
        width: 100%;
        min-width: 0;
    }

    body.catalog-filters-lock {
        overflow: hidden;
    }

    .catalog-filters-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 85;
        background: rgba(15, 23, 42, 0.45);
    }

    .catalog-filters.filters-panel,
    #filtersPanel.catalog-filters {
        position: fixed !important;
        top: auto;
        left: 0;
        right: 0;
        bottom: calc(4.35rem + env(safe-area-inset-bottom, 0px));
        z-index: 90;
        width: 100% !important;
        max-width: 100%;
        max-height: min(58vh, 26rem);
        margin: 0;
        border-radius: 1rem 1rem 0 0;
        transform: translateY(110%);
        visibility: hidden;
        pointer-events: none;
        display: flex !important;
        flex-direction: column;
        overflow: hidden;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transition: transform 0.22s ease, visibility 0.22s ease;
    }

    #filtersPanel.catalog-filters.is-open {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .catalog-filters__head {
        display: flex;
        padding: 0.45rem 0.75rem 0;
    }

    .catalog-filters__close {
        display: inline-grid;
    }

    .catalog-filters__body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .catalog-filters__section {
        padding: 0.7rem 0.9rem 0.8rem;
    }

    .catalog-filters__label {
        margin-bottom: 0.45rem;
        font-size: 0.68rem;
    }

    .catalog-nav {
        max-height: none;
        overflow: visible;
        gap: 0.05rem;
    }

    .catalog-nav__link {
        min-height: 2.15rem;
        padding: 0.35rem 0.5rem;
        font-size: 0.82rem;
        border-radius: 0.55rem;
    }

    .catalog-nav__toggle {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }

    .catalog-nav__count {
        min-width: 1.35rem;
        height: 1.2rem;
        font-size: 0.65rem;
        padding: 0 0.3rem;
    }

    .catalog-nav__children {
        padding-inline-start: 0.45rem;
    }

    .catalog-nav__children .catalog-nav__link {
        min-height: 2rem;
        padding: 0.28rem 0.45rem;
        font-size: 0.78rem;
    }

    .catalog-mobile-toggle {
        min-height: 2.45rem;
        padding-inline: 0.8rem;
        margin-bottom: 0.55rem;
        border-radius: 0.75rem;
        font-weight: 700;
        font-size: 0.88rem;
    }

    .catalog-price-row {
        margin-bottom: 0.5rem;
        font-size: 0.78rem;
    }

    .catalog-price-inputs {
        gap: 0.45rem;
    }

    .catalog-price-inputs .sp-field input {
        min-height: 2.4rem;
        padding-inline: 0.6rem;
        font-size: 0.9rem !important;
    }

    #priceFilterForm .sp-btn {
        margin-top: 0.55rem !important;
        min-height: 2.35rem;
        font-size: 0.85rem;
    }

    body:has(#filtersPanel.is-open) .scroll-to-top,
    body:has(#filtersPanel.is-open) #scroll-to-top,
    body:has(#filtersPanel.is-open) .whatsapp-fab,
    body:has(#filtersPanel.is-open) .whatsapp-float {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* ========================================================================
   Storefront v2 — header, home, product cards, CTA
   ======================================================================== */

/* Typography / shell */
body.bg-gray-50 {
    background:
        radial-gradient(1200px 480px at 100% -10%, rgba(var(--primary-rgb, 15, 118, 110), 0.06), transparent 55%),
        var(--store-bg) !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid var(--store-line) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.header-topbar {
    background: #0f172a !important;
    color: rgba(255, 255, 255, 0.88) !important;
}
.header-topbar a,
.header-topbar label {
    color: inherit !important;
    text-decoration: none;
}
.header-topbar a:hover,
.header-topbar label:hover {
    color: #fff !important;
}
.header-topbar__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(255,255,255,0.72);
}
.header-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.1rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}
.header-lang a {
    min-width: 2rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    color: rgba(255,255,255,0.7) !important;
}
.header-lang a.is-active {
    background: #fff;
    color: #0f172a !important;
}
.header-account {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    color: #fff !important;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
}
.header-account:hover {
    background: rgba(255,255,255,0.16);
    color: #fff !important;
}
.header-account i { font-size: 0.7rem; }

.header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.4rem;
    padding: 0.35rem 0.7rem 0.35rem 0.55rem;
    border-radius: 0.75rem;
    color: #0f172a !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
}
.header-cart:hover {
    background: #f1f5f9;
    color: #0f172a !important;
}
.header-cart i { font-size: 1.05rem; }
.header-cart__icon {
    position: relative;
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
}
.header-cart .cart-badge,
.cart-badge {
    position: absolute;
    top: -0.35rem;
    inset-inline-end: -0.45rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--primary, #0f766e) !important;
    color: #fff !important;
    font-size: 0.62rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.cart-badge.is-empty { display: none; }

.desktop-nav {
    border-top: 1px solid #f1f5f9;
    padding-block: 0;
}
.desktop-nav__list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.desktop-nav-link {
    border-radius: 0;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 0.7rem 0.85rem !important;
    color: #334155 !important;
}
.desktop-nav-link:hover {
    color: var(--primary, #0f766e) !important;
    background: transparent;
}
.desktop-nav-link.active {
    background: transparent !important;
    color: var(--primary, #0f766e) !important;
}
.desktop-nav-link.active::after {
    left: 0.85rem;
    right: 0.85rem;
    height: 2.5px;
    background: var(--primary, #0f766e);
}

.header-main {
    padding: 0.45rem 0 !important;
}

.site-logo span {
    letter-spacing: -0.03em;
}

.site-logo .logo-mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: var(--primary, #0f766e);
    color: #fff;
    box-shadow: 0 6px 14px rgba(var(--primary-rgb, 15, 118, 110), 0.22);
}

.search-input-premium,
#searchInput.search-input-premium {
    border-radius: 0.8rem !important;
    border: 1px solid var(--store-line) !important;
    background: #f8fafc !important;
    min-height: 2.35rem;
    padding-block: 0.45rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.search-input-premium:focus {
    background: #fff !important;
    border-color: var(--primary, #0f766e) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 15, 118, 110), 0.14) !important;
}

.desktop-nav {
    border-top: 1px solid #f1f5f9;
    padding-block: 0.2rem;
}
.desktop-nav-link {
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.84rem;
    padding: 0.4rem 0.75rem !important;
}
.desktop-nav-link.active {
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.1);
    color: var(--primary, #0f766e) !important;
}

/* Full-bleed home hero */
.home-hero {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}
.home-hero .carousel,
.home-hero .carousel-item {
    width: 100%;
}
.home-hero__media {
    display: block;
    width: 100%;
    min-height: clamp(220px, 42vw, 520px);
    max-height: 560px;
    object-fit: cover;
}
.home-hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.55) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem 1rem 2rem;
}
@media (min-width: 768px) {
    .home-hero__shade { padding-bottom: 2.75rem; }
}
.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    animation: spRise 0.7s ease both;
}
.home-hero__nav {
    position: absolute;
    inset-inline: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 5;
    pointer-events: none;
}
.home-hero__nav a {
    pointer-events: auto;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.18);
    color: #fff;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    transition: background 0.15s ease;
}
.home-hero__nav a:hover { background: rgba(255,255,255,0.3); color: #fff; }
.home-hero__dots {
    position: absolute;
    bottom: 0.85rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 5;
}
.home-hero__dots a {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.45);
}
.home-hero__dots a.is-on { background: #fff; width: 1.1rem; }

.home-hero--empty {
    min-height: clamp(280px, 48vw, 480px);
    display: grid;
    place-items: center;
    background:
        radial-gradient(700px 280px at 20% 20%, rgba(var(--primary-rgb, 15, 118, 110), 0.35), transparent 60%),
        linear-gradient(160deg, #0f172a, #134e4a 55%, #0f766e);
    color: #fff;
    text-align: center;
    padding: 3rem 1.25rem;
}
.home-hero--empty .brand {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}
.home-hero--empty p {
    margin: 0 auto 1.35rem;
    max-width: 28rem;
    opacity: 0.88;
    line-height: 1.55;
}

/* Benefits */
.home-benefits {
    background: #fff;
    border-bottom: 1px solid var(--store-line);
    padding: 1rem 0 1.25rem;
}
@media (min-width: 768px) {
    .home-benefits { padding: 1.75rem 0; }
}
.home-benefit {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--store-line);
    background: #fff;
    box-shadow: var(--store-shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.home-benefit:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
}
.home-benefit__icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.1);
    color: var(--primary, #0f766e);
    flex-shrink: 0;
}
.home-benefit h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--store-ink);
}
.home-benefit p {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--store-muted);
    line-height: 1.4;
}

/* Categories */
.home-cats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem 0.75rem;
}
.home-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.home-cat__media {
    width: 100%;
    max-width: 7.5rem;
    aspect-ratio: 1;
    border-radius: 1.15rem;
    overflow: hidden;
    border: 1px solid var(--store-line, #e2e8f0);
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    box-shadow: var(--store-shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-cat:hover .home-cat__media {
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb, 15, 118, 110), 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.home-cat__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.home-cat:hover .home-cat__media img { transform: scale(1.06); }
.home-cat__icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.12);
    color: var(--primary, #0f766e);
    font-size: 1.15rem;
}
.home-cat__name {
    margin-top: 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}
.home-cat:hover .home-cat__name { color: var(--primary, #0f766e); }

/* Section headers */
.section-header h2,
.sp-section__title {
    letter-spacing: -0.03em;
}
.section-header a {
    color: var(--store-muted);
    font-weight: 600;
}
.section-header a:hover { color: var(--primary, #0f766e); }

/* Product cards upgrade */
.product-card {
    border-radius: 1rem !important;
    border-color: var(--store-line) !important;
    box-shadow: var(--store-shadow);
    background: #fff;
}
.product-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08) !important;
}
.product-card__title {
    letter-spacing: -0.01em;
}
.product-card__btn {
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
}

/* Reviews */
.home-review {
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: 1.1rem;
    padding: 1.25rem;
    box-shadow: var(--store-shadow);
    flex-shrink: 0;
    width: min(280px, 85vw);
}
@media (min-width: 768px) {
    .home-review { width: auto; }
}

/* Trust strip */
.home-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2rem;
    padding: 1.5rem 1rem;
    background: #fff;
    border-block: 1px solid var(--store-line);
}
.home-trust__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
}
.home-trust__item i {
    color: var(--primary, #0f766e);
    font-size: 1.15rem;
}

/* Bottom CTA */
.home-cta {
    margin: 2rem 1rem 0;
    border-radius: 1.35rem;
    padding: 2.25rem 1.25rem;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(600px 220px at 10% 0%, rgba(255,255,255,0.14), transparent 55%),
        linear-gradient(135deg, #0f172a 0%, #134e4a 48%, var(--primary, #0f766e) 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
@media (min-width: 768px) {
    .home-cta {
        margin: 2.5rem auto 0;
        max-width: 72rem;
        padding: 3rem 2rem;
    }
}
.home-cta h2 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}
.home-cta p {
    margin: 0 auto 1.35rem;
    max-width: 34rem;
    opacity: 0.88;
    line-height: 1.55;
}
.home-cta .sp-btn {
    background: #fff;
    color: #0f172a;
    box-shadow: none;
}
.home-cta .sp-btn:hover {
    color: #0f172a;
    filter: none;
    background: #f8fafc;
}

/* Footer polish */
.site-footer {
    margin-top: 3rem !important;
}

/* Auth pages already use auth.css — ensure store buttons align */
.sp-btn i { font-size: 0.9em; }

html[dir="rtl"] .home-hero__dots { direction: ltr; }
html[dir="rtl"] .section-header a i.fa-chevron-right {
    transform: scaleX(-1);
}

/* LTR: keep section titles on the start edge (never flip in FR mode) */
html[dir="ltr"] .sp-section__head,
html[dir="ltr"] .section-header {
    justify-content: space-between;
    text-align: left;
}
html[dir="rtl"] .sp-section__head,
html[dir="rtl"] .section-header {
    text-align: right;
}

/* ========================================================================
   Mobile home polish v4.7.5
   ======================================================================== */
@media (max-width: 768px) {
    .header-main .container > .flex {
        gap: 0.65rem !important;
        padding-block: 0.65rem !important;
    }
    .site-logo .logo-mark {
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 0.7rem;
    }

    .home-hero--empty {
        min-height: 58vh;
        padding: 3.5rem 1.15rem 2.5rem;
        display: grid;
        align-content: center;
    }
    .home-hero--empty .brand {
        font-size: clamp(1.85rem, 9vw, 2.4rem);
        margin-bottom: 0.65rem;
    }
    .home-hero--empty p {
        font-size: 0.92rem;
        margin-bottom: 1.15rem;
    }
    .home-hero__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.55rem;
        justify-content: center;
    }
    .home-hero__actions .sp-btn {
        min-height: 2.55rem;
        padding: 0.55rem 1rem;
        font-size: 0.88rem;
    }

    .home-benefits .benefits-mobile-scroll {
        display: flex !important;
        gap: 0.65rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0.15rem 0.15rem 0.35rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .home-benefits .benefits-mobile-scroll::-webkit-scrollbar { display: none; }
    .home-benefits .home-benefit {
        flex: 0 0 78%;
        max-width: 16.5rem;
        scroll-snap-align: start;
        padding: 0.8rem 0.9rem;
    }
    .home-benefit h3 { font-size: 0.84rem; }
    .home-benefit p { font-size: 0.72rem; }

    .sp-section { padding: 1.35rem 0; }
    .sp-section__head {
        margin-bottom: 0.9rem;
        align-items: center;
    }
    .sp-section__title { font-size: 1.15rem !important; }

    .home-cats,
    .categories-scroll-mobile.home-cats {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 0.85rem 0.45rem !important;
        overflow: visible !important;
        flex-wrap: unset !important;
        padding-bottom: 0 !important;
    }
    .home-cats > a.home-cat,
    .categories-scroll-mobile.home-cats > a {
        width: auto !important;
        max-width: none !important;
        flex: none !important;
    }
    .home-cat__media {
        max-width: 4.35rem;
        border-radius: 50%;
        border: 1px solid #e8eef5;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
        background: #fff;
    }
    .home-cat__icon {
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 50%;
        font-size: 0.95rem;
    }
    .home-cat__name {
        margin-top: 0.4rem;
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1.2;
    }

    .mobile-bottom-nav__item {
        font-size: 0.58rem !important;
        letter-spacing: -0.01em;
        padding-inline: 0.1rem;
    }
    .mobile-bottom-nav__item span {
        max-width: 4.4rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
    }
    .mobile-bottom-nav__item i {
        font-size: 1.05rem !important;
    }
}

/* ========================================================================
   PDP — international / AliExpress-style product page
   ======================================================================== */
.pdp-title {
    margin: 0;
    font-size: clamp(1.65rem, 4.2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.18;
    color: var(--store-ink);
}

.pdp-price__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem 0.75rem;
}
.pdp-price__now,
.pdp-price__now {
    font-size: clamp(1.55rem, 3.2vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary, #0f766e);
    line-height: 1.15;
}
.pdp-price__was,
.pdp-price__was {
    font-size: 1.05rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
}
.pdp-price__save {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #15803d;
}
.pdp-buybar__was,
.pdp-buybar__was {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
}

.pdp-sale-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.pdp-media {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.pdp-thumbs {
    order: 2;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.pdp-thumb {
    flex: 0 0 4.25rem;
    width: 4.25rem;
    height: 4.25rem;
    padding: 0;
    border: 2px solid var(--store-line);
    border-radius: 0.7rem;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
}
.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pdp-thumb.is-active {
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 15, 118, 110), 0.22);
}
.pdp-stage {
    order: 1;
    border-radius: 1rem;
    background: #fff;
}
.pdp-stage__frame {
    position: relative;
    aspect-ratio: 1;
    background: #f8fafc;
}
.pdp-stage__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

@media (min-width: 1024px) {
    .pdp-media {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.85rem;
    }
    .pdp-thumbs {
        order: 0;
        flex-direction: column;
        width: 5rem;
        max-height: 34rem;
        overflow-x: hidden;
        overflow-y: auto;
        flex: 0 0 5rem;
    }
    .pdp-thumb {
        flex: 0 0 4.6rem;
        width: 4.6rem;
        height: 4.6rem;
    }
    .pdp-stage {
        flex: 1;
        min-width: 0;
    }
}

.pdp-attr { margin-bottom: 0.15rem; }
.pdp-attr__label {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--store-ink);
}
.pdp-attr__picked {
    font-weight: 600;
    color: var(--store-muted);
}

.pdp-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.pdp-swatch {
    width: 4.5rem;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}
.pdp-swatch img,
.pdp-swatch__fill {
    width: 100%;
    height: 3.35rem;
    display: block;
    object-fit: cover;
}
.pdp-swatch__name {
    display: block;
    padding: 0.2rem 0.2rem 0.28rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdp-swatch--dot .pdp-swatch__fill {
    border-radius: 0.5rem;
}
.pdp-swatch.is-active {
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 15, 118, 110), 0.25);
}
.pdp-swatch.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255,255,255,0.55);
    pointer-events: none;
}

.pdp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.pdp-chip {
    min-width: 2.75rem;
    min-height: 2.4rem;
    padding: 0.35rem 0.85rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--store-ink);
    cursor: pointer;
}
.pdp-chip.is-active {
    border-color: var(--primary, #0f766e);
    background: rgba(var(--primary-rgb, 15, 118, 110), 0.08);
    color: var(--primary, #0f766e);
}

.pdp-buybar {
    display: none;
}

@media (max-width: 1023px) {
    body.page-product .main-content,
    .sp-page--pdp {
        padding-bottom: calc(8.75rem + env(safe-area-inset-bottom, 0px)) !important;
    }
    .pdp-buybar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(3.55rem + env(safe-area-inset-bottom, 0px));
        z-index: 9980;
        padding: 0.65rem 0.9rem;
        background: rgba(255,255,255,0.96);
        border-top: 1px solid var(--store-line);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(12px);
        transition: transform 0.22s ease, opacity 0.22s ease;
    }
    .pdp-buybar.is-hidden {
        display: none !important;
    }
    .pdp-buybar__price {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
    }
    .pdp-buybar__price strong {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--primary, #0f766e);
    }
    .pdp-buybar__price span {
        font-size: 0.72rem;
        color: var(--store-muted);
    }
    .pdp-buybar__cta {
        flex: 1;
        max-width: 14rem;
        min-height: 2.7rem;
        justify-content: center;
    }
    .pdp-review-submit {
        margin-bottom: 0.25rem;
    }
    body.page-product .scroll-to-top,
    body.page-product #scrollToTop,
    body.page-product #scroll-to-top {
        bottom: calc(8.4rem + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.page-product .whatsapp-fab,
    body.page-product .whatsapp-float {
        bottom: calc(8.4rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* ========================================================================
   Mobile storefront — full width, no overlap with bottom nav
   ======================================================================== */
html, body {
    max-width: 100%;
    overflow-x: clip;
}
img, svg, video {
    max-width: 100%;
}

@media (max-width: 1023px) {
    .main-content {
        padding-bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
        min-width: 0;
    }
    .sp-page {
        padding-bottom: 0.5rem;
    }
    .sp-container {
        padding-inline: 0.85rem;
        max-width: 100%;
    }
    .sp-hero__inner {
        padding: 0.7rem 0.85rem 0.85rem;
    }
    .sp-hero__title {
        font-size: 1.35rem;
        line-height: 1.25;
    }
    .sp-hero__subtitle {
        font-size: 0.82rem;
    }
    .sp-panel--pad {
        padding: 0.95rem !important;
    }
    .sp-steps {
        padding: 0.55rem 0.15rem 0.85rem;
        margin-bottom: 0.75rem;
        gap: 0.3rem;
        overflow-x: auto;
    }
    .sp-step span:last-child {
        font-size: 0.72rem;
        white-space: nowrap;
    }
    .checkout-form .space-y-5 > *,
    .checkout-form .space-y-4 > * {
        margin-top: 0;
    }
    .checkout-page .delivery-option {
        padding: 0.75rem !important;
        min-width: 0;
    }
    .checkout-page .sp-field {
        margin-bottom: 0.75rem;
    }
    .checkout-page .sp-field input,
    .checkout-page .sp-field select,
    .checkout-page .sp-field textarea,
    .sp-field input,
    .sp-field select,
    .sp-field textarea {
        font-size: 16px !important;
        min-height: 2.85rem;
    }
    .header-cart {
        padding-inline: 0.4rem;
    }
    .header-cart__label {
        display: none !important;
    }

    body.page-checkout .mobile-bottom-nav,
    body.page-order .mobile-bottom-nav {
        display: none !important;
    }
    body.page-checkout,
    body.page-order {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }
    body.page-checkout .main-content,
    body.page-order .main-content {
        padding-bottom: 1.25rem;
    }

    .site-footer {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
        margin-bottom: 0;
    }
    body:not(.page-checkout):not(.page-order) .site-footer {
        padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    }

    .auth-card,
    .sp-panel,
    .product-card,
    .home-cta {
        max-width: 100%;
    }

    table {
        max-width: 100%;
    }

    html[dir="rtl"] .header-main .container > .flex {
        flex-direction: row-reverse;
    }

    html[dir="rtl"] .mobile-bottom-nav__badge {
        right: auto;
        left: calc(50% - 14px);
    }

    .pdp-review-form.sticky {
        position: static;
    }
}

/* Home categories — compact AliExpress tiles (must win over older mobile rules) */
@media (max-width: 1023px) {
    .home-cats {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 0.9rem 0.5rem !important;
        overflow: visible !important;
    }
    .home-cats .home-cat {
        width: auto !important;
        max-width: none !important;
    }
    .home-cats .home-cat__media {
        width: 3.85rem;
        height: 3.85rem;
        max-width: 3.85rem;
        aspect-ratio: 1;
        border-radius: 50%;
        margin-inline: auto;
        background: #fff;
        border: 1px solid #e8eef4;
        box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
    }
    .home-cats .home-cat__icon {
        width: 1.85rem;
        height: 1.85rem;
        border-radius: 50%;
        font-size: 0.9rem;
    }
    .home-cats .home-cat__name {
        margin-top: 0.38rem;
        font-size: 0.7rem;
        font-weight: 600;
        color: #1e293b;
    }
}
