/* FULL MOBILE.CSS OTTIMIZZATO E CORRETTO */

/* ========== STILI MOBILE (max 768px) ========== */
@media (max-width: 768px) {

  /* Barra superiore */
  .top-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
  }

  .left-text p {
    font-size: 13px;
    margin-bottom: 5px;
  }

  /* Logo */
  .logo {
    width: 160px;
  }

  /* ---------------- MENU HAMBURGER ---------------- */
  /* ====== MENU HAMBURGER ====== */ .menu-toggle { display: flex; /* mostra solo su mobile */ align-items: center; justify-content: center; cursor: pointer; padding: 10px; position: absolute; left: 15px; /* in alto a sinistra */ top: 20%; transform: translateY(-50%); z-index: 1002; background: none; border: none; } 
  .menu-icon { width: 28px; height: 28px; filter: brightness(0); }

  /* ---------------- SIDEBAR ---------------- */
  .nav-links {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 80px;
    transition: left 0.35s ease;
    z-index: 2000;
    overflow-y: auto;
  }

  .nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 15px 25px;
    width: 100%;
  }

  .nav-links.active {
    left: 0;
  }

  /* Overlay */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    z-index: 1999;
  }

  .overlay.active {
    display: block;
  }

  /* Dropdown */
  .dropdown {
    width: 100%;
  }

  .dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .dropdown-content {
    display: none;
    flex-direction: column;
    background: #111;
    width: 100%;
    border-left: 2px solid #333;
  }

  .dropdown-content a {
    padding: 12px 40px;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .dropdown-content a:hover {
    background: #222;
    color: #fff;
  }

  .dropdown.open .dropdown-content {
    display: flex;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* ====== PAGINA CATEGORIA – 1024px ====== */
@media (max-width: 1024px) {
  .categoria-grid { grid-template-columns: repeat(3, 1fr); }
  .categoria-titolo { font-size: 1.6rem; margin-bottom: 30px; }
  .info h3, .info .price { font-size: 0.9rem; }
  .fav-btn { width: 30px; height: 30px; }
  .fav-btn img { width: 15px; height: 15px; }
}

/* ====== CATEGORIA 768px ====== */
@media (max-width: 768px) {
  .categoria-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ====== CATEGORIA 480px ====== */
@media (max-width: 480px) {
  .categoria-grid { grid-template-columns: 1fr; }
}

/* ================= PRODOTTO ================= */
@media (max-width: 768px) {

  .product-detail-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 40px auto 100px;
    padding: 0 20px;
  }

  .product-gallery { position: relative; }
  .main-image { aspect-ratio: 1/1.3; }

  .main-image img {
    width: 100%; height: 100%; object-fit: cover;
  }

  .thumbnail-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .thumb {
    width: 70px;
    height: 90px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .product-info { gap: 10px !important; }
  .product-title { font-size: 1.6rem; }
  .product-category { font-size: 0.8rem; color: #777; }
  .product-price { font-size: 1.4rem; }
  .product-description { font-size: 0.95rem; color: #444; }

  .product-actions { flex-wrap: wrap; gap: 10px; }
  .add-to-cart-btn {
    flex: 1;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border-radius: 30px;
  }

  .fav-btn-2 { width: 48px; height: 48px; }
  .fav-btn-2 .btn-icon {
    width: 22px; height: 22px; filter: invert(1);
  }

  /* Pagamenti */
  .payment-options { margin-top: 25px; text-align: center; }
  .payment-options p { font-size: 0.9rem; }
  .pay-icons { justify-content: center; }
  .pay-icons img { height: 24px; }

  .direct-pay-btn {
    width: 100%; padding: 14px; border-radius: 30px;
  }

  /* Rimuovi frecce */
  .hero-prev, .hero-next,
  .swiper-button-prev, .swiper-button-next,
  .slider-arrow { display: none !important; }
}

/* ========= BUY BAR ========= */
@media (max-width: 768px) {
  .mobile-buy-bar {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  }

  .mobile-buy-bar .price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000;
  }

  .mobile-buy-bar .buy-now-btn {
    background: #000;
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .mobile-buy-bar .buy-now-btn:hover {
    background: #333;
  }
}

/* ========== HERO ARROWS ========== */
@media (max-width: 768px) {
  .carousel-btn,
  .carousel-btn.prev,
  .carousel-btn.next {
    display: none !important;
  }
}

/* ========== CATEGORY TITLE LINES ========== */
@media (max-width: 768px) {
  .categoria-titolo::before,
  .categoria-titolo::after {
    width: 25px;
    background: #ccc;
    transform: translateY(-50%);
  }
}
/* ===== FIX DROPDOWN MOBILE ===== */
@media (max-width: 768px) {

  /* Disattiva comportamento desktop */
  .dropdown:hover .dropdown-content {
    display: none !important;
  }

  /* Dropdown mobile corretto */
  .dropdown-content {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    background: #111 !important;
    border: none !important;
    border-left: 2px solid #333 !important;
  }

  .dropdown.open .dropdown-content {
    display: flex !important;
    flex-direction: column;
  }

  .dropdown-content a {
    padding: 12px 25px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #ccc !important;
  }
}
