/********************************************************
  CATALOGO
  - Sidebar sinistra, colonna prodotti destra
  - Barra di ricerca
  - Flip card
********************************************************/

* {
  -webkit-tap-highlight-color: transparent;
}
.nav-item,
.search-btn {
  outline: none!important;
  border: none!important;
  box-shadow: none!important;
}

body {
  margin: 0; padding: 0;
  font-family: "Poppins", sans-serif;
  background: #000;
}

/* Il pulsante-lente è nascosto su desktop di default */
.filter-btn {
  display: none;
}

/* ------------------------------- HEADER --------------------------------- */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 9999;
  height: 96px; display: flex; align-items: center;
  padding: 0 32px;
  background: linear-gradient(90deg,#f9f295 0%,#e0aa3e 100%);
}
.logo {
  width: 96px; height: 96px;
}
.nav-links {
  margin: 0 auto; display: flex; gap: 30px;
}
.nav-item {
  font-family: "Inter",sans-serif;
  font-size: 16px;
  color: #1e1e1e;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 9999px;
  transition: background-color 0.2s, transform 0.2s, color 0.2s;
}
.nav-item:hover {
  background: #fff; color: #1e1e1e;
}
.nav-item.active {
  background: #fff!important; color: #1e1e1e!important;
}

/* ----------------------- PAGINA + DECORAZIONI --------------------------- */
.catalog-page {
  width: 100%; min-height: 100vh;
  background: url("https://odryeivy.top/wp-content/uploads/2025/04/Progetto-senza-titolo-42-7.png")
    no-repeat right top, #000;
}

/* ---------------- WRAPPER (sidebar + colonna prodotti) ------------------ */
.catalog-wrapper {
  position: relative; z-index: 0;
  display: flex;
  padding-top: 96px;  /* altezza header fisso */
  min-height: 100vh;
}

/* Sfondo + velo nero dietro alla colonna destra */
.catalog-wrapper::before {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 300px;
  z-index: -1;
  background:
    linear-gradient(rgba(0,0,0,.60),rgba(0,0,0,.60)),
    url("https://odryeivy.top/wp-content/uploads/2025/04/ChatGPT-Image-15-apr-2025-19_32_44.png") center top/cover no-repeat,
    #000;
}

/* ------------------------------- SIDEBAR -------------------------------- */
.catalog-sidebar {
  width: 300px;
  background: #111;
  border-right: 2px solid #444;
  margin-top: -96px; /* risale sotto l’header */
  padding: 116px 20px 20px;
  box-sizing: border-box;

  /* su mobile useremo transform: translateX() per nasconderla/aprirla */
  transition: transform 0.3s ease;
}
/* la classe .open => sidebar visibile su mobile */
.catalog-sidebar.open {
  transform: translateX(0);
}

/* ------------------------------ SEARCH ---------------------------------- */
.search-box {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.search-input {
  flex: 1;
  background: #1e1e1e; color: #fff;
  border-radius: 4px;
  padding: 8px;
}
.search-input:focus {
  outline: 2px solid #e0aa3e;
}
.search-btn {
  background: #e0aa3e; color: #1e1e1e;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer; font-weight: 500;
}

/* ---------------------------- CATEGORIE --------------------------------- */
.catalog-categories {
  list-style: none; margin: 0; padding: 0;
}
.catalog-categories li {
  padding: 10px 0; color: #fff;
  cursor: pointer; transition: color 0.2s;
}
.catalog-categories li:hover {
  color: #f0d977;
}

/* --------------------------- COLONNA PRODOTTI --------------------------- */
.product-section {
  flex: 1 1 auto;
  min-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 20px 60px;
  background: none;  /* sfondo gestito dal wrapper */
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* ----------------------------- FLIP CARD ------------------------------- */
.flip-card {
  perspective: 1000px;
   position: relative;
  z-index: 1;
  
}
.flip-card-inner {
  width: 100%; height: 300px;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}
.flip-card-front,
.flip-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
}
.flip-card-front {
  background: linear-gradient(180deg,#f0d977 0%,#e0aa3e 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #1e1e1e; font-size: 14px; font-weight: 500;
  padding: 20px;
}
.flip-card-front img {
  width: 140px; height: 140px;
  object-fit: contain; margin-bottom: 12px;
}
.flip-card-front h3 {
  margin: 0; font-size: 14px; text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}

.flip-card-back {
  background: #333; color: #fff; padding: 20px;
  transform: rotateY(180deg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; font-size: 14px;
}
.flip-card-back h3.product-back-title {
  margin: 0 0 12px; font-size: 14px; line-height: 1.2;
}
.flip-card-back p {
  margin-bottom: 20px; line-height: 1.4;
}
.flip-card-back a.btn-quote {
  background: #e0aa3e; color: #1e1e1e;
  padding: 10px 20px; border-radius: 4px;
  text-decoration: none; font-weight: 500;
  transition: background-color 0.2s;
}
.flip-card-back a.btn-quote:hover {
  background: #f0d977;
}

.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

/* ------------------------------ NO RESULTS ----------------------------- */
.no-results {
  text-align: center; color: #fff;
}
.no-results h2 {
  font-size: 24px; margin-bottom: 10px;
}
.no-results p {
  margin-bottom: 20px;
}

/* ----------------------------- RESPONSIVE ------------------------------ */
@media (max-width: 991px) {
  /* Mobile => sidebar è nascosta a sx di default */
  .catalog-sidebar {
    position: fixed; top: 96px; left: 0; bottom: 0;
    transform: translateX(-100%);
    margin-top: 0; border-right: none;
    z-index: 9998;
  }

  /* Lente in basso a dx */
  .filter-btn {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #f0d977;
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
  }

  /* L’overlay scuro parte da sinistra */
  .catalog-wrapper::before {
    left: 0;
  }
}
