﻿:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #f034ff;
  --accent-hover: #d11ce0;
  --green: #059669;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.top-bar {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.85rem;
  padding: 0.55rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.social-links, .footer-social-icons { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.social-icon-btn svg { width: 19px; height: 19px; fill: currentColor; }
.social-icon-btn:hover { transform: scale(1.1); opacity: 0.92; }
.social-icon-btn.discogs { background: #333333; border: 1px solid #555555; }
.social-icon-btn.facebook { background: #1877F2; }
.social-icon-btn.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-icon-btn.whatsapp { background: #25D366; }

header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--text); }
.brand img { height: 82px; width: auto; object-fit: contain; }
.controls { display: flex; gap: 0.75rem; flex: 1; max-width: 520px; }
input, select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 0.65rem 0.9rem; border-radius: 8px; font-size: 0.95rem; outline: none;
}
input { flex: 1; }
input:focus, select:focus { border-color: var(--accent); background: #ffffff; }
.cart-btn {
  background: var(--accent); color: white; border: none; padding: 0.7rem 1.3rem;
  border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.95rem;
}
.cart-btn:hover { background: var(--accent-hover); }

.main-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.nav-links { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.nav-btn {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-btn.active { background: var(--accent); color: #ffffff; border-color: var(--accent); }

.hero-socials { display: flex; justify-content: center; gap: 0.65rem; flex-wrap: wrap; }
.social-logo-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.15s;
}
.social-logo-card:hover { transform: translateY(-2px); }
.social-logo-card svg { width: 18px; height: 18px; fill: currentColor; }
.social-logo-card.discogs { background: #222222; }
.social-logo-card.facebook { background: #1877F2; }
.social-logo-card.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-logo-card.whatsapp { background: #25D366; }

.home-section {
  max-width: 1360px;
  width: 100%;
  margin: 2.2rem auto;
  padding: 0 1.5rem;
  flex: 1;
}
.home-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.home-hero h1 { font-size: 1.85rem; margin-bottom: 0.85rem; color: var(--text); }
.home-hero p { color: var(--muted); max-width: 820px; margin: 0 auto 1.6rem; font-size: 1.02rem; line-height: 1.65; }
.cta-catalog-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.8rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.cta-catalog-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border);
}
.featured-header h2 { font-size: 1.4rem; color: var(--text); }
.featured-sub { color: var(--muted); font-size: 0.9rem; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}
.featured-grid .card { box-shadow: 0 6px 20px rgba(15,23,42,0.08); transition: transform 0.2s; }
.featured-grid .card:hover { transform: translateY(-4px); }

.sell-section { max-width: 1000px; width: 100%; margin: 2.5rem auto; padding: 0 1.5rem; flex: 1; }
.sell-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2.2rem; text-align: center; }
.sell-card h2 { font-size: 1.75rem; margin-bottom: 0.75rem; color: var(--text); }
.sell-card p { color: var(--muted); max-width: 700px; margin: 0 auto 1.8rem; font-size: 1rem; }
.sell-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; text-align: left; }
.sell-step { background: #ffffff; border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; font-size: 0.92rem; color: var(--muted); }
.sell-step strong { color: var(--text); display: block; margin-bottom: 0.3rem; font-size: 1rem; }
.sell-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.catalog-layout {
  max-width: 1400px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}
.filters-sidebar {
  width: 265px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  position: sticky;
  top: 112px;
}
.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.filters-header h3 { font-size: 1rem; font-weight: 800; color: var(--text); }
.reset-btn { background: none; border: none; color: var(--accent); font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.reset-btn:hover { text-decoration: underline; }
.filter-group { margin-bottom: 1rem; }
.filter-group label { display: block; font-size: 0.82rem; font-weight: 700; color: #334155; margin-bottom: 0.35rem; }
.filter-group select { width: 100%; background: #ffffff; padding: 0.55rem 0.7rem; font-size: 0.88rem; }
.catalog-content { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .catalog-layout { flex-direction: column; }
  .filters-sidebar { width: 100%; position: static; }
}

.stats { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}
.cover { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #f1f5f9; border-bottom: 1px solid var(--border); display: block; }
.card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.artist { font-size: 0.82rem; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.title { font-size: 1.05rem; font-weight: 700; margin: 0.2rem 0 0.4rem; }
.meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.6rem; }
.badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.badge { background: var(--surface); border: 1px solid var(--border); padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.75rem; color: #334155; }
.notes { font-size: 0.8rem; color: var(--muted); font-style: italic; margin-bottom: 0.8rem; }
.card-footer {
  margin-top: auto; padding-top: 0.8rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.price { font-size: 1.15rem; font-weight: 800; }
.add-btn { background: var(--text); color: white; border: none; padding: 0.5rem 0.9rem; border-radius: 8px; cursor: pointer; font-weight: 600; }
.add-btn:hover { background: var(--accent); }
.add-btn.in-cart { background: var(--green); }

footer { background: var(--surface); border-top: 1px solid var(--border); padding: 2.5rem 2rem 1.5rem; margin-top: 3rem; color: var(--muted); font-size: 0.9rem; }
.footer-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.footer-col h3 { color: var(--text); font-size: 1rem; margin-bottom: 0.75rem; }
.footer-col p { margin-bottom: 0.4rem; }
.footer-bottom { max-width: 1320px; margin: 1.2rem auto 0; text-align: center; font-size: 0.82rem; }

.overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 30; display: none; justify-content: flex-end; }
.overlay.open { display: flex; }
.drawer { width: 100%; max-width: 430px; background: #ffffff; height: 100%; padding: 1.5rem; display: flex; flex-direction: column; overflow-y: auto; border-left: 1px solid var(--border); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.close-btn { background: none; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; }
.shipping-banner { background: var(--surface); padding: 0.75rem; border-radius: 8px; margin: 1rem 0; font-size: 0.85rem; text-align: center; border: 1px solid var(--border); }
.shipping-banner.free { border-color: var(--green); color: var(--green); background: #ecfdf5; font-weight: 600; }
.cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.cart-item-info { flex: 1; font-size: 0.9rem; }
.remove-item { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.totals { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.total-row { display: flex; justify-content: space-between; font-size: 0.95rem; }
.total-row.grand { font-size: 1.2rem; font-weight: 800; margin-top: 0.4rem; }
#paypal-button-container { margin-top: 1.2rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.2rem; }
.per-page-box { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.per-page-box select { padding: 0.4rem 0.7rem; font-size: 0.9rem; cursor: pointer; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.75rem; margin-top: 2.5rem; flex-wrap: wrap; }
.page-btn { background: #ffffff; border: 1px solid var(--border); color: var(--text); padding: 0.55rem 1rem; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.page-info { font-size: 0.9rem; color: var(--muted); font-weight: 500; padding: 0 0.5rem; }

/* Stile base delle bandierine */
.flag-btn {
    opacity: 0.6;
    filter: grayscale(30%);
    transform: scale(1);
    transition: all 0.25s ease;
}

/* Effetto al passaggio del mouse */
.flag-btn:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-2px);
}

/* Effetto bandierina ATTIVA / SELEZIONATA (Forzato e visibilissimo) */
.flag-btn.active-flag {
    opacity: 1 !important;
    filter: grayscale(0%) !important;
    transform: translateY(-3px) scale(1.15) !important;
    box-shadow: 0 0 15px 4px rgba(240, 52, 255, 0.9) !important;
    border: 2px solid #ffffff !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Bottone carrello con sfondo bianco in alto a destra */
.cart-icon-btn {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #222222 !important;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-weight: bold;
}

.cart-icon-btn:hover {
    background: #f0f0f0 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Il numerino rosso dei dischi dentro il carrello */
#cart-count {
    background: #ff0055;
    color: #fff;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50px;
    min-width: 18px;
    text-align: center;
}
