:root{
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, .10);
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);

  /* Richiami dal logo */
  --accent: #00b9c8;     /* teal */
  --accent2: #8b7bd5;    /* violet */
  --accent3: #f2e85c;    /* giallo soft */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(246,247,249,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand{ display:flex; align-items:center; text-decoration:none; }
.logo{
  height: 44px;
  width:auto;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.hamburger{
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 6px;
  cursor:pointer;
}
.hamburger span{
  display:block;
  height: 3px;
  width: 24px;
  background: var(--text);
  border-radius: 999px;
}

.searchWrap{ flex:1; display:flex; justify-content:flex-end; }
.searchWrap input{
  width: min(520px, 100%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
}
.searchWrap input:focus{ border-color: rgba(0,185,200,.6); box-shadow: 0 0 0 4px rgba(0,185,200,.12); }

.overlay{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.45);
  z-index: 60;
}

.drawer{
  position: fixed;
  top: 0; left: 0;
  height: 100%;
  width: min(360px, 90vw);
  background: var(--card);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform .22s ease;
  z-index: 70;
  display:flex;
  flex-direction:column;
}
.drawer.open{ transform: translateX(0); }

.drawerHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.drawerTitle{
  font-weight: 800;
  letter-spacing:.2px;
}
.drawerClose{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  cursor:pointer;
}

.categories{
  padding: 10px;
  overflow:auto;
}
.catItem{
  border: 1px solid var(--border);
  background:#fff;
  border-radius: 16px;
  margin: 8px 0;
  overflow:hidden;
}
.catBtn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px;
  background: transparent;
  border:0;
  cursor:pointer;
  font-weight: 700;
}
.catBtn .pill{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139,123,213,.14);
  color: var(--accent2);
  border: 1px solid rgba(139,123,213,.25);
}
.subcats{
  padding: 6px 10px 12px;
  display:none;
}
.catItem.open .subcats{ display:block; }
.subcats a{
  display:block;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--text);
}
.subcats a:hover{ background: rgba(0,185,200,.08); }

.container{
  width: min(1120px, 92vw);
  margin: 18px auto 40px;
}

.hero{
  background: linear-gradient(135deg, rgba(0,185,200,.12), rgba(139,123,213,.10), rgba(242,232,92,.12));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 18px;
  box-shadow: var(--shadow);
}
.hero h1{ margin:0 0 6px; font-size: 28px; }
.hero p{ margin: 0; color: var(--muted); }
.disclaimer{ margin-top:10px; font-size: 13px; }

.gridHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin: 16px 2px 10px;
}
.gridHeader h2{ margin:0; font-size: 18px; }

.btn{
  border: 1px solid rgba(0,185,200,.35);
  background: rgba(0,185,200,.10);
  color: #055b63;
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 700;
}
.btn:hover{ background: rgba(0,185,200,.14); }

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.card{
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
}
@media (min-width: 640px){ .card{ grid-column: span 6; } }
@media (min-width: 980px){ .card{ grid-column: span 4; } }

.cardImg{
  height: 170px;
  background: #eef2ff;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom: 1px solid var(--border);
}
.cardImg img{ max-height: 140px; max-width: 88%; object-fit: contain; }

.cardBody{ padding: 12px 12px 14px; }
.cardTitle{
  margin:0 0 6px;
  font-size: 15px;
  line-height:1.25;
}
.cardMeta{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.tag{
  border:1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
  background:#fff;
}
.cardActions{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:space-between;
}
.buy{
  flex:1;
  text-align:center;
  text-decoration:none;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,185,200,.18), rgba(139,123,213,.16));
  border: 1px solid rgba(139,123,213,.30);
  color: var(--text);
  font-weight: 800;
}
.buy:hover{ filter: brightness(1.02); }

.footer{
  width: min(1120px, 92vw);
  margin: 0 auto 28px;
  color: var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.footerLinks{ display:flex; gap: 12px; }
.footer a{ color: var(--muted); text-decoration:none; }
.footer a:hover{ text-decoration:underline; }

/* HOME sections */
.homeSectionsHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin: 16px 2px 10px;
}
.homeSectionsHeader h2{ margin:0; font-size: 18px; }

.homeSections{ display:flex; flex-direction:column; gap: 16px; }

.homeSection{
  background: rgba(255,255,255,.6);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.homeSectionHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.homeSectionHead h3{ margin:0; font-size: 16px; }

.link{
  text-decoration:none;
  font-weight: 800;
  color: var(--accent2);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(139,123,213,.25);
  background: rgba(139,123,213,.10);
}
.link:hover{ filter: brightness(1.02); }

.empty{ color: var(--muted); }

/* AMAZON-style drawer rows */
.catRow{
  border: 1px solid var(--border);
  background:#fff;
  border-radius: 16px;
  margin: 8px 0;
  overflow:hidden;
}

.catMainLink{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  text-decoration:none;
  color: var(--text);
  font-weight: 800;
}

.catToggle{
  width: 52px;
  height: 48px;
  border: 0;
  background: transparent;
  cursor:pointer;
  border-left: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
}

.catRow{
  display:grid;
  grid-template-columns: 1fr 52px;
}

.catRow .chev{
  display:inline-block;
  font-size: 22px;
  transform: rotate(0deg);
  transition: transform .15s ease;
  color: var(--muted);
}

.catRow.open .chev{
  transform: rotate(90deg);
}

.catRow .subcats{
  grid-column: 1 / -1;
  padding: 6px 10px 12px;
  display:none;
  border-top: 1px solid var(--border);
}

.catRow.open .subcats{ display:block; }

.catRow .subcats a{
  display:block;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--text);
}
.catRow .subcats a:hover{ background: rgba(0,185,200,.08); }

.catIcon{
  display:inline-flex;
  width: 26px;
  height: 26px;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  background: rgba(0,185,200,.10);
  border: 1px solid rgba(0,185,200,.18);
}
