﻿/* ================================================
   RaceClick - Stylesheet
   ================================================ */

:root {
    --primary:       #FF6B35;
    --primary-dark:  #E55A26;
    --bg:            #F8F9FA;
    --card-bg:       #FFFFFF;
    --text:          #1A1A2E;
    --text-muted:    #6C757D;
    --border:        #E9ECEF;
    --success:       #28A745;
    --error:         #DC3545;
    --shadow:        0 4px 24px rgba(0,0,0,0.10);
    --radius:        18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 60%, #FFA85C 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* ---- Layout ---- */
.container {
    width: 100%;
    max-width: 460px;
}
.container--wide {
    max-width: 900px;
}

/* ---- Header ---- */
.header {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}
.logo {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.tagline {
    font-size: 15px;
    opacity: 0.88;
    margin-top: 4px;
}

/* ---- Gara info banner ---- */
.gara-info {
    background: rgba(255,255,255,0.20);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    backdrop-filter: blur(10px);
}
.gara-badge { font-size: 28px; }
.gara-info h2 { font-size: 16px; font-weight: 700; }
.gara-info p  { font-size: 13px; opacity: 0.85; margin-top: 2px; }

/* ---- Card ---- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
}
.card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ---- Form ---- */
.input-group  { margin-bottom: 20px; }
.input-label  {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.input-field {
    width: 100%;
    padding: 18px;
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 6px;
    border: 2px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    background: #FAFAFA;
}
.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,.15);
    background: #fff;
}

/* ---- Buttons ---- */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .1s;
    text-decoration: none;
}
.btn-primary:hover    { background: var(--primary-dark); }
.btn-primary:active   { transform: scale(0.98); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; }
.btn-icon { font-size: 18px; }

.btn-secondary {
    padding: 10px 18px;
    background: rgba(255,255,255,.20);
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,.30); }

/* ---- Messages ---- */
.error-msg {
    margin-top: 16px;
    padding: 12px 16px;
    background: #FFF5F5;
    border: 1px solid #FECDD3;
    border-radius: 10px;
    color: var(--error);
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}
.loading {
    margin-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .75s linear infinite;
    margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Features strip ---- */
.features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.90);
    font-size: 13px;
    font-weight: 500;
}
.feature-icon { font-size: 16px; }

/* ---- Footer ---- */
.footer {
    text-align: center;
    color: rgba(255,255,255,.65);
    font-size: 12px;
    margin-top: 20px;
}

/* ---- Gallery page ---- */
.gallery-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.gallery-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}
.gallery-header .card-subtitle {
    color: rgba(255,255,255,.80);
    margin-bottom: 0;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 100px;
}
.photo-card {
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    position: relative;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.photo-card.selected { outline: 3px solid var(--primary); }

.photo-card img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
}
.photo-card-info {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.photo-price { font-weight: 700; color: var(--primary); font-size: 15px; }
.photo-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: background .2s, border-color .2s;
}
.photo-card.selected .photo-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---- Cart bar ---- */
.cart-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--text);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    flex-wrap: wrap;
}
.cart-bar span { font-size: 14px; font-weight: 600; }
.btn-checkout { width: auto; padding: 12px 24px; }

/* ---- Empty state ---- */
.empty-state {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--shadow);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
