/* ==========================================================================
   Vrilsoft Store — Checkout / Listing premium theme
   Inherits token variables from public-page-premium.css:
     --pp-primary, --pp-surface-soft, --pp-border, --pp-shadow, --pp-glow
   ========================================================================== */

/* ── Shared checkout width constraint ───────────────────────────────────────
   All checkout pages (cart → billing → payment → confirm) use this wrapper
   so they share an identical width on every screen size.
   Listing / product-detail pages use the full container-xl instead.        */
.store-checkout-wrap {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .store-checkout-wrap {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ── Page hero banner ────────────────────────────────────────────────────── */
.store-page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0.85rem;
    padding: 2rem 2rem 1.6rem;
    margin-bottom: 2rem;
    border: 1px solid var(--pp-border);
    background: var(--pp-surface-soft);
}

/* Gradient top-border accent */
.store-page-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed, #c084fc 50%, transparent 100%);
    border-radius: 0.85rem 0.85rem 0 0;
}

.store-page-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.store-page-hero .store-hero-sub {
    color: var(--tblr-secondary);
    margin-bottom: 0;
}

/* ── Checkout step bar ───────────────────────────────────────────────────── */
.store-steps {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
}

.store-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tblr-secondary);
    border-bottom: 3px solid var(--pp-border);
    transition: color 0.2s, border-color 0.2s;
}

.store-step.is-active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.store-step.is-done {
    color: var(--tblr-success);
    border-bottom-color: var(--tblr-success);
}

.store-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.72rem;
    border: 2px solid currentColor;
    flex-shrink: 0;
}

.store-step.is-done .store-step-num {
    background: var(--tblr-success);
    border-color: var(--tblr-success);
    color: #fff;
}

.store-step.is-active .store-step-num {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: #fff;
}

/* Mobile: shrink to icon-only, keep the track visible */
.store-step-label {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .store-step {
        padding: 0.55rem 0.4rem;
        justify-content: center;
        font-size: 0;          /* hide label text */
        gap: 0;
    }
    .store-step-num {
        font-size: 0.65rem;
    }
    .store-step-label {
        display: none;
    }
}

/* ── Premium panel card ──────────────────────────────────────────────────── */
.store-panel {
    border-radius: 1rem;
    border: 1px solid var(--pp-border);
    background: var(--pp-surface-soft);
    overflow: hidden;
    box-shadow: var(--pp-shadow);
}

.store-panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--pp-border);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--tblr-body-color);
}

.store-panel-body {
    padding: 1.5rem;
}

/* ── Listing cards (Products / Services index) ───────────────────────────── */
.store-listing-card {
    border-radius: 1rem;
    border: 1px solid var(--pp-border);
    background: var(--pp-surface-soft);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.store-listing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.18), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.store-listing-card .store-card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.store-listing-card .store-card-img-placeholder {
    height: 200px;
    background: linear-gradient(135deg,
        color-mix(in srgb, #8b5cf6 8%, var(--pp-surface-soft)) 0%,
        var(--pp-surface-soft) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(139, 92, 246, 0.3);
    font-size: 3rem;
}

.store-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.store-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--tblr-body-color);
}

.store-card-summary {
    font-size: 0.82rem;
    color: var(--tblr-secondary);
    flex: 1;
    margin-bottom: 0.9rem;
}

.store-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    border-top: 1px solid var(--pp-border);
    padding-top: 0.85rem;
}

.store-card-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #8b5cf6;
}

/* ── Cart table ──────────────────────────────────────────────────────────── */
.store-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.store-cart-table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tblr-secondary);
    border-bottom: 1px solid var(--pp-border);
}

.store-cart-table tbody tr {
    border-bottom: 1px solid var(--pp-border);
    transition: background 0.15s;
}

.store-cart-table tbody tr:last-child {
    border-bottom: none;
}

.store-cart-table tbody tr:hover {
    background: color-mix(in srgb, var(--pp-surface-soft) 60%, transparent);
}

.store-cart-table td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

.store-cart-name {
    font-weight: 600;
}

.store-cart-total-row {
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--pp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.store-cart-total-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tblr-secondary);
}

.store-cart-total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #8b5cf6;
}

/* Mobile: qty column stacks nicely */
@media (max-width: 576px) {
    .store-cart-table thead th:nth-child(2),
    .store-cart-table td:nth-child(2) {
        display: none; /* hide unit price; line total still shows */
    }

    .store-cart-total-amount {
        font-size: 1.2rem;
    }
}

/* ── Billing / checkout forms ───────────────────────────────────────────────
   site bundle sets .row.g-3 > .col-* { display:flex; flex-direction:row }
   which puts labels beside inputs. Same fix as page-builder-premium.css for
   .vril-premium-page — stack label → control vertically.                    */
.store-checkout-form .row.g-3 > [class^="col-"],
.store-checkout-form .row.g-3 > .col {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

.store-checkout-form .row.g-3 > [class^="col-"] > label.form-label,
.store-checkout-form .row.g-3 > .col > label.form-label {
    width: 100%;
    margin-bottom: 0.35rem;
}

.store-checkout-form .row.g-3 > [class^="col-"] > .form-control,
.store-checkout-form .row.g-3 > [class^="col-"] > .form-select,
.store-checkout-form .row.g-3 > [class^="col-"] > textarea.form-control,
.store-checkout-form .row.g-3 > [class^="col-"] > span.field-validation-error {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

/* Section divider inside form */
.store-form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tblr-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    padding-top: 0.5rem;
}

/* ── Payment page ────────────────────────────────────────────────────────── */
.store-order-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--pp-border);
    font-size: 0.9rem;
}

.store-order-summary-item:last-of-type {
    border-bottom: none;
}

.store-order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.85rem;
    border-top: 2px solid var(--pp-border);
    font-weight: 800;
    font-size: 1.1rem;
}

.store-order-total-amount {
    color: #8b5cf6;
    font-size: 1.3rem;
}

/* Pay button — overrides the inline style from Payment.cshtml */
.btn-stripe-pay {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    border: none !important;
    color: #fff !important;
    padding: 0.9rem 1.5rem !important;
    width: 100% !important;
    transition: opacity 0.2s !important;
}

.btn-stripe-pay:hover:not(:disabled) {
    opacity: 0.9;
}

/* ── Confirm / Thank-you ─────────────────────────────────────────────────── */
.store-confirm-card {
    max-width: 560px;
    margin: 4rem auto;
    border-radius: 1.25rem;
    border: 1px solid var(--pp-border);
    background: var(--pp-surface-soft);
    box-shadow: var(--pp-shadow);
    padding: 3rem 2.5rem;
    text-align: center;
}

.store-confirm-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: color-mix(in srgb, #8b5cf6 12%, transparent);
    border: 2px solid rgba(139, 92, 246, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #8b5cf6;
    margin: 0 auto 1.5rem;
}

.store-confirm-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.store-confirm-sub {
    color: var(--tblr-secondary);
    margin-bottom: 2rem;
}

/* ── Action buttons ──────────────────────────────────────────────────────── */
.btn-store-primary {
    background: linear-gradient(135deg, var(--vrl-btn-fill-1, #6d28d9), var(--vrl-btn-fill-2, #0e7490));
    border: none;
    color: var(--vrl-btn-on-fill, #fff) !important;
    font-weight: 700;
    border-radius: 0.6rem;
    padding: 0.6rem 1.4rem;
    transition: opacity 0.2s, transform 0.15s, background 0.2s, color 0.2s;
}

.btn-store-primary:hover,
.btn-store-primary:focus-visible {
    background: linear-gradient(135deg, var(--vrl-btn-fill-hover-1, #5b21b6), var(--vrl-btn-fill-hover-2, #155e75));
    opacity: 1;
    transform: translateY(-1px);
    color: var(--vrl-btn-on-fill, #fff) !important;
}

.btn-store-secondary {
    background: transparent;
    border: 1px solid var(--pp-border, var(--vrl-border));
    color: var(--tblr-body-color, var(--vrl-text)) !important;
    font-weight: 600;
    border-radius: 0.6rem;
    padding: 0.6rem 1.4rem;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-store-secondary:hover,
.btn-store-secondary:focus-visible {
    border-color: var(--vrl-btn-fill-1, #6d28d9);
    color: var(--vrl-primary) !important;
    background: color-mix(in srgb, var(--vrl-primary) 10%, transparent);
}
