:root {
    --app-bg-0: #070a12;
    --app-bg-1: #0b1020;
    --app-surface: rgba(255, 255, 255, 0.06);
    --app-surface-2: rgba(255, 255, 255, 0.09);
    --app-border: rgba(255, 255, 255, 0.12);
    --app-glow: rgba(120, 170, 255, 0.18);
}

html,
body {
    height: 100%;
}

.app-body {
    color: rgba(255, 255, 255, 0.92);
    background:
        radial-gradient(900px 500px at 20% 0%, rgba(120, 170, 255, 0.14), transparent 60%),
        radial-gradient(900px 600px at 90% 10%, rgba(190, 120, 255, 0.10), transparent 55%),
        linear-gradient(180deg, var(--app-bg-1), var(--app-bg-0));
    background-attachment: fixed;
}

.app-navbar {
    background: rgba(7, 10, 18, 0.72);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    letter-spacing: 0.04em;
}

.brand-mark,
.footer-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.92);
}

.footer-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.surface-card {
    background: linear-gradient(180deg, var(--app-surface), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.hero-panel {
    border-radius: 1.25rem;
    border: 1px solid var(--app-border);
    background:
        radial-gradient(700px 420px at 15% 20%, rgba(120, 170, 255, 0.16), transparent 60%),
        radial-gradient(700px 420px at 85% 30%, rgba(190, 120, 255, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
}

.glass-card {
    border-radius: 1rem;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.promo-card {
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background:
        radial-gradient(500px 240px at 20% 0%, rgba(120, 170, 255, 0.22), transparent 60%),
        radial-gradient(520px 260px at 90% 20%, rgba(190, 120, 255, 0.16), transparent 55%);
    pointer-events: none;
    opacity: 0.9;
}

.promo-card > * {
    position: relative;
}

.promo-pill {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(13, 110, 253, 0.18);
}

.category-tile {
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.category-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.category-icon,
.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(219, 231, 255, 0.95);
}

.trust-card {
    position: relative;
    overflow: hidden;
}

.trust-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    background: radial-gradient(700px 260px at 20% 0%, rgba(120, 170, 255, 0.10), transparent 60%);
    pointer-events: none;
    opacity: 0.75;
}

.trust-card > * {
    position: relative;
}

.app-footer {
    background: rgba(7, 10, 18, 0.72);
    backdrop-filter: blur(10px);
}

.surface-alert {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--app-border);
}

.btn-brand {
    --bs-btn-color: #0b1020;
    --bs-btn-bg: #dbe7ff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.22);
    --bs-btn-hover-bg: #c9d9ff;
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.28);
    --bs-btn-focus-shadow-rgb: 180, 200, 255;
    --bs-btn-active-bg: #b9cdff;
    --bs-btn-active-border-color: rgba(255, 255, 255, 0.30);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
}

.btn-brand:hover {
    box-shadow: 0 10px 30px rgba(120, 170, 255, 0.18);
}

.product-card {
    overflow: hidden;
}

.product-card-photo-link {
    display: block;
    position: relative;
    width: 100%;
    /* Высота блока от ширины колонки — без фикс. px; картинка целиком, без обрезки cover */
    aspect-ratio: 4 / 3;
    background:
        radial-gradient(120% 80% at 50% 20%, rgba(120, 170, 255, 0.1), transparent 55%),
        rgba(0, 0, 0, 0.24);
    border-radius: 1rem 1rem 0 0;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.product-card-photo-link img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: clamp(0.45rem, 2.5vw, 1rem);
    box-sizing: border-box;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.product-card-photo-link:hover img {
    opacity: 0.94;
    transform: scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
    .product-card-photo-link img {
        transition: opacity 0.2s ease;
    }

    .product-card-photo-link:hover img {
        transform: none;
    }
}

.product-card-photo-link:focus-visible {
    outline: 2px solid rgba(219, 231, 255, 0.6);
    outline-offset: 2px;
}

.product-variant-row {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
}

.product-variant-list .variant-qty-input {
    max-width: 5.5rem;
    text-align: center;
}

.product-variant-card-img {
    aspect-ratio: 4 / 3;
    background: rgba(0, 0, 0, 0.2);
}

.product-variant-card-img img {
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-line-thumb {
    width: 88px;
    height: 88px;
    border: 1px solid var(--app-border);
}

.cart-line-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-hero img {
    object-fit: cover;
    width: 100%;
    max-height: 420px;
    border-radius: 1rem;
}

.product-detail-media {
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
}

.product-detail-media img {
    aspect-ratio: 4 / 3;
    display: block;
    width: 100%;
    object-fit: contain;
    object-position: center;
    padding: clamp(0.4rem, 1.5vw, 0.75rem);
    box-sizing: border-box;
    transition: opacity 0.2s ease;
    max-height: 420px;
    border-radius: 1rem;
}

.product-flavor-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.02em;
}

.product-flavor-select-wrap {
    position: relative;
}

.product-flavor-select-wrap::after {
    content: "";
    pointer-events: none;
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(219, 231, 255, 0.55);
}

.product-flavor-select {
    appearance: none;
    padding: 0.65rem 2.4rem 0.65rem 1rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-flavor-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.product-flavor-select:focus {
    border-color: rgba(120, 170, 255, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(120, 170, 255, 0.2);
    outline: none;
}

.product-flavor-select option {
    background: #0b1020;
    color: #fff;
}

.product-flavor-detail {
    line-height: 1.45;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    background: rgba(120, 170, 255, 0.08);
    border: 1px solid rgba(120, 170, 255, 0.18);
    color: rgba(255, 255, 255, 0.88);
}

.product-flavor-detail:empty {
    display: none;
}

.product-category-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--app-border);
    border-radius: 999px;
}

.product-flavor-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.product-flavor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.4rem;
    align-items: center;
}

.product-flavor-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.95rem;
    min-height: 2.5rem;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(30, 32, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.65rem;
    cursor: pointer;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.product-flavor-pill:hover {
    color: #fff;
    background: rgba(50, 55, 75, 0.98);
    border-color: rgba(255, 255, 255, 0.16);
}

.product-flavor-pill:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(120, 170, 255, 0.5);
}

.product-flavor-pill.is-selected {
    color: #fff;
    background: linear-gradient(135deg, rgba(140, 90, 220, 0.95), rgba(100, 70, 200, 0.98));
    border-color: rgba(190, 150, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(200, 160, 255, 0.25), 0 6px 24px rgba(120, 80, 200, 0.35);
}

.product-flavor-pill.is-selected:hover {
    filter: brightness(1.04);
}

@media (prefers-reduced-motion: reduce) {
    .product-flavor-pill {
        transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    }
}

.summary-card {
    position: sticky;
    top: 1rem;
}

.status-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--app-border);
}

.status-pending {
    background: rgba(255, 214, 102, 0.14);
    color: rgba(255, 236, 180, 0.95);
}

.status-paid {
    background: rgba(72, 201, 138, 0.16);
    color: rgba(200, 255, 220, 0.95);
}

.status-failed {
    background: rgba(255, 120, 140, 0.14);
    color: rgba(255, 210, 216, 0.95);
}

.list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.10) !important;
}

/* --- Checkout (в тон :root / surface-card: сине-фиолетовый тёмный UI) --- */
.checkout-page {
    padding-bottom: 4rem;
}

.checkout-page-lead {
    max-width: 42rem;
}

.checkout-step-card {
    background: linear-gradient(180deg, var(--app-surface), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    padding: 1.35rem 1.35rem 1.5rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.checkout-step-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.15rem;
}

.checkout-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.checkout-step-badge--1 {
    background: linear-gradient(135deg, rgba(120, 170, 255, 0.95), rgba(74, 118, 220, 0.98));
    box-shadow: 0 0 14px rgba(120, 170, 255, 0.4);
}

.checkout-step-badge--2 {
    background: linear-gradient(135deg, rgba(190, 120, 255, 0.92), rgba(140, 90, 220, 0.95));
    box-shadow: 0 0 14px rgba(190, 120, 255, 0.32);
}

.checkout-step-badge--3 {
    background: linear-gradient(135deg, rgba(100, 210, 200, 0.9), rgba(60, 160, 155, 0.95));
    box-shadow: 0 0 14px rgba(100, 210, 200, 0.28);
}

.checkout-label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.875rem;
}

.checkout-input {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 0.65rem !important;
    color: #fff !important;
}

.checkout-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.checkout-input:focus {
    border-color: rgba(120, 170, 255, 0.55) !important;
    box-shadow: 0 0 0 0.2rem rgba(120, 170, 255, 0.18) !important;
}

.checkout-options-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.checkout-option-card {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.checkout-option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-option-body {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.checkout-option-input:checked + .checkout-option-body {
    border-color: rgba(120, 170, 255, 0.55);
    background: rgba(120, 170, 255, 0.12);
    box-shadow: 0 0 24px rgba(120, 170, 255, 0.18);
}

.checkout-option-card:hover .checkout-option-body {
    border-color: rgba(255, 255, 255, 0.22);
}

.checkout-option-icon {
    display: flex;
    color: rgba(219, 200, 255, 0.9);
    flex-shrink: 0;
}

.checkout-option-title {
    flex: 1;
    font-weight: 600;
    color: #fff;
}

.checkout-option-price {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
}

.checkout-option-card--pay .checkout-option-body {
    min-height: 3.25rem;
}

.checkout-pay-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.45rem;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}

.checkout-pay-mark--cash {
    background: rgba(255, 255, 255, 0.12);
    color: #c8f5c4;
    font-size: 0.62rem;
    letter-spacing: -0.03em;
}

.checkout-pay-mark--usdt {
    background: rgba(38, 161, 123, 0.35);
    color: #9ff5d4;
    font-size: 0.75rem;
}

.checkout-pay-mark--blik {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.checkout-map-btn {
    background: linear-gradient(180deg, rgba(120, 170, 255, 0.2), rgba(90, 130, 220, 0.12)) !important;
    border: 1px solid rgba(120, 170, 255, 0.35) !important;
    color: rgba(219, 231, 255, 0.98) !important;
    border-radius: 0.65rem !important;
    font-weight: 600;
}

.checkout-map-btn:hover {
    color: #fff !important;
    border-color: rgba(190, 120, 255, 0.45) !important;
    background: linear-gradient(180deg, rgba(120, 170, 255, 0.28), rgba(140, 100, 220, 0.16)) !important;
}

.checkout-map-btn-icon {
    flex-shrink: 0;
    vertical-align: middle;
}

.checkout-summary {
    position: sticky;
    top: 1rem;
    padding: 1.35rem 1.35rem 1.5rem;
    background: linear-gradient(180deg, var(--app-surface-2), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.checkout-summary-edit {
    color: rgba(180, 205, 255, 0.95);
    text-decoration: none;
}

.checkout-summary-edit:hover {
    color: rgba(255, 255, 255, 0.98);
    text-decoration: underline;
}

.checkout-promo-group .checkout-promo-input {
    border-radius: 0.65rem 0 0 0.65rem !important;
}

.checkout-promo-btn {
    border-radius: 0 0.65rem 0.65rem 0 !important;
    background: linear-gradient(135deg, rgba(120, 170, 255, 0.35), rgba(140, 100, 220, 0.32)) !important;
    border: 1px solid rgba(120, 170, 255, 0.35) !important;
    color: #fff !important;
    padding-inline: 0.85rem;
}

.checkout-totals .checkout-total-row {
    padding: 0.35rem 0;
    font-size: 0.95rem;
}

.checkout-grand-label {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.checkout-grand-total {
    font-size: 1.65rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
}

.checkout-submit-btn {
    background: linear-gradient(180deg, #e8eeff, #dbe7ff) !important;
    color: #0b1020 !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 0.75rem !important;
    font-weight: 800 !important;
    padding: 0.85rem 1rem !important;
    font-size: 1rem;
}

.checkout-submit-btn:hover {
    background: linear-gradient(180deg, #f2f5ff, #c9d9ff) !important;
    color: #070a12 !important;
    box-shadow: 0 10px 30px rgba(120, 170, 255, 0.2);
}

.checkout-scroll-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1040;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid rgba(120, 170, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(120, 170, 255, 0.95), rgba(150, 110, 230, 0.92));
    color: #fff;
    box-shadow: 0 8px 28px rgba(120, 170, 255, 0.35);
    cursor: pointer;
}

.checkout-scroll-top:hover {
    filter: brightness(1.08);
}

@media (max-width: 991.98px) {
    .checkout-summary {
        position: static;
    }
}
