/* ━━━ Agar.io Store — Public Vitrine ━━━ */

:root {
    --bg: #0a0e14;
    --bg-surface: #111822;
    --bg-card: #151d28;
    --bg-card-hover: #1a2435;
    --text: #e2e8f0;
    --text-muted: #7a8a9e;
    --text-dim: #4a5568;
    --green: #33ff87;
    --green-glow: rgba(51,255,135,0.08);
    --red: #ff5252;
    --orange: #ff8833;
    --blue: #4d9fff;
    --purple: #a855f7;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ━━━ HEADER ━━━ */
.store-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(10,14,20,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.store-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--bg);
}

.store-logo-text {
    font-size: 18px;
    font-weight: 700;
}

.store-logo-text span { color: var(--green); }

.header-badge {
    background: rgba(255,82,82,0.12);
    color: var(--red);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,82,82,0.2); }
    50% { box-shadow: 0 0 0 8px rgba(255,82,82,0); }
}

/* ━━━ HERO ━━━ */
.hero {
    margin-top: 64px;
    padding: 80px 32px 60px;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(51,255,135,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(77,159,255,0.04) 0%, transparent 50%),
        var(--bg);
    border-bottom: 1px solid var(--border);
}

.hero-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.hero-pill {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(51,255,135,0.08);
    border: 1px solid rgba(51,255,135,0.15);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--green), #44ff99, #22dd77);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--green);
    font-family: 'JetBrains Mono', monospace;
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
    font-weight: 500;
}

/* ━━━ MAIN ━━━ */
.store-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 32px 80px;
}

/* ━━━ TOOLBAR ━━━ */
.store-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.store-search {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

.store-search input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.25s;
}

.store-search input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
}

.store-search input::placeholder { color: var(--text-dim); }

.store-filters {
    display: flex;
    gap: 6px;
}

.store-filter {
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    white-space: nowrap;
}

.store-filter:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.store-filter.active {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
}

.store-results {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.store-results strong { color: var(--green); }

/* ━━━ GRID ━━━ */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* ━━━ PRODUCT CARD ━━━ */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 40px rgba(51,255,135,0.05);
}

/* Discount badge */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    letter-spacing: 0.3px;
}

.product-badge.off-30 {
    background: rgba(77,159,255,0.15);
    color: var(--blue);
}

.product-badge.off-50 {
    background: rgba(255,82,82,0.15);
    color: var(--red);
    animation: badge-pulse 2s ease-in-out infinite;
}

/* Skin images area */
.product-images {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
    position: relative;
    background:
        radial-gradient(circle at 50% 50%, rgba(51,255,135,0.03) 0%, transparent 70%);
}

.product-images img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.product-card:hover .product-images img {
    transform: scale(1.08);
}

/* When 2+ skins in pack */
.product-images.multi img {
    width: 76px;
    height: 76px;
}

.product-images.multi img:first-child {
    transform: translateX(8px);
}

.product-images.multi img:last-child {
    transform: translateX(-8px);
}

.product-card:hover .product-images.multi img:first-child {
    transform: translateX(12px) scale(1.05);
}

.product-card:hover .product-images.multi img:last-child {
    transform: translateX(-12px) scale(1.05);
}

/* Card info */
.product-info {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-extras {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.product-extra {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-dim);
    white-space: nowrap;
}

/* Price */
.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-original-price {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: line-through;
    font-family: 'JetBrains Mono', monospace;
}

.product-sale-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--green);
    font-family: 'JetBrains Mono', monospace;
}

/* ━━━ LOADING ━━━ */
.store-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px;
    gap: 12px;
    color: var(--text-muted);
}

.store-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ━━━ EMPTY ━━━ */
.store-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.store-empty .emoji { font-size: 48px; margin-bottom: 16px; }
.store-empty h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.store-empty p { font-size: 14px; }

/* ━━━ RARE SKINS ━━━ */
.rare-badge {
    background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(255,170,0,0.15)) !important;
    color: #ffaa00 !important;
    animation: rare-glow 3s ease-in-out infinite;
}

@keyframes rare-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,170,0,0.2); }
    50% { box-shadow: 0 0 12px 4px rgba(255,170,0,0.15); }
}

.rare-card {
    border-color: rgba(168,85,247,0.2) !important;
    background: linear-gradient(160deg, #151d28 0%, #1a1530 100%) !important;
}

.rare-card:hover {
    border-color: rgba(168,85,247,0.4) !important;
    box-shadow: var(--shadow), 0 0 40px rgba(168,85,247,0.1) !important;
}

.rare-card .product-images {
    background: radial-gradient(circle at 50% 50%, rgba(168,85,247,0.06) 0%, transparent 70%);
}

.product-badge.rare-badge-tag {
    background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(255,170,0,0.2));
    color: #ffaa00;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.rare-tag {
    background: rgba(168,85,247,0.12) !important;
    border-color: rgba(168,85,247,0.25) !important;
    color: #a855f7 !important;
}

.rare-price {
    color: #ffaa00 !important;
}

.avail-tag {
    background: rgba(51,255,135,0.12) !important;
    border-color: rgba(51,255,135,0.25) !important;
    color: var(--green) !important;
}

.available-card {
    border-color: rgba(51,255,135,0.25) !important;
}

.available-card:hover {
    border-color: rgba(51,255,135,0.4) !important;
    box-shadow: var(--shadow), 0 0 40px rgba(51,255,135,0.1) !important;
}

.available-card .rare-price {
    color: var(--green) !important;
}

/* ━━━ UNAVAILABLE SKINS — CLEAR "NOT FOR SALE" STYLING ━━━ */
.unavailable-card {
    border-color: rgba(255,82,82,0.15) !important;
    background: linear-gradient(160deg, #151d28 0%, #1c1520 100%) !important;
    opacity: 0.7;
    filter: saturate(0.4);
    transition: all 0.3s ease;
}

.unavailable-card:hover {
    opacity: 0.85;
    filter: saturate(0.6);
    border-color: rgba(255,82,82,0.3) !important;
    box-shadow: var(--shadow), 0 0 20px rgba(255,82,82,0.08) !important;
    transform: translateY(-2px);
}

.unavailable-card .product-images {
    background: radial-gradient(circle at 50% 50%, rgba(255,82,82,0.04) 0%, transparent 70%);
    position: relative;
}

.unavailable-card .product-images img {
    filter: grayscale(0.6) brightness(0.65);
    opacity: 0.6;
}

/* Overlay "INDISPONÍVEL" on top of the image */
.unavail-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    z-index: 5;
    border-radius: inherit;
}

.unavail-overlay span:first-child {
    font-size: 28px;
    opacity: 0.9;
}

.unavail-overlay span:last-child {
    font-size: 11px;
    font-weight: 800;
    color: #ff5252;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Unavailable badge (top-right) */
.unavail-badge-tag {
    background: rgba(255,82,82,0.2) !important;
    color: #ff5252 !important;
    animation: none !important;
}

/* Available badge (top-right) */
.avail-badge-tag {
    background: linear-gradient(135deg, rgba(51,255,135,0.2), rgba(255,170,0,0.15)) !important;
    color: var(--green) !important;
    animation: rare-glow 3s ease-in-out infinite;
}

/* Unavailable tag in extras area */
.unavail-tag {
    background: rgba(255,82,82,0.12) !important;
    border-color: rgba(255,82,82,0.3) !important;
    color: #ff5252 !important;
    font-weight: 700 !important;
}

/* Price area for unavailable skins */
.unavail-pricing {
    border-top: 1px dashed rgba(255,82,82,0.15);
    padding-top: 8px;
    margin-top: 4px;
}

.unavail-price-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    font-style: italic;
    letter-spacing: 0.3px;
}

.unavailable-card .product-name {
    color: var(--text-muted);
}

.section-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 0 16px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168,85,247,0.3), transparent);
}

.section-divider span {
    font-size: 14px;
    font-weight: 700;
    color: #a855f7;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ━━━ FOOTER ━━━ */
.store-footer {
    border-top: 1px solid var(--border);
    padding: 24px 32px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}

/* ━━━ RESPONSIVE ━━━ */
@media (max-width: 768px) {
    .hero { padding: 60px 20px 40px; }
    .hero-content h1 { font-size: 28px; }
    .hero-stats { gap: 24px; }
    .hero-stat-number { font-size: 22px; }
    .store-main { padding: 20px 16px 60px; }
    .store-toolbar { flex-direction: column; align-items: stretch; }
    .store-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .product-images img { width: 80px; height: 80px; }
    .product-images.multi img { width: 60px; height: 60px; }
    .store-filters { overflow-x: auto; }
    .header-inner { padding: 0 16px; }
}

@media (max-width: 480px) {
    .store-grid { grid-template-columns: repeat(2, 1fr); }
}
