/**
 * manage_purchase_v1.css
 * Premium Shop Design — SkillsPassport License Store
 * 
 * Built to work inside the WOW/Preselection shell:
 *   sp-app-wrapper > sp-main-wrapper > sp-content-full
 * 
 * Depends on: presel_main.css (for CSS custom properties)
 */

/* =========================================================
   DESIGN TOKENS (supplement presel_main.css vars)
   ========================================================= */
:root {
    --shop-primary: #C8102E;
    --shop-primary-dark: #a10d24;
    --shop-accent: #1a73e8;
    --shop-accent-dark: #1557b0;
    --shop-text-primary: #1a1a2e;
    --shop-text-secondary: #64748b;
    --shop-text-muted: #94a3b8;
    --shop-bg-page: #f5f6fa;
    --shop-bg-card: #ffffff;
    --shop-border: #e2e8f0;
    --shop-border-light: #f1f5f9;
    --shop-success: #10b981;
    --shop-warning: #f59e0b;
    --shop-danger: #ef4444;
    --shop-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shop-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shop-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shop-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shop-radius: 12px;
    --shop-radius-sm: 8px;
    --shop-radius-lg: 16px;
    --shop-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   sp-content-full override for shop scrolling
   ========================================================= */
.purchase-page .sp-content-full {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    min-height: calc(100dvh - 125px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: var(--shop-bg-page);
}

/* =========================================================
   SECONDARY HEADER / TRUST BAR
   ========================================================= */
.shop-secondary-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--shop-border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.shop-navbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.shop-navbar-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.25);
    flex-shrink: 0;
}

.shop-navbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--shop-text-primary);
    letter-spacing: -0.3px;
}

.shop-navbar-subtitle {
    font-size: 13px;
    color: var(--shop-text-secondary);
    margin-top: 1px;
}

.shop-trust-bar {
    display: flex;
    gap: 24px;
    align-items: center;
}

.shop-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--shop-text-secondary);
}

.shop-trust-item i {
    font-size: 14px;
    color: var(--shop-success);
}

.shop-trust-item .trust-count {
    color: var(--shop-accent);
    font-weight: 700;
}

/* =========================================================
   MAIN CONTENT AREA
   ========================================================= */
.shop-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 80px;
    flex: 1;
}

.shop-empty-msg {
    text-align: center;
    padding: 60px 20px;
    color: var(--shop-text-muted);
    font-size: 16px;
}

.shop-empty-msg i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    color: var(--shop-border);
}

/* =========================================================
   PRODUCT GRID
   ========================================================= */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.products-grid .product-card {
    width: 340px;
    max-width: 100%;
    flex-shrink: 0;
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */
.product-card {
    background: var(--shop-bg-card);
    border-radius: var(--shop-radius-lg);
    overflow: hidden;
    box-shadow: var(--shop-shadow-sm);
    border: 1px solid var(--shop-border-light);
    transition: var(--shop-transition);
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shop-shadow-lg);
    border-color: transparent;
}

.product-card:hover .product-card-img img {
    transform: scale(1.05);
}

.product-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    pointer-events: none;
}

/* Price badge */
.product-price-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--shop-text-primary);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-price-badge small {
    font-size: 11px;
    font-weight: 400;
    color: var(--shop-text-secondary);
}

/* Video indicator */
.product-video-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.product-video-badge i {
    font-size: 10px;
}

.product-card-body {
    padding: 20px;
}

.product-card-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--shop-text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.product-card-desc {
    font-size: 13px;
    color: var(--shop-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--shop-accent);
    color: white;
    padding: 9px 18px;
    border-radius: var(--shop-radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--shop-transition);
    font-family: inherit;
}

.product-card-cta:hover {
    background: var(--shop-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.product-card-tiers-hint {
    font-size: 11px;
    color: var(--shop-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =========================================================
   PRODUCT DETAIL MODAL
   ========================================================= */
.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: shopFadeIn 0.2s ease;
}

.detail-overlay.active {
    display: flex;
}

@keyframes shopFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shopSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.detail-modal {
    background: var(--shop-bg-card);
    border-radius: var(--shop-radius-lg);
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shop-shadow-xl);
    animation: shopSlideUp 0.3s ease;
}

.detail-header {
    position: relative;
    padding: 32px 28px 28px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 40%, #475569 100%);
    border-radius: var(--shop-radius-lg) var(--shop-radius-lg) 0 0;
}

.detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--shop-transition);
    z-index: 3;
}

.detail-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.detail-header-info {
    position: relative;
    z-index: 2;
}

.detail-header-info h2 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.detail-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--shop-transition);
    font-family: inherit;
}

.detail-video-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.detail-body {
    padding: 24px;
}

.detail-description {
    font-size: 14px;
    color: var(--shop-text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Pricing Tiers */
.pricing-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--shop-text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-tiers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.pricing-tier {
    background: var(--shop-bg-page);
    border: 2px solid var(--shop-border-light);
    border-radius: var(--shop-radius);
    padding: 14px 12px;
    text-align: center;
    transition: var(--shop-transition);
    cursor: pointer;
    position: relative;
}

.pricing-tier:hover {
    border-color: var(--shop-accent);
    background: #f0f7ff;
}

.pricing-tier.active {
    border-color: var(--shop-accent);
    background: #eef4ff;
    box-shadow: 0 0 0 1px var(--shop-accent);
}

.pricing-tier.best-value::before {
    content: 'Best Value';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--shop-success);
    color: white;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.pricing-tier-range {
    font-size: 11px;
    font-weight: 600;
    color: var(--shop-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.pricing-tier-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--shop-text-primary);
}

.pricing-tier-unit {
    font-size: 10px;
    color: var(--shop-text-muted);
}

/* Add to Cart section in detail modal */
.add-to-cart-section {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--shop-border-light);
}

.qty-group {
    flex-shrink: 0;
}

.qty-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-text-secondary);
    margin-bottom: 6px;
}

.qty-stepper {
    display: flex;
    align-items: center;
    border: 2px solid var(--shop-border);
    border-radius: var(--shop-radius-sm);
    overflow: hidden;
    background: white;
}

.qty-stepper button {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--shop-bg-page);
    color: var(--shop-text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--shop-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.qty-stepper button:hover {
    background: var(--shop-border);
}

.qty-stepper input {
    width: 52px;
    height: 38px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--shop-text-primary);
    font-family: inherit;
    -moz-appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.add-cart-btn {
    flex: 1;
    height: 42px;
    background: var(--shop-accent);
    color: white;
    border: none;
    border-radius: var(--shop-radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--shop-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.add-cart-btn:hover {
    background: var(--shop-accent-dark);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

.add-cart-btn.added {
    background: var(--shop-success);
}

/* =========================================================
   STICKY CART FAB
   ========================================================= */
.cart-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-dark));
    color: white;
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.35);
    display: none;
    /* shown by JS when cart has items */
    align-items: center;
    justify-content: center;
    z-index: 4000;
    transition: var(--shop-transition);
}

.cart-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(200, 16, 46, 0.45);
}

.cart-fab .cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--shop-accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: badgePulse 0.4s ease;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes cartBounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.cart-fab.bounce {
    animation: cartBounce 0.5s ease;
}

/* =========================================================
   CART DRAWER (Slide-in from right)
   ========================================================= */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 6000;
    display: none;
    animation: shopFadeIn 0.2s ease;
}

.cart-drawer-overlay.active {
    display: block;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 460px;
    max-width: 100vw;
    height: 100vh;
    background: var(--shop-bg-card);
    z-index: 6001;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--shop-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.cart-drawer-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-drawer-title i {
    color: var(--shop-primary);
}

.cart-drawer-count {
    background: var(--shop-bg-page);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-text-secondary);
}

.cart-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--shop-bg-page);
    color: var(--shop-text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--shop-transition);
}

.cart-drawer-close:hover {
    background: var(--shop-border);
    color: var(--shop-text-primary);
}

/* Cart Items */
.cart-drawer-items {
    overflow-y: auto;
    padding: 16px 22px;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--shop-border-light);
    animation: shopFadeIn 0.3s ease;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--shop-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f2f5;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--shop-text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price-unit {
    font-size: 12px;
    color: var(--shop-text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.cart-item-qty span {
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-text-secondary);
}

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-subtotal {
    font-size: 15px;
    font-weight: 700;
    color: var(--shop-text-primary);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--shop-text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    transition: var(--shop-transition);
    font-family: inherit;
}

.cart-item-remove:hover {
    color: var(--shop-danger);
}

/* Admin override in cart */
.cart-item-override {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--shop-border-light);
}

.cart-item-override label {
    display: block;
    font-size: 11px;
    color: var(--shop-text-muted);
    margin-bottom: 4px;
}

.cart-item-override label i {
    color: var(--shop-warning);
}

.override-price-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.override-price-wrapper span {
    color: var(--shop-text-muted);
    font-size: 13px;
}

.override-price-input {
    width: 100px;
    padding: 5px 8px;
    border: 1.5px solid var(--shop-border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: var(--shop-transition);
}

.override-price-input:focus {
    outline: none;
    border-color: var(--shop-accent);
}

.override-price-hint {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    color: var(--shop-text-muted);
}

.override-warning-banner {
    display: none;
    margin-bottom: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--shop-radius-sm);
    padding: 12px;
    font-size: 13px;
    color: #856404;
}

.override-warning-banner i {
    margin-right: 6px;
}

/* Empty Cart */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--shop-text-muted);
    gap: 12px;
    padding: 40px 0;
}

.cart-empty i {
    font-size: 48px;
    color: var(--shop-border);
}

.cart-empty p {
    font-size: 15px;
    font-weight: 500;
}

/* Cart Summary */
.cart-drawer-summary {
    padding: 18px 22px;
    border-top: 1px solid var(--shop-border-light);
    background: var(--shop-bg-page);
    flex-shrink: 0;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--shop-text-secondary);
    padding: 4px 0;
}

.cart-summary-row.discount {
    color: var(--shop-success);
}

.cart-summary-row.discount.overridden {
    opacity: 0.4;
    text-decoration: line-through;
}

.cart-summary-row.total {
    font-size: 17px;
    font-weight: 700;
    color: var(--shop-text-primary);
    border-top: 2px solid var(--shop-border);
    margin-top: 8px;
    padding-top: 12px;
}

/* Promo Code (logged-in users with promo) */
.promo-section {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.promo-input {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid var(--shop-border);
    border-radius: var(--shop-radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: white;
    transition: var(--shop-transition);
}

.promo-input:focus {
    outline: none;
    border-color: var(--shop-accent);
}

.promo-input::placeholder {
    color: var(--shop-text-muted);
}

.promo-input.error-bg {
    background-color: #fff2f2 !important;
    border-color: var(--shop-danger) !important;
}

.promo-apply-btn {
    padding: 9px 16px;
    background: var(--shop-bg-card);
    border: 1.5px solid var(--shop-border);
    border-radius: var(--shop-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--shop-text-secondary);
    transition: var(--shop-transition);
    font-family: inherit;
}

.promo-apply-btn:hover {
    border-color: var(--shop-accent);
    color: var(--shop-accent);
}

.promo-error {
    color: var(--shop-danger);
    font-size: 12px;
    margin-top: 4px;
}

/* =========================================================
   CHECKOUT FORM SECTIONS (inside cart drawer)
   ========================================================= */
.cart-form-section {
    padding: 0 22px 16px 22px;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 40vh;
}

.cart-section-heading {
    font-size: 13px;
    font-weight: 700;
    color: var(--shop-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--shop-border-light);
}

.cart-field-group {
    margin-bottom: 10px;
}

.cart-field-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-text-secondary);
    margin-bottom: 4px;
}

.cart-field-group label .required {
    color: var(--shop-danger);
}

.cart-field-group input,
.cart-field-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--shop-border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: var(--shop-transition);
    background: white;
}

.cart-field-group input:focus,
.cart-field-group select:focus {
    outline: none;
    border-color: var(--shop-accent);
}

.cart-field-group .field-hint {
    font-size: 11px;
    color: var(--shop-text-muted);
    margin-top: 3px;
}

.cart-field-group .field-error {
    font-size: 11px;
    color: var(--shop-danger);
    margin-top: 3px;
}

.cart-field-group .email-help-icon {
    color: var(--shop-text-muted);
    margin-left: 4px;
    font-size: 12px;
    cursor: help;
}

.cart-field-group input.error-bg,
.cart-field-group select.error-bg {
    background-color: #fff2f2 !important;
    border-color: var(--shop-danger) !important;
}

.cart-fields-bg-personal {
    background: #f8f9fa;
    border-radius: var(--shop-radius-sm);
    padding: 12px;
    margin-bottom: 8px;
}

.cart-fields-bg-learner {
    background: #f0f7ff;
    border-radius: var(--shop-radius-sm);
    padding: 12px;
    margin-bottom: 8px;
}

/* Select2 overrides inside the drawer */
.cart-drawer .select2-container {
    width: 100% !important;
}

.cart-drawer .select2-container--default .select2-selection--single {
    height: 36px !important;
    padding: 4px 8px !important;
    border: 1.5px solid var(--shop-border) !important;
    border-radius: 6px !important;
    background: white !important;
}

.cart-drawer .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--shop-text-primary) !important;
    line-height: 26px !important;
    font-size: 13px !important;
}

.cart-drawer .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
}

.select2-dropdown {
    z-index: 100001 !important;
    border: 1px solid var(--shop-border) !important;
    border-radius: 6px !important;
    box-shadow: var(--shop-shadow-md) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--shop-accent) !important;
}

.select2-search--dropdown .select2-search__field {
    padding: 8px !important;
    border: 1px solid var(--shop-border) !important;
    border-radius: 4px !important;
}

/* Cart Actions */
.cart-drawer-actions {
    padding: 16px 22px;
    border-top: 1px solid var(--shop-border-light);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.checkout-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-dark));
    color: white;
    border: none;
    border-radius: var(--shop-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--shop-transition);
    letter-spacing: 0.3px;
    font-family: inherit;
}

.checkout-btn:hover {
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.35);
    transform: translateY(-1px);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.clear-cart-btn {
    width: 100%;
    height: 40px;
    background: transparent;
    color: var(--shop-text-muted);
    border: none;
    border-radius: var(--shop-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--shop-transition);
    font-family: inherit;
}

.clear-cart-btn:hover {
    color: var(--shop-danger);
    background: #fef2f2;
}

/* =========================================================
   VIDEO MODAL
   ========================================================= */
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 8000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-overlay.active {
    display: flex;
}

.video-container {
    position: relative;
    width: 95%;
    max-width: 1200px;
    aspect-ratio: 16/9;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.video-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: var(--shop-transition);
}

.video-close-btn:hover {
    transform: scale(1.2);
}

/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .shop-main {
        padding: 16px 10px 80px;
    }

    .shop-secondary-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .shop-trust-bar {
        gap: 12px;
        flex-wrap: wrap;
    }

    .pricing-tiers {
        grid-template-columns: repeat(2, 1fr);
    }

    .cart-drawer {
        width: 100vw;
    }

    .detail-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .detail-modal {
        max-height: 95vh;
        border-radius: var(--shop-radius-lg) var(--shop-radius-lg) 0 0;
    }

    .detail-header {
        height: 180px;
    }

    .product-card-img {
        height: 180px;
    }

    .cart-form-section {
        max-height: 35vh;
    }
}

@media (max-width: 400px) {
    .pricing-tiers {
        gap: 6px;
    }

    .pricing-tier {
        padding: 10px 8px;
    }

    .pricing-tier-price {
        font-size: 16px;
    }

    .detail-header-info h2 {
        font-size: 18px;
    }
}

/* =========================================================
   WOWVideoPlayer — Landscape override
   The player's default `width: fit-content` can collapse
   before the YouTube iframe initializes. Force proper 16:9.
   ========================================================= */
.wow-video-modal-container.video-landscape {
    width: 80vw;
    max-width: 960px;
}

.wow-video-modal-container.video-landscape .wow-video-modal-content {
    aspect-ratio: 16/9;
    min-height: auto;
}

@media (max-width: 640px) {
    .wow-video-modal-container.video-landscape {
        width: 95vw;
    }
}