.page-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.section-card {
    background: rgba(9, 11, 22, 0.72);
    border: 1px solid rgba(198, 170, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.25rem;
}

.hero-title {
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    color: var(--site-text-muted);
    margin-bottom: 1rem;
    max-width: 58ch;
}

.cta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-site {
    border: 1px solid var(--site-border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--site-text);
    padding: 0.65rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Bootstrap resets native <button> to a light surface — restore dark mystical styling */
button.btn-site {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
}

button.btn-site:not(.btn-site-primary),
a.btn-site:not(.btn-site-primary) {
    background: linear-gradient(180deg, rgba(46, 38, 82, 0.95), rgba(24, 20, 48, 0.98));
    color: rgba(236, 232, 255, 0.96);
    border-color: rgba(198, 170, 255, 0.42);
}

button.btn-site:not(.btn-site-primary):hover,
a.btn-site:not(.btn-site-primary):hover {
    background: rgba(123, 60, 242, 0.32);
    color: #fff;
    border-color: rgba(212, 184, 255, 0.55);
}

.btn-site-primary {
    background: linear-gradient(135deg, #7b3cf2, #9b5cff);
    border-color: transparent;
    color: #fff;
}

button.btn-site-primary {
    color: #fff;
}

.btn-site:hover {
    transform: translateY(-1px);
}

.btn-site-primary:hover {
    color: #fff;
}

.btn-site:not(.btn-site-primary):hover {
    color: #fff;
}

/* Win edge-case: Bootstrap + reboot vars still paint buttons white inside cards */
.product-card button.btn-site:not(.btn-site-primary),
.product-card--storefront button.btn-site:not(.btn-site-primary),
.product-card-actions button.btn-site:not(.btn-site-primary),
.product-card-actions-row button.btn-site:not(.btn-site-primary) {
    background: linear-gradient(180deg, rgba(46, 38, 82, 0.98), rgba(22, 18, 44, 1)) !important;
    background-color: rgba(34, 28, 62, 0.98) !important;
    color: rgba(242, 238, 255, 0.98) !important;
    border-color: rgba(198, 170, 255, 0.48) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.product-card button.btn-site:not(.btn-site-primary):hover,
.product-card--storefront button.btn-site:not(.btn-site-primary):hover {
    background: rgba(123, 60, 242, 0.38) !important;
    color: #fff !important;
}

.product-card button.btn-site-primary,
.product-card--storefront button.btn-site-primary,
.product-card-actions button.btn-site-primary {
    background: linear-gradient(135deg, #7b3cf2, #9b5cff) !important;
    background-color: #7b3cf2 !important;
    color: #fff !important;
    border-color: transparent !important;
}

.kpi-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.kpi-box {
    border: 1px solid rgba(198, 170, 255, 0.18);
    border-radius: 18px;
    padding: 0.75rem;
    background: rgba(22, 20, 40, 0.65);
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--site-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.kpi-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.section-title {
    margin: 1.8rem 0 0.9rem;
    font-size: 1.2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 0.85rem;
    align-items: stretch;
}

.product-card {
    border: 1px solid rgba(198, 170, 255, 0.2);
    border-radius: 26px;
    background: rgba(10, 11, 24, 0.76);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.product-card--storefront {
    min-height: 0;
}

.product-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    background: rgba(34, 29, 56, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--site-text-muted);
    flex-shrink: 0;
}

.product-cover-visual {
    --catalog-hue: 270;
}

.product-cover-fallback {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 28% 18%, hsla(var(--catalog-hue), 62%, 58%, 0.38), transparent 52%),
        linear-gradient(152deg, hsl(var(--catalog-hue), 44%, 20%), hsl(calc(var(--catalog-hue) + 36), 36%, 9%));
}

.product-cover-fallback-icon {
    position: relative;
    z-index: 1;
    font-size: 1.75rem;
    opacity: 0.42;
    text-shadow: 0 0 22px hsla(var(--catalog-hue), 80%, 70%, 0.35);
}

.product-cover img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 0.65rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
    min-height: 0;
}

.product-card--storefront .product-body {
    padding-bottom: 0.65rem;
}

.product-name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.45em;
}

.product-teaser {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--site-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-block {
    margin-top: auto;
    padding-top: 0.15rem;
}

.btn-site-compact,
.product-card--storefront .btn-site,
.product-card--storefront button.btn-site {
    padding: 0.42rem 0.72rem;
    font-size: 0.78rem;
    border-radius: 999px;
}

.product-card--storefront .cta-row {
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.product-card--storefront .product-pill-digital {
    font-size: 0.55rem;
    padding: 0.15rem 0.45rem;
}

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

.product-card-actions-row {
    display: flex;
    gap: 0.35rem;
    align-items: stretch;
}

.product-card-actions-row .flex-grow-1 {
    flex: 1 1 0;
    min-width: 0;
}

.product-card-details-link {
    display: block;
    text-align: center;
    font-size: 0.74rem;
    color: var(--site-text-muted);
    text-decoration: none;
    padding: 0.15rem 0;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.product-card-details-link:hover {
    color: var(--site-text);
    background: rgba(184, 134, 255, 0.08);
}

.muted {
    color: var(--site-text-muted);
}

.price {
    font-size: 1.1rem;
    font-weight: 700;
}

.home-sparkle {
    opacity: 0.92;
}

.home-hero-title {
    text-align: center;
}

.product-cover-badges {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    right: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    z-index: 2;
    pointer-events: none;
}

.product-pill {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.product-pill-free {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.35), rgba(58, 123, 213, 0.45));
}

.product-pill-digital {
    background: rgba(123, 60, 242, 0.35);
}

.footer-legal-muted {
    max-width: 880px;
    margin: 0 auto 1.25rem;
    padding: 0 1rem;
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(230, 224, 255, 0.68);
    text-align: center;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(198, 170, 255, 0.16);
    padding: 0.85rem 0;
    gap: 0.8rem;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.badge-soft {
    background: rgba(155, 92, 255, 0.17);
    border: 1px solid rgba(198, 170, 255, 0.26);
    border-radius: 999px;
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    margin-right: 0.4rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 0.45rem 0;
}

.checkout-head {
    margin-bottom: 1rem;
}

/* ---------- Checkout line items (thumb + copy + price) ---------- */

.checkout-items-panel {
    padding-top: 0.35rem;
}

.checkout-line {
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 0.85rem 1rem;
    align-items: center;
    border-bottom: 1px solid rgba(198, 170, 255, 0.16);
    padding: 1rem 0;
}

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

.checkout-line__thumb {
    flex-shrink: 0;
}

.product-cover--checkout-thumb {
    aspect-ratio: 4 / 3;
    width: 100%;
    max-width: 112px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(198, 170, 255, 0.22);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.checkout-line__title {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.02rem;
    line-height: 1.35;
}

.checkout-line__teaser {
    font-size: 0.82rem;
    margin-top: 0.35rem;
    line-height: 1.45;
}

.checkout-line__price {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--site-text);
    white-space: nowrap;
}

.checkout-summary-panel {
    align-self: start;
}

.checkout-pay-btn {
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.checkout-pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(123, 44, 191, 0.35);
}

.cart-item-row--with-thumb {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 0.75rem;
    align-items: flex-start;
}

.cart-item-row--with-thumb .product-cover--checkout-thumb {
    max-width: 88px;
    border-radius: 12px;
}

@media (max-width: 640px) {
    .checkout-line {
        grid-template-columns: 96px 1fr;
        grid-template-rows: auto auto;
    }

    .checkout-line__thumb {
        grid-row: 1 / span 2;
    }

    .checkout-line__price {
        grid-column: 2;
        justify-self: end;
        align-self: start;
    }

    .cart-item-row--with-thumb {
        grid-template-columns: 72px 1fr;
    }

    .cart-item-row--with-thumb .cart-thumb-meta {
        grid-column: 2;
    }

    .cart-item-row--with-thumb .cart-thumb-actions {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
