.storefront-app {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(12, 74, 110, 0.12), transparent 24rem),
        radial-gradient(circle at bottom left, rgba(217, 119, 6, 0.12), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #f4efe8 50%, #eef4f8 100%);
    color: #0f172a;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

[x-cloak] {
    display: none !important;
}

.storefront-grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 2.8rem 2.8rem;
    pointer-events: none;
}

.storefront-shell {
    position: relative;
    z-index: 1;
    max-width: 1380px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.sf-header,
.sf-hero-panel,
.sf-cart-panel,
.sf-checkout-panel,
.sf-detail-layout,
.sf-empty-state,
.sf-section,
.sf-summary-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.sf-header {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sf-header-main,
.sf-header-side {
    display: grid;
    gap: 1.25rem;
}

.sf-header-main h1,
.sf-hero-copy h2,
.sf-detail-copy h2,
.sf-cart-panel h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
}

.sf-header-main p,
.sf-hero-copy p,
.sf-detail-text,
.sf-filter-heading p,
.sf-product-copy p,
.sf-empty-state p,
.sf-cart-line-copy p,
.sf-cart-line-copy span {
    margin: 0;
    color: #475569;
    line-height: 1.8;
}

.sf-eyebrow,
.sf-section-label,
.sf-side-label,
.sf-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sf-header-actions,
.sf-form-actions,
.sf-product-actions,
.sf-category-pills,
.sf-locale-switcher,
.sf-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sf-btn,
.sf-pill,
.sf-page-link,
.sf-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.sf-btn:hover,
.sf-pill:hover,
.sf-page-link:hover,
.sf-back-link:hover {
    transform: translateY(-1px);
}

.sf-btn-dark {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.sf-btn-light {
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
}

.sf-btn-accent {
    border: 1px solid rgba(2, 132, 199, 0.24);
    color: #075985;
    background: rgba(224, 242, 254, 0.9);
}

.sf-btn-light-danger {
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #b91c1c;
    background: rgba(254, 242, 242, 0.95);
}

.sf-btn-muted {
    border: none;
    color: #64748b;
    background: #e2e8f0;
    cursor: not-allowed;
}

.sf-btn-block {
    width: 100%;
}

.sf-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.82rem;
}

.sf-side-block {
    display: grid;
    gap: 0.8rem;
}

.sf-locale-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 700;
}

.sf-locale-switcher a.is-active {
    color: #fff;
    border-color: #0f172a;
    background: #0f172a;
}

.sf-metrics,
.sf-stat-grid,
.sf-spec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.sf-metric,
.sf-stat-card,
.sf-spec-card {
    padding: 1rem;
    border-radius: 1.35rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.sf-metric span,
.sf-stat-card span,
.sf-spec-card span,
.sf-price-box span,
.sf-summary-row span {
    display: block;
    color: #64748b;
    font-size: 0.86rem;
}

.sf-metric strong,
.sf-stat-card strong,
.sf-spec-card strong,
.sf-price-box strong,
.sf-summary-row strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.sf-main {
    display: grid;
    gap: 1.5rem;
}

.sf-flash {
    padding: 1rem 1.25rem;
    border-radius: 1.35rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.sf-flash-success {
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.sf-flash-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.sf-flash-title {
    margin: 0 0 0.5rem;
}

.sf-error-list {
    margin: 0;
    padding-inline-start: 1rem;
}

.sf-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

.sf-hero-copy,
.sf-filter-panel {
    display: grid;
    gap: 1rem;
}

.sf-filter-heading h3,
.sf-section-head h3,
.sf-summary-card h3 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
}

.sf-search-form,
.sf-checkout-form,
.sf-add-form {
    display: grid;
    gap: 1rem;
}

.sf-section {
    padding: 1.25rem;
}

.sf-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sf-category-pills {
    margin-top: 1rem;
}

.sf-pill {
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #334155;
    background: rgba(255, 255, 255, 0.92);
}

.sf-pill.is-active {
    color: #fff;
    border-color: #0f172a;
    background: #0f172a;
}

.sf-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.sf-product-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.75rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.sf-product-media {
    height: clamp(13rem, 24vw, 16rem);
    display: grid;
    place-items: center;
    padding: 1.25rem;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.sf-product-media img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf-product-body {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.sf-product-tags {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sf-tag,
.sf-stock-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.sf-tag {
    color: #0f766e;
    background: rgba(204, 251, 241, 0.75);
}

.sf-stock-tag.in_stock {
    color: #166534;
    background: rgba(220, 252, 231, 0.9);
}

.sf-stock-tag.out_of_stock {
    color: #b45309;
    background: rgba(254, 243, 199, 0.95);
}

.sf-product-copy h3,
.sf-cart-line-copy h3 {
    margin: 0 0 0.45rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
}

.sf-price-box {
    padding: 1rem;
    border-radius: 1.35rem;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    border: 1px solid rgba(191, 219, 254, 0.85);
}

.sf-old-price-wrap {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sf-old-price {
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 700;
}

.sf-old-price-wrap em {
    font-style: normal;
    color: #b45309;
    font-weight: 700;
}

.sf-empty-state {
    padding: 2.5rem;
    text-align: center;
}

.sf-empty-state h3 {
    margin: 0 0 0.75rem;
    font-size: 1.45rem;
    font-weight: 800;
}

.sf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sf-page-link {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
}

.sf-page-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.sf-page-status {
    font-weight: 800;
    color: #334155;
}

.sf-back-link {
    width: fit-content;
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
}

.sf-detail-layout,
.sf-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

.sf-detail-gallery,
.sf-detail-copy,
.sf-cart-panel,
.sf-checkout-panel {
    display: grid;
    gap: 1rem;
}

.sf-detail-main-image,
.sf-cart-line-media {
    min-height: 22rem;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.92);
    overflow: hidden;
}

.sf-detail-main-image img,
.sf-cart-line-media img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    margin-inline: auto;
    object-fit: contain;
}

.sf-thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.sf-thumb-card {
    border-radius: 1.1rem;
    min-height: 6.5rem;
    padding: 0.75rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.sf-thumb-card img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    margin-inline: auto;
    object-fit: contain;
}

.sf-cart-panel,
.sf-checkout-panel {
    padding: 1.5rem;
}

.sf-cart-lines {
    display: grid;
    gap: 1rem;
}

.sf-cart-line {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 1.5rem;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.sf-cart-line-media {
    min-height: 7rem;
    padding: 0.9rem;
}

.sf-cart-line-copy strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.05rem;
    color: #0f172a;
}

.sf-cart-line-actions {
    display: grid;
    gap: 0.75rem;
}

.sf-summary-card {
    padding: 1.25rem;
}

.sf-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.9rem;
    margin-top: 0.9rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.sf-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.sf-field {
    display: grid;
    gap: 0.45rem;
}

.sf-input,
.sf-select,
.sf-textarea,
.sf-static-field {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    color: #0f172a;
}

.sf-input:focus,
.sf-select:focus,
.sf-textarea:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.sf-static-field {
    display: flex;
    align-items: center;
    min-height: 3.3rem;
    font-weight: 700;
    color: #334155;
    cursor: not-allowed;
    background: rgba(248, 250, 252, 0.98);
}

.sf-textarea {
    min-height: 7rem;
    resize: vertical;
}

.sf-input-sm {
    max-width: 6rem;
    min-height: auto;
    padding-block: 0.8rem;
}

.sf-product-placeholder {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    color: #475569;
}

.sf-product-placeholder strong {
    color: #0f172a;
}

.sf-location-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.9);
}

.sf-location-copy {
    display: grid;
    gap: 0.3rem;
}

.sf-location-copy strong,
.sf-map-head h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.sf-location-copy p {
    margin: 0;
    color: #475569;
}

.sf-map-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
}

.sf-map-dialog {
    width: min(100%, 980px);
    max-height: min(92vh, 860px);
    display: grid;
    gap: 1rem;
    overflow: hidden;
    padding: 1.25rem;
    border-radius: 1.8rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.sf-map-head,
.sf-map-toolbar,
.sf-map-footer,
.sf-map-mode-switch,
.sf-map-coordinates {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sf-map-canvas {
    min-height: min(58vh, 520px);
    border-radius: 1.4rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.sf-map-coordinates span {
    display: inline-flex;
    gap: 0.35rem;
    color: #475569;
    font-size: 0.92rem;
}

.sf-map-coordinates strong {
    color: #0f172a;
}

@media (max-width: 1100px) {
    .sf-header,
    .sf-hero-panel,
    .sf-detail-layout,
    .sf-cart-layout,
    .sf-product-grid {
        grid-template-columns: 1fr;
    }

    .sf-metrics,
    .sf-stat-grid,
    .sf-spec-grid,
    .sf-field-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .storefront-shell {
        padding-inline: 0.85rem;
    }

    .sf-product-media {
        height: 12rem;
    }

    .sf-cart-line {
        grid-template-columns: 1fr;
    }

    .sf-thumb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sf-location-card,
    .sf-map-head,
    .sf-map-toolbar,
    .sf-map-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .sf-map-dialog {
        width: 100%;
        padding: 1rem;
    }

    .sf-map-canvas {
        min-height: 46vh;
    }

    .sf-header-main h1,
    .sf-hero-copy h2,
    .sf-detail-copy h2,
    .sf-cart-panel h2 {
        font-size: 2rem;
    }
}
