/* =====================================================
   ORDINA – IMPOSTAZIONI GENERALI
===================================================== */

.ordina-page > section,
.ordina-page > nav {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}


.ordina-page {
  padding: 2rem 0 4rem;
}


/* =====================================================
   HERO
===================================================== */

.ordina-hero {
  margin-bottom: 2rem;
}

.ordina-hero h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.ordina-hero p {
  max-width: 620px;
  color: #555;
  font-size: 1.1rem;
}

/* =====================================================
   TAB CATEGORIE
===================================================== */

.ordina-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2rem 0 3rem;
}

.ordina-tab {
  appearance: none;
  border: 1px solid #ddd;
  background: #fff;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}

.ordina-tab:hover {
  border-color: #f2c400;
  color: #f2c400;
}

.ordina-tab.is-active {
  background: #f2c400;
  border-color: #f2c400;
  color: #111;
  font-weight: 600;
}

/* =====================================================
   GRIGLIA PRODOTTI
===================================================== */

.ordina-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem;
}

/* =====================================================
   CARD PRODOTTO
===================================================== */

.ordina-product {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.ordina-thumb {
  display: block;
  overflow: hidden;
  border-radius: 14px;
}

.ordina-thumb img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.ordina-product:hover .ordina-thumb img {
  transform: scale(1.05);
}

.ordina-title {
  margin: 0.9rem 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111;
}

.ordina-price {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: #111;
}

/* =====================================================
   ADD TO CART
===================================================== */

.ordina-actions {
  margin-top: auto;
}

.ordina-actions .button,
.ordina-actions button {
  background: #f2c400;
  color: #111;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ordina-actions .button:hover,
.ordina-actions button:hover {
  background: #ddb200;
}

/* =====================================================
   NASCONDERE ROBE INUTILI WOO
===================================================== */

.woocommerce-result-count,
.woocommerce-ordering {
  display: none !important;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {
  .ordina-hero h1 {
    font-size: 2.2rem;
  }

  .ordina-products {
    gap: 1.8rem;
  }

  .ordina-thumb img {
    height: 200px;
  }
}


/* ==============================
   HOVER CARD SEXY
================================ */

.ordina-product {
  position: relative;
}

.ordina-actions {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
}

.ordina-product:hover .ordina-actions {
  opacity: 1;
  transform: translateY(0);
}

.ordina-actions .button,
.ordina-actions button {
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}


/* ==============================
   MINI CART STICKY
================================ */

.mini-cart {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #111;
  color: #fff;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 999;
  transition: transform 0.2s ease;
}

.mini-cart:hover {
  transform: translateY(-3px);
}

.mini-cart-count {
  background: #f2c400;
  color: #111;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}



/* ==============================
   MOBILE REFINEMENT
================================ */

@media (max-width: 600px) {

  .ordina-tabs {
    overflow-x: auto;
    padding-bottom: 0.4rem;
    gap: 0.4rem;
  }

  .ordina-tab {
    white-space: nowrap;
    font-size: 0.9rem;
  }

  .ordina-hero p {
    font-size: 1rem;
  }

  .mini-cart {
    right: 16px;
    bottom: 16px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }
}

/* ==============================
   MINI CART +1 ANIMATION
================================ */

.mini-cart-count.pulse {
  animation: pulse 0.6s ease;
}

@keyframes pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ==============================
   CATEGORY TRANSITION
================================ */

.ordina-product {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ordina-product.is-hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}


/* ==============================
   SKELETON LOADER
================================ */

.ordina-skeleton {
  background: #eee;
  border-radius: 14px;
  height: 320px;
  animation: pulse-skeleton 1.2s infinite ease-in-out;
}

@keyframes pulse-skeleton {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}


/* ==============================
   TOAST AGGIUNTO
================================ */

.ordina-toast {
  position: fixed;
  bottom: 90px;
  right: 24px;
  background: #111;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.ordina-toast.show {
  opacity: 1;
  transform: translateY(0);
}


/* ==============================
   STICKY HEADER
================================ */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
}


/* ==============================
   PROGRESS BAR LOADING
================================ */

.ordina-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px; /* ERA 3px */
  width: 0;
  background: linear-gradient(
    90deg,
    #f2c400,
    #ffde59
  );
  z-index: 10000;
  transition: width 0.25s ease;
}
/* ==============================
   BADGE PIÙ VENDUTO
================================ */

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* ==============================
   BREADCRUMB Woo - FIX REALE
================================ */

.woocommerce-breadcrumb {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* link */
.woocommerce-breadcrumb a {
  color: #555;
  text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
  color: #111;
  text-decoration: underline;
}

/* separatore "/" (gestito come testo) */
.woocommerce-breadcrumb {
  word-spacing: 0.2rem;
}

/* ultimo elemento (categoria) */
.woocommerce-breadcrumb {
  font-weight: 400;
}
.woocommerce-breadcrumb a:last-of-type + * {
  font-weight: 600;
  color: #111;
}


/* ==============================
   BREADCRUMB CATEGORY PILL
================================ */

.woocommerce-breadcrumb :last-child {
  background: #f2c400;
  color: #111;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.ordina-tab-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ordina-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

.ordina-subcats {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ordina-subbadge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  background: #f5f5f5;
  border-radius: 999px;
  color: #555;
}

/* === SUBCATEGORY BADGES INTERACTIVE === */
.ordina-subbadge {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ordina-subbadge:hover {
  transform: translateY(-2px);
  background: #eee;
}

/* TOOLTIP */
.ordina-subbadge::after {
  content: attr(data-count) ' prodotti';
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  font-size: 0.65rem;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ordina-subbadge:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}


/* === STATO ATTIVO === */
.ordina-tab.is-active {
  background: #f2c400;
  color: #111;
}

.ordina-subbadge.is-active {
  background: #f2c400;
  color: #111;
  font-weight: 600;
}

.ordina-results-count {
  font-weight: 500;
}

/* ===== QUICK OVERLAY ===== */
.ordina-product {
  position: relative;
  overflow: hidden;
}

.ordina-quick-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  /* overlay più elegante e leggero */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.55)
  );

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}


.ordina-product:hover .ordina-quick-overlay,
.ordina-product.is-touched .ordina-quick-overlay {
  opacity: 1;
  pointer-events: auto;
}

.quick-info {
  background: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.quick-price {
  font-weight: 600;
  color: #111;
}

.quick-add {
  background: linear-gradient(
    135deg,
    #f2c400,
    #f7d23a
  );

  border: none;
  border-radius: 999px;
  padding: 0.35rem 1rem;

  font-weight: 600;
  font-size: 0.85rem;
  color: #111;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

/* hover desktop */
.ordina-product:hover .quick-add {
  background: linear-gradient(
    135deg,
    #f7d23a,
    #f2c400
  );

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.2);
}

/* feedback tap mobile */
.quick-add:active {
  transform: scale(0.95);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15);
}


/* L'overlay visibile NON blocca i click */
.ordina-quick-overlay {
  pointer-events: none;
}

/* SOLO il box centrale intercetta i click */
.ordina-quick-overlay .quick-info {
  pointer-events: auto;
}


/* ===== SIDE PANEL ===== */
.ordina-sidepanel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.ordina-sidepanel.is-open {
  display: block;
}

/* overlay scuro */
.sidepanel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

/* pannello */
.sidepanel-content {
  position: absolute;
  right: 0;
  top: 0;
  width: 420px;
  max-width: 100%;
  height: 100%;
  background: #fff;

  /* effetto app / material */
  transform: translateX(100%) scale(0.96);
  transform-origin: right center;

  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease;

  display: flex;
  flex-direction: column;

  /* profondità premium */
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.25);
}

.ordina-sidepanel.is-open .sidepanel-content {
  transform: translateX(0);
}

.sidepanel-close {
  align-self: flex-end;
  border: none;
  background: transparent;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
}

.sidepanel-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* ===== LENTE DETTAGLI ===== */
.ordina-open-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* mostra lente solo su hover/tap */
.ordina-product:hover .ordina-open-panel,
.ordina-product.is-touched .ordina-open-panel {
  opacity: 1;
  transform: scale(1);
}


/* ===== SIDE PANEL PRODUCT ===== */

.sidepanel-product img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.sidepanel-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.sidepanel-price {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.sidepanel-excerpt {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

.sidepanel-product button {
  width: 100%;
  padding: 0.7rem;
  border-radius: 999px;
}


/* ===== WOW SIDE PANEL ===== */

.sidepanel-content {
  border-radius: 24px 0 0 24px;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.25);
}

/* immagine hero */
.sidepanel-product img {
  border-radius: 18px;
  margin-bottom: 1.2rem;
  object-fit: cover;
  max-height: 260px;
}

/* contenitore */
.sidepanel-product {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* titolo */
.sidepanel-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

/* prezzo */
.sidepanel-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
}

/* descrizione */
.sidepanel-excerpt {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.5;
}

/* CTA */
.sidepanel-product .button {
  margin-top: 1rem;
  background: linear-gradient(135deg, #f2c400, #f7d23a);
  border-radius: 999px;
  padding: 0.8rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}


/* HERO IMAGE */
.sidepanel-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  max-height: 280px;
}

.sidepanel-hero img {
  width: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 0.6s ease, opacity 0.6s ease;
  opacity: 0.9;
}

/* quando il panel è aperto */
.ordina-sidepanel.is-open .sidepanel-hero img {
  transform: scale(1);
  opacity: 1;
}

.sidepanel-footer {
  position: sticky;
  bottom: 0;

  background: #fff;
  padding: 1rem 1.5rem;

  border-top: 1px solid #eee;
  box-shadow: 0 -8px 20px rgba(0,0,0,0.12);
}

.sidepanel-footer .button {
  width: 100%;
  border-radius: 999px;
  padding: 0.9rem;
  font-weight: 700;
}

.ordina-product {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ordina-product.is-opening {
  transform: scale(0.96);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.ordina-mode-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.ordina-mode-switch button {
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.ordina-mode-switch button.is-active {
  background: #f2c400;
  border-color: #f2c400;
  font-weight: 600;
}

.sidepanel-suggestion {
  background: #f5f5f5;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
}