/* === AVACOMMERCE STOREFRONT - AUTO-ADAPTIVE CSS === */

.avc-standalone-body {
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}
.avc-standalone-body[data-avc-theme="dark"],
.avc-standalone-body[data-avc-resolved-theme="dark"] {
    background: #0b0f19;
    color: #f1f5f9;
}
.avc-standalone-body[data-avc-resolved-theme="light"] {
    background: #f8fafc;
    color: #0f172a;
}
.avc-standalone-main {
    min-height: 100vh;
}

.avc-store {
    --avc-surface: #ffffff;
    --avc-surface-2: #f8fafc;
    --avc-fg: inherit;
    --avc-muted: color-mix(in srgb, currentColor 64%, transparent);
    --avc-border: color-mix(in srgb, currentColor 14%, transparent);
    --avc-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    --avc-accent: #3d4bd8;
    --avc-accent-ink: #ffffff;
    --avc-radius: 14px;
    --avc-font: inherit;

    color: var(--avc-fg);
    font-family: var(--avc-font, inherit);
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 0;
    box-sizing: border-box;
}
.avc-store[data-avc-fullpage="1"] {
    padding: 36px clamp(16px, 3vw, 32px) 64px;
}
.avc-store *, .avc-store *::before, .avc-store *::after {
    box-sizing: border-box;
}

.avc-store[data-avc-theme="light"],
.avc-store[data-avc-resolved-theme="light"] {
    --avc-surface: #ffffff;
    --avc-surface-2: #f8fafc;
    --avc-fg: #0f172a;
    --avc-muted: #475569;
    --avc-border: rgba(15, 23, 42, 0.11);
    --avc-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}
.avc-store[data-avc-theme="dark"],
.avc-store[data-avc-resolved-theme="dark"] {
    --avc-surface: #121622;
    --avc-surface-2: #191f30;
    --avc-fg: #f8fafc;
    --avc-muted: #94a3b8;
    --avc-border: rgba(255, 255, 255, 0.12);
    --avc-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

/* Header & Navigation Pills */
.avc-store-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}
.avc-store h1 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--avc-fg);
}
.avc-store h3 {
    color: var(--avc-fg);
}
.avc-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.avc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--avc-border);
    background: var(--avc-surface);
    color: var(--avc-fg);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: border-color .18s ease, background-color .18s ease, transform .15s ease;
}
.avc-pill:hover {
    border-color: var(--avc-accent);
    transform: translateY(-1px);
}
.avc-pill.active {
    background: var(--avc-accent);
    border-color: var(--avc-accent);
    color: var(--avc-accent-ink);
}
.avc-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    border-radius: calc(var(--avc-radius) * 0.8);
    border: 1px solid var(--avc-border);
    background: var(--avc-surface);
    color: var(--avc-fg);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--avc-shadow);
    transition: border-color .18s ease, transform .15s ease;
}
.avc-cart-link:hover {
    border-color: var(--avc-accent);
    transform: translateY(-1px);
}

/* Catalog Grid & Product Cards */
.avc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 20px;
}
.avc-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--avc-border);
    border-radius: var(--avc-radius);
    background: var(--avc-surface);
    box-shadow: var(--avc-shadow);
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.avc-product-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--avc-accent) 48%, var(--avc-border));
}
.avc-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--avc-accent);
    color: var(--avc-accent-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.avc-detail-info > .avc-card-badge {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
}
.avc-card-img {
    display: block;
    overflow: hidden;
    background: var(--avc-surface-2);
}
.avc-card-img img {
    width: 100%;
    height: 196px;
    object-fit: cover;
    display: block;
    transition: transform .28s ease;
}
.avc-product-card:hover .avc-card-img img {
    transform: scale(1.03);
}
.avc-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.avc-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    padding-right: 72px;
}
.avc-card-body h3 a {
    color: var(--avc-fg);
    text-decoration: none;
}
.avc-card-body h3 a:hover {
    color: var(--avc-accent);
}
.avc-card-body p {
    color: var(--avc-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}
.avc-tier-chip {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.14);
    padding: 3px 9px;
    border-radius: 6px;
    width: fit-content;
}
.avc-card-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid color-mix(in srgb, var(--avc-border) 60%, transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.avc-price-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.avc-price-wrap strong {
    font-size: 17px;
    font-weight: 700;
    color: var(--avc-fg);
}
.avc-price-wrap span {
    font-size: 12.5px;
    color: var(--avc-muted);
}
.avc-price-wrap del {
    color: var(--avc-muted);
    font-size: 12.5px;
}

/* Preset Variants */
.avc-store[data-avc-preset="glass"] .avc-product-card,
.avc-store[data-avc-preset="glass"] .avc-tiers-box,
.avc-store[data-avc-preset="glass"] .avc-pay-card,
.avc-store[data-avc-preset="glass"] .avc-summary-box,
.avc-store[data-avc-preset="glass"] .avc-cart-lines,
.avc-store[data-avc-preset="glass"] .avc-cart-link,
.avc-store[data-avc-preset="glass"] .avc-pill:not(.active) {
    background: color-mix(in srgb, var(--avc-surface) 64%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.avc-store[data-avc-preset="glass"] .avc-product-card:hover {
    box-shadow: 0 14px 36px color-mix(in srgb, var(--avc-accent) 18%, rgba(0, 0, 0, 0.45));
}
.avc-store[data-avc-preset="minimal"] .avc-product-card,
.avc-store[data-avc-preset="minimal"] .avc-tiers-box,
.avc-store[data-avc-preset="minimal"] .avc-pay-card,
.avc-store[data-avc-preset="minimal"] .avc-summary-box,
.avc-store[data-avc-preset="minimal"] .avc-cart-lines,
.avc-store[data-avc-preset="minimal"] .avc-cart-link {
    background: transparent;
    box-shadow: none;
}
.avc-store[data-avc-preset="classic"] .avc-product-card,
.avc-store[data-avc-preset="classic"] .avc-tiers-box,
.avc-store[data-avc-preset="classic"] .avc-pay-card,
.avc-store[data-avc-preset="classic"] .avc-summary-box,
.avc-store[data-avc-preset="classic"] .avc-cart-lines {
    box-shadow: none;
}
.avc-store[data-avc-preset="classic"] .avc-card-body {
    padding: 15px;
}

/* Buttons */
.avc-btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: calc(var(--avc-radius) * 0.72);
    border: 0;
    background: var(--avc-accent);
    color: var(--avc-accent-ink);
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .16s ease, transform .15s ease;
}
.avc-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: var(--avc-accent-ink);
}
.avc-btn-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: calc(var(--avc-radius) * 0.72);
    border: 1px solid var(--avc-border);
    background: var(--avc-surface-2);
    color: var(--avc-fg);
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease;
}
.avc-btn-secondary:hover {
    border-color: var(--avc-accent);
}

/* Product Detail */
.avc-product-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    align-items: start;
}
.avc-detail-media img {
    width: 100%;
    border-radius: var(--avc-radius);
    border: 1px solid var(--avc-border);
    display: block;
}
.avc-lead {
    color: var(--avc-muted);
    font-size: 15.5px;
    margin: 10px 0 0;
    line-height: 1.6;
}
.avc-price-big {
    font-size: 28px;
    font-weight: 800;
    margin: 16px 0;
    color: var(--avc-fg);
}
.avc-price-big del {
    font-size: 16px;
    font-weight: 500;
    color: var(--avc-muted);
    margin-right: 8px;
}
.avc-price-big span {
    font-size: 15px;
    font-weight: 500;
    color: var(--avc-muted);
}
.avc-tiers-box,
.avc-pay-card,
.avc-summary-box,
.avc-cart-lines {
    border: 1px solid var(--avc-border);
    border-radius: var(--avc-radius);
    padding: 20px;
    background: var(--avc-surface);
    box-shadow: var(--avc-shadow);
}
.avc-tiers-box,
.avc-sub-box {
    margin-bottom: 18px;
}
.avc-tiers-box ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--avc-muted);
}
.avc-add-form label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--avc-muted);
}
.avc-qty-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
    flex-wrap: wrap;
}
.avc-qty-input {
    width: 86px;
    padding: 9px 11px;
    border-radius: calc(var(--avc-radius) * 0.65);
    border: 1px solid var(--avc-border);
    background: var(--avc-surface-2);
    color: var(--avc-fg);
    font-family: inherit;
    font-size: 14px;
}
.avc-preview-line {
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--avc-muted);
}
.avc-description {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--avc-border);
    line-height: 1.7;
    color: var(--avc-fg);
}

/* Cart, Checkout, Summary */
.avc-cart-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .avc-cart-wrap {
        grid-template-columns: 1fr;
    }
}
.avc-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--avc-border);
    flex-wrap: wrap;
}
.avc-cart-item:first-child {
    padding-top: 4px;
}
.avc-qty-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.avc-coupon-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.avc-coupon-form input {
    flex: 1;
    padding: 9px 12px;
    border-radius: calc(var(--avc-radius) * 0.65);
    border: 1px solid var(--avc-border);
    background: var(--avc-surface-2);
    color: var(--avc-fg);
    font-family: inherit;
    font-size: 14px;
}
.avc-sum-row,
.avc-sum-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 9px 0;
    font-size: 14.5px;
}
.avc-sum-total {
    font-size: 18px;
    border-top: 1px solid var(--avc-border);
    padding-top: 14px;
    margin-top: 14px;
}
.avc-disc {
    color: #22c55e;
}
.avc-muted {
    color: var(--avc-muted);
    font-size: 13.5px;
}
.avc-empty {
    padding: 42px 24px;
    text-align: center;
    border: 1px dashed var(--avc-border);
    border-radius: var(--avc-radius);
    background: var(--avc-surface);
    color: var(--avc-muted);
}
.avc-pay-title {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--avc-fg);
}
.avc-msg-err {
    color: #ef4444;
    font-size: 13.5px;
    margin-bottom: 10px;
}
.avc-cart-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 600;
}

#avc-paypal-checkout-buttons,
#avc-sub-paypal-btn {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
}

/* Scoped Bootstrap-independent Form, Grid & Utility Fallbacks */
.avc-store .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
}
.avc-store .row > * {
    padding-left: 8px;
    padding-right: 8px;
    width: 100%;
}
.avc-store .g-3 {
    row-gap: 14px;
}
.avc-store .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}
@media (min-width: 768px) {
    .avc-store .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
.avc-store .form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--avc-muted);
}
.avc-store .form-control {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    color: var(--avc-fg);
    background: var(--avc-surface-2);
    border: 1px solid var(--avc-border);
    border-radius: calc(var(--avc-radius) * 0.65);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.avc-store .form-control:focus {
    border-color: var(--avc-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--avc-accent) 22%, transparent);
}
.avc-store .alert {
    padding: 12px 16px;
    border-radius: calc(var(--avc-radius) * 0.75);
    border: 1px solid var(--avc-border);
    margin-bottom: 18px;
    font-size: 14px;
}
.avc-store .alert-success {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}
.avc-store .alert-danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}
.avc-store hr {
    border: 0;
    border-top: 1px solid var(--avc-border);
    margin: 12px 0;
}
.avc-store code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--avc-surface-2);
    border: 1px solid var(--avc-border);
}
.avc-store .w-100 { width: 100%; }
.avc-store .text-center { text-align: center; }
.avc-store .mt-2 { margin-top: 8px; }
.avc-store .mt-3 { margin-top: 14px; }
.avc-store .mb-0 { margin-bottom: 0; }
.avc-store .mb-2 { margin-bottom: 8px; }
.avc-store .mb-3 { margin-bottom: 14px; }
.avc-store .mb-4 { margin-bottom: 20px; }
.avc-store .ms-1 { margin-left: 5px; }
.avc-store .me-1 { margin-right: 5px; }

/* Floating Public Cart Button (auto-injected via TagHelperComponent) */
.avc-floating-cart {
    --avc-surface: #ffffff;
    --avc-fg: #0f172a;
    --avc-border: rgba(15, 23, 42, 0.14);
    --avc-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    --avc-accent: #3d4bd8;
    --avc-accent-ink: #ffffff;
    --avc-radius: 14px;
    --avc-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    position: fixed;
    z-index: 9500;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--avc-border);
    background: var(--avc-surface);
    color: var(--avc-fg);
    box-shadow: var(--avc-shadow);
    font-family: var(--avc-font);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.avc-floating-cart[data-avc-theme="dark"],
.avc-floating-cart[data-avc-resolved-theme="dark"] {
    --avc-surface: #121622;
    --avc-fg: #f8fafc;
    --avc-border: rgba(255, 255, 255, 0.15);
    --avc-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.avc-floating-cart[data-avc-preset="glass"] {
    background: color-mix(in srgb, var(--avc-surface) 68%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.avc-floating-cart[data-avc-preset="minimal"] {
    box-shadow: none;
}
.avc-floating-cart:hover {
    transform: translateY(-2px);
    border-color: var(--avc-accent);
    color: var(--avc-fg);
}
.avc-floating-cart--bottom-right {
    bottom: 52px;
    right: 20px;
}
.avc-floating-cart--bottom-left {
    bottom: 52px;
    left: 20px;
}
.avc-floating-cart--top-right {
    top: 20px;
    right: 20px;
}
.avc-fc-icon {
    flex-shrink: 0;
}
.avc-fc-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--avc-accent);
    color: var(--avc-accent-ink);
    font-size: 12px;
    font-weight: 700;
}
@media (max-width: 520px) {
    .avc-floating-cart {
        padding: 9px 12px;
        gap: 7px;
    }
    .avc-floating-cart--bottom-right { right: 12px; }
    .avc-floating-cart--bottom-left { left: 12px; }
    .avc-floating-cart--top-right { right: 12px; }
    .avc-fc-label {
        display: none;
    }
}
