/**
 * Michis Picks Shop — Styles
 * Session H — 2026-04-01
 * Matchday Theme (same palette as dashboards)
 * Mobile-first, responsive
 */

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --shop-bg: #0F172A;
    --shop-surface: #1E293B;
    --shop-surface-hover: #263548;
    --shop-border: #334155;
    --shop-green: #16A34A;
    --shop-green-glow: rgba(22, 163, 74, 0.3);
    --shop-gold: #F59E0B;
    --shop-white: #F8FAFC;
    --shop-muted: #94A3B8;
    --shop-red: #EF4444;
    --shop-radius: 12px;
    --shop-radius-sm: 8px;
    --shop-max-w: 1280px;
    --shop-transition: 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--shop-bg);
    color: var(--shop-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.shop-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shop-main {
    max-width: var(--shop-max-w);
    margin: 0 auto;
    padding: 0 16px 60px;
    width: 100%;
}


/* ── Hero Section ─────────────────────────────────── */
.shop-hero {
    background: linear-gradient(135deg, #0B1120 0%, #1A2744 50%, #0F2E1A 100%);
    border-bottom: 1px solid var(--shop-border);
    padding: 48px 16px;
}

.shop-hero-inner {
    max-width: var(--shop-max-w);
    margin: 0 auto;
    text-align: center;
}

.shop-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(22, 163, 74, 0.15);
    color: var(--shop-green);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(22, 163, 74, 0.3);
}

.shop-hero-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.shop-hero-accent {
    background: linear-gradient(135deg, var(--shop-green), #4ADE80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shop-hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--shop-muted);
    max-width: 640px;
    margin: 0 auto 20px;
}

.shop-hero-ref {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--shop-gold);
    padding: 8px 16px;
    border-radius: var(--shop-radius-sm);
    font-size: 14px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}


/* ── Auth Bar (login/register prompt) ─────────────── */
.shop-auth-bar {
    background: rgba(245, 158, 11, 0.08);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding: 12px 16px;
}

.shop-auth-inner {
    max-width: var(--shop-max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--shop-gold);
}

.shop-auth-buttons {
    display: flex;
    gap: 8px;
}

.shop-btn-login,
.shop-btn-register {
    display: inline-flex;
    padding: 6px 18px;
    border-radius: var(--shop-radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--shop-transition);
}

.shop-btn-login {
    background: transparent;
    border: 1px solid var(--shop-gold);
    color: var(--shop-gold);
}

.shop-btn-login:hover {
    background: var(--shop-gold);
    color: #000;
}

.shop-btn-register {
    background: var(--shop-green);
    border: 1px solid var(--shop-green);
    color: #fff;
}

.shop-btn-register:hover {
    background: #15803D;
}


/* ── Sport Filter Bar ─────────────────────────────── */
.shop-filter-bar {
    max-width: var(--shop-max-w);
    margin: 0 auto;
    padding: 20px 16px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.shop-filter-tabs {
    display: flex;
    gap: 8px;
    min-width: max-content;
}

.shop-filter-tab {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--shop-border);
    background: transparent;
    color: var(--shop-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--shop-transition);
    white-space: nowrap;
}

.shop-filter-tab:hover {
    border-color: var(--shop-green);
    color: var(--shop-white);
}

.shop-filter-tab.active {
    background: var(--shop-green);
    border-color: var(--shop-green);
    color: #fff;
    font-weight: 600;
}


/* ── Category Sections ────────────────────────────── */
.shop-category {
    margin-top: 40px;
}

.shop-category-header {
    margin-bottom: 20px;
}

.shop-category-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.shop-category-desc {
    font-size: 15px;
    color: var(--shop-muted);
}

.shop-sport-group {
    margin-top: 24px;
    margin-bottom: 32px;
}

.shop-sport-group:last-child {
    margin-bottom: 0;
}

.shop-sport-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--shop-white);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--shop-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-sport-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 16px;
    background: var(--shop-green);
    border-radius: 4px;
}


/* ── Card Grid ────────────────────────────────────── */
.shop-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}


/* ── Package Card ─────────────────────────────────── */
.shop-card {
    background: var(--shop-surface);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    border-color: var(--shop-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--shop-green);
}

.shop-card.featured {
    border-color: var(--shop-gold);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.shop-card.featured:hover {
    border-color: var(--shop-gold);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--shop-gold);
}

.shop-card-img {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #1A2744 0%, #0F2E1A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.95;
    transition: all var(--shop-transition);
}

.shop-card:hover .shop-card-img img {
    opacity: 1;
    transform: scale(1.06);
}

.shop-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--shop-gold);
    color: #000;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.shop-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card-sport {
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.shop-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.shop-card-desc {
    font-size: 13px;
    color: var(--shop-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.shop-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--shop-muted);
}

.shop-card-duration {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-card-type {
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.shop-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--shop-border);
}

.shop-card-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--shop-white);
}

.shop-btn-buy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--shop-radius-sm);
    border: none;
    background: var(--shop-green);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--shop-transition);
}

.shop-btn-buy:hover {
    background: #15803D;
    transform: scale(1.02);
}

.shop-btn-buy:active {
    transform: scale(0.98);
}

.shop-btn-buy.loading {
    opacity: 0.7;
    cursor: wait;
}

.shop-btn-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ── Success Banner ───────────────────────────────── */
.shop-success-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(22, 163, 74, 0.15);
    border-bottom: 1px solid var(--shop-green);
    padding: 14px 16px;
    color: var(--shop-green);
    font-size: 15px;
    font-weight: 500;
}

.shop-banner-close {
    background: none;
    border: none;
    color: var(--shop-green);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 8px;
}


/* ── Loading Skeleton ─────────────────────────────── */
.shop-card.skeleton {
    pointer-events: none;
}

.skeleton-img {
    background: linear-gradient(90deg, var(--shop-surface) 25%, #263548 50%, var(--shop-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    height: 160px;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--shop-surface) 25%, #263548 50%, var(--shop-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 10px;
}

.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


/* ── Error State ──────────────────────────────────── */
.shop-error {
    text-align: center;
    padding: 60px 16px;
}

.shop-error h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.shop-error p {
    color: var(--shop-muted);
    margin-bottom: 20px;
}

.shop-btn-retry {
    padding: 10px 24px;
    border-radius: var(--shop-radius-sm);
    border: 1px solid var(--shop-green);
    background: transparent;
    color: var(--shop-green);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--shop-transition);
}

.shop-btn-retry:hover {
    background: var(--shop-green);
    color: #fff;
}


/* ── Spinner Animation ────────────────────────────── */
.shop-spinner {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* ── Footer ───────────────────────────────────────── */
.shop-footer {
    margin-top: auto;
    border-top: 1px solid var(--shop-border);
    padding: 32px 16px;
    background: var(--shop-surface);
}

.shop-footer-inner {
    max-width: var(--shop-max-w);
    margin: 0 auto;
    text-align: center;
}

.shop-footer-brand {
    font-size: 16px;
    margin-bottom: 12px;
}

.shop-footer-brand span {
    color: var(--shop-muted);
}

.shop-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.shop-footer-links a {
    color: var(--shop-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--shop-transition);
}

.shop-footer-links a:hover {
    color: var(--shop-green);
}

.shop-footer-legal {
    font-size: 12px;
    color: #64748B;
    line-height: 1.6;
}

.shop-footer-legal p + p {
    margin-top: 4px;
}


/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .shop-hero { padding: 32px 16px; }
    .shop-card-grid { grid-template-columns: 1fr; }
    .shop-category { margin-top: 32px; }
    .shop-category-title { font-size: 20px; }
    .shop-card-price { font-size: 20px; }
    .shop-btn-buy { padding: 10px 18px; font-size: 13px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .shop-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1025px) {
    .shop-card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--shop-bg); }
::-webkit-scrollbar-thumb { background: var(--shop-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
