/* shop_style.css - mobile-first e responsive */

/* RESET MINIMO */
* { box-sizing: border-box; }
html,body { height:100%; }
body {
  margin:0;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:#d5f0ff;
  color:#222;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.4;
}

/* HEADER */
.header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 20px;
  background:#0058af;
  color:#fff;
}
.header-left { display:flex; align-items:center; gap:12px; }
.logo-img { width:50px; height:50px; object-fit:contain; }
.site-info { display:flex; flex-direction:column; }
.site-title { font-weight:700; font-size:18px; }
.site-subtitle { font-size:12px; color:#ccc; }
.cart-icon {
  background:#a7ddff;
  color:#fff;
  border:none;
  border-radius:24px;
  padding:8px 12px;
  cursor:pointer;
  font-size:16px;
  position:relative;
}
.cart-count {
  position:absolute;
  top:-6px;
  right:-6px;
  background:#fa9300;
  color:#fff;
  border-radius:50%;
  padding:2px 6px;
  font-size:12px;
}

/* CONTAINER */
.container { max-width:1200px; margin:0 auto; padding:12px; }

/* TITOLI SEZIONI */
.section-title {
  text-align:center;
  font-size:24px;
  margin:28px 0 12px;
  color:#000000;
}

/* GRIGLIA PRODOTTI */
#product-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:20px;
  padding:15px;
  margin:10px 0;
}

.product-item {
  background:#fff;
  border-radius:12px;
  padding:15px;
  text-align:center;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  transition:transform 0.2s ease;
}
.product-item:hover { transform: translateY(-5px); }

.product-image {
  width:100%;
  aspect-ratio: 4 / 3;
  background:#fafafa;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.product-image img {
  width:100%;
  height:200px;
  object-fit:cover;
  border-radius:10px;
  cursor:pointer;
  transition:transform 0.2s ease;
}
.product-image img:hover { transform: scale(1.05); }

/* Titolo e prezzo */
.product-title {
  margin-top:10px;
  font-weight:600;
  font-size:16px;
  color:#333;
}
.product-price {
  margin:8px 0;
  font-size:15px;
  color:#fa9300;
  font-weight:bold;
}

/* Pulsanti */
.cart-action {
  display:flex;
  justify-content:center;
  gap:10px;
  align-items:center;
}
.product-quantity {
  width:60px;
  padding:6px;
  text-align:center;
  border:1px solid #ddd;
  border-radius:6px;
  font-size:14px;
}
.btnAddAction {
  background:#007bff;
  color:#fff;
  border:none;
  padding:6px 12px;
  border-radius:8px;
  font-weight:700;
  cursor:pointer;
  transition:background 0.2s ease;
}
.btnAddAction:hover { background:#0056b3; }

/* INFO CARD */
.info-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:12px 0 28px;
}
.info-card {
  background:#fff;
  padding:12px;
  border-radius:8px;
  border:1px solid #eee;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
.info-card h4 { margin:0 0 6px; font-size:15px; }
.info-card p { margin:0; font-size:13px; color:#555; }

/* FOOTER */
footer {
  background:#111;
  color:#ddd;
  padding:18px 12px;
  margin-top:30px;
  text-align:center;
  font-size:12px;
}
.footer-grid {
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:center;
  justify-content:center;
}
.footer-grid a { color:#ff8c00; text-decoration:none; }

/* LIGHTBOX */
#lightbox {
  display:none;
  position:fixed;
  top:0; left:0; width:100%; height:100%;
  background:rgba(0,0,0,0.75);
  justify-content:center;
  align-items:center;
  z-index:1200;
}
#lightbox img {
  max-width:90%;
  max-height:90%;
  object-fit:contain;
  border-radius:8px;
  box-shadow:0 4px 12px rgba(0,0,0,0.5);
}
#lightbox:target { display:flex; }

/* PANNELLO CARRELLO */
.cart-panel {
  position:fixed;
  top:0;
  right:-100%;
  width:300px;
  height:100%;
  background:#fff;
  box-shadow:-2px 0 5px rgba(0,0,0,0.2);
  transition:right 0.3s ease;
  z-index:1000;
  display:flex;
  flex-direction:column;
}
.cart-panel.open { right:0; }

.cart-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px;
  background:#f5f5f5;
  border-bottom:1px solid #ddd;
}
.close-cart {
  background:none;
  border:none;
  font-size:20px;
  cursor:pointer;
  color:#333;
}
.cart-content { flex:1; overflow-y:auto; padding:10px; }
.cart-row {
  display:flex;
  align-items:center;
  margin-bottom:10px;
  border-bottom:1px solid #eee;
  padding-bottom:20px;
}
.cart-img {
  width:50px;
  height:50px;
  object-fit:cover;
  margin-right:10px;
}
.cart-details { flex:1; }
.remove-item {
  color:red;
  text-decoration:none;
  font-size:18px;
  margin-left:5px;
}
.cart-total {
  font-size:16px;
  margin:10px 0;
  font-weight:bold;
}
.cart-actions {
  display:flex;
  justify-content:space-between;
  gap:5px;
}
.cart-actions .btn {
  flex:1;
  text-align:center;
  padding:8px;
  background:#007bff;
  color:#fff;
  text-decoration:none;
  border-radius:4px;
}
.cart-actions .empty-btn { background:#dc3545; }

/* ACCESSIBILITY */
.sr-only {
  position:absolute;
  left:-10000px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* RESPONSIVE */
@media(min-width:800px) {
  #product-grid { grid-template-columns:repeat(3, 1fr); }
  .info-grid { grid-template-columns:repeat(3,1fr); }
}
@media(min-width:1100px) {
  #product-grid { grid-template-columns:repeat(4, 1fr); }
  .container { padding:20px; }
}
/* contenitori */
.product-options,
.product-custom {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
}

/* etichette */
.product-options label,
.product-custom label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

/* select e input */
.product-options select,
.product-custom input {
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

/* focus */
.product-options select:focus,
.product-custom input:focus {
  border-color: #0077cc;
  box-shadow: 0 0 4px rgba(0, 119, 204, 0.4);
  outline: none;
}

/* placeholder più elegante */
.product-custom input::placeholder {
  color: #aaa;
  font-style: italic;
}

/* responsive: full width */
.product-options select,
.product-custom input {
  width: 100%;
  max-width: 350px; /* opzionale, per non allargarlo troppo */
}
.product-options {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
}

.product-options .label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.size-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.size-buttons input[type="radio"] {
  display: none; /* nascondiamo i radio */
}

.size-buttons label {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.size-buttons input[type="radio"]:checked + label {
  background: #198754;
  color: #fff;
  border-color: #198754;
}

.product-custom {
  margin-top: 10px;
}

.product-custom input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}
.cart-action {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-quantity {
  width: 60px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
}

.btnAddAction {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btnAddAction:hover {
  background: #0056b3;
}
.product-gallery { text-align:center; margin-bottom:10px; }
.product-gallery .main-img { width:100%; max-width:200px; height:auto; object-fit:cover; border-radius:8px; margin-bottom:5px; cursor:pointer; }
.product-gallery p { font-size:14px; color:#555; margin:5px 0; }
.thumbnails { display:flex; justify-content:center; gap:5px; flex-wrap:wrap; margin-top:5px; }
.thumbnails .thumb { width:40px; height:40px; object-fit:cover; border:2px solid #ccc; border-radius:4px; cursor:pointer; transition:border 0.2s; }
.thumbnails .thumb:hover { border-color:#198754; }

@media(max-width:480px) {
  .thumbnails .thumb { width:30px; height:30px; }
  .product-gallery p { font-size:12px; }
}







/* HERO */
.hero {
  background: url('banner.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 60px 20px;
}
.hero h1 { font-size: 1.8rem; margin-bottom: 10px; }
.hero p { font-size: 1rem; margin-bottom: 20px; }
.hero-btn {
  background: #ff6600;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

/* BENEFITS */
.benefits {
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 20px 10px;
  background: #f7f7f7;
}
.benefit { flex: 1; padding: 10px; font-size: 0.9rem; }
.benefit span { font-size: 1.5rem; display: block; margin-bottom: 5px; }

/* MOBILE */
@media(max-width:768px){
  .benefits { flex-direction: column; }
  .benefit { margin-bottom: 15px; }
}
