/* Skool Escape Store Styles */
/* Extends main.css — do not duplicate variables */

/* ─── Store Hero ──────────────────────────────── */
.store-hero {
    margin-top: 80px;
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    background: linear-gradient(135deg, #EEF2FF 0%, #FDF4FF 50%, #FFF7ED 100%);
    text-align: center;
}

.store-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.store-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ─── Filter Pills ─────────────────────────────── */
.store-filters {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-xl);
}

.filter-pill {
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.28);
}

/* ─── Products Grid ────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-3xl);
}

/* ─── Product Card ─────────────────────────────── */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-body);
}

.product-color-preview {
    display: flex;
    gap: 6px;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
    display: inline-block;
}

.product-btn {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(99,102,241,0.25);
}

.product-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 16px rgba(99,102,241,0.35);
    color: white;
}

/* ─── Cart Badge in Navbar ─────────────────────── */
.cart-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--secondary);
    color: white;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

/* ─── Cart Toast ───────────────────────────────── */
.cart-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: white;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--success);
    border-radius: var(--border-radius);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-weight: 600;
    color: var(--text-primary);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 320px;
}

.cart-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ─── Product Detail Page ──────────────────────── */
.product-detail {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    padding: var(--spacing-2xl) 0;
    align-items: start;
}

.product-detail-image {
    background: var(--gradient-hero);
    border-radius: var(--border-radius-lg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.product-detail-name {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin: 0;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-body);
}

.product-detail-description {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1.05rem;
    margin: 0;
}

/* ─── Color Swatches ───────────────────────────── */
.color-swatches-label {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.color-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-swatch-input {
    display: none;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch-input:checked + .color-swatch {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
    transform: scale(1.15);
}

.color-swatch-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    text-align: center;
    display: none;
}

.color-selected-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: var(--spacing-sm);
}

/* ─── Quantity Selector ────────────────────────── */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: rgba(99,102,241,0.12);
    color: var(--primary);
}

.qty-input {
    width: 52px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 0;
    font-family: var(--font-body);
    background: white;
}

.qty-input:focus {
    outline: none;
}

/* ─── Checkout Steps ───────────────────────────── */
.checkout-page {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.checkout-layout {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.checkout-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: var(--spacing-2xl);
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.checkout-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.checkout-step.completed:not(:last-child)::after {
    background: var(--primary);
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.checkout-step.active .step-circle {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 3px 12px rgba(99,102,241,0.35);
}

.checkout-step.completed .step-circle {
    background: var(--success);
    border-color: transparent;
    color: white;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

.checkout-step.active .step-label {
    color: var(--primary);
}

.checkout-step.completed .step-label {
    color: var(--success);
}

/* ─── Checkout Panels ──────────────────────────── */
.checkout-panel {
    display: none;
}

.checkout-panel.active {
    display: block;
}

/* ─── Order Summary in Checkout ────────────────── */
.order-summary {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.order-summary-header {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.order-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

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

.order-item-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.order-item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.order-item-price {
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    white-space: nowrap;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* ─── Stripe Card Element ──────────────────────── */
.stripe-card-wrapper {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    background: white;
    transition: border-color 0.2s ease;
}

.stripe-card-wrapper.focused {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* ─── Confirmation Panel ───────────────────────── */
.confirm-icon {
    font-size: 5rem;
    display: block;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.order-number-display {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    background: rgba(99,102,241,0.08);
    border: 2px solid rgba(99,102,241,0.2);
    border-radius: var(--border-radius-sm);
    padding: 12px 24px;
    display: inline-block;
    font-family: var(--font-body);
    letter-spacing: 2px;
}

/* ─── Image Thumbnails (Product Detail) ────────── */
.image-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.thumb-btn {
    width: 68px;
    height: 68px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.thumb-btn:hover {
    border-color: var(--primary);
}

.thumb-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.25);
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Material Selector ────────────────────────── */
.material-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.material-option {
    cursor: pointer;
}

.material-option input[type="radio"] {
    display: none;
}

.material-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    user-select: none;
}

.material-option:hover .material-card {
    border-color: var(--primary);
    color: var(--primary);
}

.material-option input:checked + .material-card {
    border-color: var(--primary);
    background: rgba(99,102,241,0.07);
    color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

.material-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.material-price {
    margin-left: auto;
    font-weight: 800;
    color: var(--primary);
    font-size: 0.9rem;
}

/* ─── Cart Quantity Pill ───────────────────────── */
.cart-qty-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--secondary);
    border-radius: 99px;
    overflow: hidden;
    background: white;
    flex-shrink: 0;
}

.cart-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--secondary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    font-family: var(--font-body);
    flex-shrink: 0;
    line-height: 1;
}

.cart-qty-btn:hover {
    background: rgba(249, 115, 22, 0.1);
}

.cart-qty-display {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    padding: 0 2px;
    user-select: none;
}

/* ─── Cart Review Page ──────────────────────────── */
.cart-review-page {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg-primary);
    padding-bottom: var(--spacing-3xl);
}

.cart-review-table {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
    margin-bottom: var(--spacing-lg);
}

.cart-review-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

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

.cart-review-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 1rem;
}

.cart-review-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.cart-review-special {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

.cart-review-price {
    text-align: right;
    min-width: 80px;
}

.cart-review-line-total {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.05rem;
}

.cart-review-unit {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-remove-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-family: var(--font-body);
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
}

.cart-remove-btn:hover {
    background: #FEF2F2;
    border-color: var(--error);
    color: var(--error);
}

.cart-review-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.cart-review-total span:last-child {
    color: var(--primary);
    font-size: 1.5rem;
}

.cart-review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ─── Responsive ───────────────────────────────── */
@media (max-width: 600px) {
    .cart-review-item {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "info  info"
            "qty   price";
        gap: var(--spacing-md);
    }
    .cart-review-item > .cart-review-info  { grid-area: info; }
    .cart-review-item > .cart-review-qty   { grid-area: qty; }
    .cart-review-item > .cart-review-price { grid-area: price; justify-self: end; align-self: center; }
    .cart-review-actions { flex-direction: column-reverse; }
    .cart-review-actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }

    .product-detail-image {
        aspect-ratio: 4/3;
        font-size: 5rem;
    }

    .checkout-step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Color Groups (product detail) ───── */
.color-group { margin-bottom: 20px; }
.color-group-label { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; color: var(--text-primary); }
.color-selected-display { font-weight: 400; color: var(--primary); }
.color-group-note { color: var(--text-muted); font-size: 0.9rem; font-style: italic; margin: 4px 0 0; }
.color-swatches-img { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.color-swatch-img-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.color-swatch-img-wrap input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.color-swatch-img-box { width: 36px; height: 36px; border-radius: 5px; overflow: hidden; border: 3px solid transparent; transition: border-color 0.15s, box-shadow 0.15s; position: relative; background: #eee; }
.color-swatch-img-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.color-swatch-img-wrap input:checked ~ .color-swatch-img-box,
.color-swatch-img-wrap.selected .color-swatch-img-box { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,0.35); }
.color-swatch-img-wrap:hover .color-swatch-img-box { border-color: var(--primary); opacity: 0.85; }
.color-swatch-name { font-size: 0.68rem; text-align: center; color: var(--text-secondary); max-width: 64px; line-height: 1.2; }
.glow-badge { position: absolute; bottom: 0; right: 0; background: linear-gradient(135deg, #8B5CF6, #EC4899); color: white; font-size: 0.55rem; padding: 2px 4px; border-radius: 3px 0 0 0; font-weight: 800; white-space: nowrap; }

/* Color dot preview on store listing */
.color-dot-img { width: 22px; height: 22px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.12); background-size: cover; background-position: center; }
