/* Storefront — Alfa Business Store */
:root {
    --store-accent: #2563eb;
    --store-accent-hover: color-mix(in srgb, var(--store-accent) 88%, #000);
    --store-accent-soft: color-mix(in srgb, var(--store-accent) 11%, #fff);
    --store-accent-ring: color-mix(in srgb, var(--store-accent) 28%, transparent);
    --store-surface: #ffffff;
    --store-bg: #f1f4f9;
    --store-bg-elevated: #ffffff;
    --store-text: #0f172a;
    --store-muted: #64748b;
    --store-border: #e2e8f0;
    --store-success: #25d366;
    --store-success-hover: #1ebe57;
    --store-radius: 14px;
    --store-radius-sm: 10px;
    --store-radius-lg: 20px;
    --store-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.06);
    --store-shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.12);
    --store-font: 'DM Sans', system-ui, -apple-system, sans-serif;
    --store-font-display: 'Outfit', var(--store-font);
    --store-header-h: 3.5rem;
    --store-container: 1200px;
    --store-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body.store-body {
    font-family: var(--store-font);
    color: var(--store-text);
    background: var(--store-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.store-skip-link {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--store-accent);
    color: #fff;
    border-radius: var(--store-radius-sm);
}

.store-skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* —— Header —— */
.store-header {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--store-border);
    z-index: 1030;
    transition: box-shadow var(--store-transition);
}

.store-header.is-scrolled {
    box-shadow: var(--store-shadow);
}

.store-header .container {
    max-width: var(--store-container);
}

.store-brand {
    font-family: var(--store-font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.025em;
    color: var(--store-text) !important;
}

.store-brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--store-radius-sm);
    font-size: 1rem;
    background: var(--store-accent);
    color: #fff;
}

.store-nav-link {
    color: var(--store-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--store-radius-sm);
    text-decoration: none;
    transition: color var(--store-transition), background var(--store-transition);
}

.store-nav-link:hover,
.store-nav-link.active {
    color: var(--store-accent);
    background: var(--store-accent-soft);
}

.store-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.store-cart-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.15rem;
    border: 2px solid #fff;
}

.store-header-menu-btn {
    color: var(--store-text);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius-sm);
    padding: 0.35rem 0.6rem;
}

/* —— Top stack (banners) —— */
.store-top-stack {
    max-width: var(--store-container);
}

.store-personalization {
    background: linear-gradient(105deg, var(--store-accent-soft), transparent 70%);
    border: 1px solid color-mix(in srgb, var(--store-accent) 18%, transparent);
    border-radius: var(--store-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.store-wa-context {
    padding: 0.65rem 1rem;
    background: color-mix(in srgb, var(--store-success) 9%, #fff);
    border: 1px solid color-mix(in srgb, var(--store-success) 22%, transparent);
    border-radius: var(--store-radius);
}

.store-wa-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #0d7a6e;
}

.store-branch-bar {
    position: sticky;
    top: var(--store-header-h);
    z-index: 1025;
    background: var(--store-surface);
}

.store-branch-picker .form-select {
    min-width: 10rem;
    max-width: 100%;
    border-radius: var(--store-radius-sm);
    font-size: 0.875rem;
}

/* —— Main —— */
main.container {
    max-width: var(--store-container);
    flex: 1;
}

.store-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider: '›';
    font-size: 0.8125rem;
}

.store-breadcrumb .breadcrumb-item a {
    color: var(--store-muted);
    text-decoration: none;
}

.store-breadcrumb .breadcrumb-item a:hover {
    color: var(--store-accent);
}

.store-page-title {
    font-family: var(--store-font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.store-page-subtitle,
.store-eyebrow {
    font-size: 0.875rem;
    color: var(--store-muted);
}

.store-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    font-size: 0.7rem;
}

/* —— Hero —— */
.store-hero {
    background: linear-gradient(135deg, var(--store-accent) 0%, color-mix(in srgb, var(--store-accent) 55%, #7c3aed) 100%);
    color: #fff;
    border-radius: var(--store-radius-lg);
    box-shadow: var(--store-shadow-hover);
    overflow: hidden;
    position: relative;
}

.store-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.14), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(0, 0, 0, 0.08), transparent 40%);
    pointer-events: none;
}

.store-hero-inner {
    position: relative;
    z-index: 1;
}

.store-hero-title {
    font-family: var(--store-font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.store-hero-lead {
    opacity: 0.92;
    max-width: 36rem;
    font-size: 1rem;
    line-height: 1.55;
}

.store-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* —— Category chips —— */
.store-filter-chips {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 1.25rem;
}

.store-filter-chips::-webkit-scrollbar {
    display: none;
}

.store-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--store-muted);
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    transition: all var(--store-transition);
    white-space: nowrap;
}

.store-chip:hover,
.store-chip.is-active {
    color: var(--store-accent);
    border-color: var(--store-accent);
    background: var(--store-accent-soft);
}

/* —— Sidebar —— */
.store-sidebar-card {
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    background: var(--store-surface);
    box-shadow: var(--store-shadow);
}

.store-sidebar-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--store-muted);
    margin-bottom: 0.75rem;
}

.store-sidebar-card .list-group-item-action {
    border-radius: var(--store-radius-sm);
    margin-bottom: 2px;
    font-size: 0.9rem;
    color: var(--store-text);
    border: none;
    padding: 0.5rem 0.65rem;
}

.store-sidebar-card .list-group-item-action:hover,
.store-sidebar-card .list-group-item-action.active {
    background: var(--store-accent-soft);
    color: var(--store-accent);
    font-weight: 500;
}

/* —— Search —— */
.store-search .input-group {
    border-radius: var(--store-radius);
    overflow: hidden;
    box-shadow: var(--store-shadow);
    background: var(--store-surface);
}

.store-search .input-group-text {
    background: var(--store-surface);
    border: none;
    padding-left: 1rem;
}

.store-search .form-control {
    border: none;
    padding: 0.75rem 0.5rem;
    font-size: 0.9375rem;
}

.store-search .form-control:focus {
    box-shadow: none;
}

.store-search .btn-search {
    padding: 0.75rem 1.35rem;
    font-weight: 600;
    border-radius: 0;
    background: var(--store-accent);
    border-color: var(--store-accent);
}

.store-search .btn-search:hover {
    background: var(--store-accent-hover);
    border-color: var(--store-accent-hover);
}

.store-results-meta {
    font-size: 0.8125rem;
    color: var(--store-muted);
    margin-bottom: 1rem;
}

/* —— Product cards —— */
.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--store-border) !important;
    border-radius: var(--store-radius) !important;
    background: var(--store-surface);
    overflow: hidden;
    transition: transform var(--store-transition), box-shadow var(--store-transition), border-color var(--store-transition);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--store-shadow-hover) !important;
    border-color: color-mix(in srgb, var(--store-accent) 25%, var(--store-border)) !important;
}

.product-card-media {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc, #e8edf4);
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card:hover .product-card-media img {
    transform: scale(1.04);
}

.product-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--store-muted);
    font-size: 2rem;
    opacity: 0.45;
}

.product-card-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #ef4444;
    color: #fff;
    border-radius: 6px;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.85rem 0.9rem 0.9rem;
    gap: 0.35rem;
}

.product-card-category {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--store-muted);
    text-decoration: none;
    align-self: flex-start;
}

.product-card-category:hover {
    color: var(--store-accent);
}

.product-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    flex: 1;
}

.product-card-title a {
    color: var(--store-text);
    text-decoration: none;
}

.product-card-title a:hover {
    color: var(--store-accent);
}

.product-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.15rem 0 0.5rem;
}

.product-card .price {
    font-family: var(--store-font-display);
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--store-accent);
}

.product-card-compare {
    font-size: 0.8125rem;
    color: var(--store-muted);
    text-decoration: line-through;
}

.product-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.product-card-actions-primary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
}

.product-card-actions-primary form:only-child {
    grid-column: 1 / -1;
}

.product-card-gate-hint {
    font-size: 0.6875rem;
    color: var(--store-muted);
    text-align: center;
}

.product-variations fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.product-variation-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--store-border, #e5e7eb);
    border-radius: var(--store-radius-sm, 8px);
    cursor: pointer;
    font-size: 0.8125rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.product-variation-option:has(input:checked) {
    border-color: var(--store-accent);
    box-shadow: 0 0 0 1px var(--store-accent);
}

.product-color-swatch {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

/* —— Buttons —— */
.btn-primary {
    background: var(--store-accent);
    border-color: var(--store-accent);
    font-weight: 600;
    border-radius: var(--store-radius-sm);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--store-accent-hover);
    border-color: var(--store-accent-hover);
}

.btn-outline-primary {
    color: var(--store-accent);
    border-color: var(--store-accent);
    font-weight: 600;
    border-radius: var(--store-radius-sm);
}

.btn-outline-primary:hover {
    background: var(--store-accent);
    border-color: var(--store-accent);
}

.btn-whatsapp {
    background: var(--store-success) !important;
    border-color: var(--store-success) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--store-radius-sm);
}

.btn-whatsapp:hover {
    background: var(--store-success-hover) !important;
    border-color: var(--store-success-hover) !important;
    color: #fff !important;
}

.btn-store-soft {
    background: var(--store-accent-soft);
    color: var(--store-accent);
    border: 1px solid transparent;
    font-weight: 600;
    border-radius: var(--store-radius-sm);
}

.btn-store-soft:hover {
    background: color-mix(in srgb, var(--store-accent) 18%, #fff);
    color: var(--store-accent-hover);
}

.btn-store-ghost {
    background: transparent;
    color: var(--store-muted);
    border: none;
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.25rem 0;
}

.btn-store-ghost:hover {
    color: var(--store-accent);
    background: transparent;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.75;
}

/* —— Product detail —— */
.store-product-gallery {
    border-radius: var(--store-radius-lg);
    overflow: hidden;
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    box-shadow: var(--store-shadow);
}

.store-product-gallery img {
    width: 100%;
    display: block;
}

.store-product-gallery .product-img-placeholder {
    min-height: 320px;
    aspect-ratio: 1;
}

.store-product-info .price {
    font-family: var(--store-font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: var(--store-accent);
    letter-spacing: -0.02em;
}

.store-purchase-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow);
}

@media (min-width: 992px) {
    .store-purchase-sticky {
        position: sticky;
        top: calc(var(--store-header-h) + 1rem);
    }
}

.store-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius-sm);
    overflow: hidden;
    background: var(--store-bg);
    align-self: flex-start;
}

.store-qty-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: transparent;
    color: var(--store-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--store-transition), color var(--store-transition);
}

.store-qty-btn:hover {
    background: var(--store-accent-soft);
    color: var(--store-accent);
}

.store-qty-input {
    width: 3rem;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.store-qty-input::-webkit-outer-spin-button,
.store-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.store-purchase-hint {
    font-size: 0.8125rem;
    color: var(--store-muted);
}

.store-stock-list {
    border-radius: var(--store-radius);
    overflow: hidden;
    border: 1px solid var(--store-border);
}

.store-stock-list .list-group-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* —— Cart —— */
.store-cart-line {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--store-border);
}

.store-cart-line:last-child {
    border-bottom: none;
}

.store-cart-thumb {
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
    border-radius: var(--store-radius-sm);
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--store-muted);
    font-size: 1.25rem;
}

.store-cart-line-body {
    flex: 1;
    min-width: 0;
}

.store-cart-line-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
}

.store-cart-summary-card {
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    background: var(--store-surface);
    box-shadow: var(--store-shadow);
}

.cart-summary-sticky {
    position: sticky;
    top: calc(var(--store-header-h) + 1rem);
}

.cart-line-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius-sm);
    overflow: hidden;
    background: var(--store-bg);
}

.cart-line-qty button,
.cart-line-qty input {
    border: none;
    background: transparent;
}

.cart-line-qty button {
    width: 2rem;
    height: 2rem;
    color: var(--store-muted);
}

.cart-line-qty button:hover {
    background: var(--store-accent-soft);
    color: var(--store-accent);
}

.cart-line-qty input {
    width: 2.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.store-cart-mobile-checkout {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(3.75rem + env(safe-area-inset-bottom));
    z-index: 1015;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--store-border);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
}

.store-cart-mobile-checkout .btn {
    font-weight: 600;
}

/* —— Empty states —— */
.store-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    border-radius: var(--store-radius-lg);
    background: var(--store-surface);
    border: 1px dashed var(--store-border);
}

.store-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--store-accent-soft);
    color: var(--store-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* —— FAB & mobile nav —— */
.wa-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1050;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--store-success) !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: transform var(--store-transition), box-shadow var(--store-transition);
}

.wa-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
}

.store-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--store-border);
    padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
    z-index: 1020;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
}

.store-mobile-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    color: var(--store-muted);
    font-size: 0.625rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.25rem;
    border: none;
    background: none;
    position: relative;
}

.store-mobile-bar a.active {
    color: var(--store-accent);
}

.store-mobile-bar i {
    font-size: 1.35rem;
}

.store-mobile-bar .bar-badge {
    position: absolute;
    top: 0.15rem;
    right: calc(50% - 1.25rem);
    min-width: 1rem;
    height: 1rem;
    font-size: 0.6rem;
    padding: 0 0.25rem;
    line-height: 1rem;
}

/* —— Toasts / alerts —— */
.store-toast-container {
    position: fixed;
    top: calc(var(--store-header-h) + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    width: min(420px, calc(100% - 2rem));
    pointer-events: none;
}

.store-toast-container .alert {
    pointer-events: auto;
    border-radius: var(--store-radius);
    border: none;
    box-shadow: var(--store-shadow-hover);
}

.store-pagination .pagination {
    gap: 0.25rem;
}

.store-pagination .page-link {
    border-radius: var(--store-radius-sm);
    color: var(--store-muted);
    border-color: var(--store-border);
}

.store-pagination .page-item.active .page-link {
    background: var(--store-accent);
    border-color: var(--store-accent);
}

.text-primary {
    color: var(--store-accent) !important;
}

footer.store-footer {
    background: var(--store-surface);
    border-top: 1px solid var(--store-border);
    margin-top: auto;
}

footer.store-footer .container {
    max-width: var(--store-container);
}

/* —— Offcanvas menu —— */
.store-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--store-border);
}

.store-offcanvas .list-group-item {
    border: none;
    padding: 0.75rem 0;
    font-weight: 500;
}

/* —— Responsive —— */
@media (max-width: 767.98px) {
    :root {
        --store-header-h: 3.25rem;
    }

    .store-mobile-bar {
        display: flex;
    }

    body.store-body {
        padding-bottom: 4.25rem;
    }

    body.store-body.has-cart-checkout {
        padding-bottom: 7.5rem;
    }

    .wa-fab {
        bottom: calc(4.25rem + env(safe-area-inset-bottom));
    }

    .store-cart-mobile-checkout.is-visible {
        display: block;
    }

    .store-sidebar-desktop {
        display: none;
    }

    .store-hero {
        border-radius: var(--store-radius);
    }
}

@media (min-width: 768px) {
    .store-filter-chips-mobile-only {
        display: none;
    }
}

/* Deep-link highlight (?sku=) from Meta / ads */
.catalog-sku-highlight {
    outline: 3px solid var(--store-accent, #2563eb);
    outline-offset: 4px;
    border-radius: var(--store-radius, 0.75rem);
}
