/* ══════════════════════════════════════
   SINGOLO PRODOTTO — FM2
══════════════════════════════════════ */

.fm2-product-page {
  padding-top: var(--header-h);
  background: #fff;
}

/* ── Breadcrumb ── */
.fm2-product-breadcrumb {
  padding: 1rem 60px;
  font-size: 0.9rem;
  color: #aaa;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}
.fm2-product-breadcrumb a { color: #aaa; transition: color 0.2s; }
.fm2-product-breadcrumb a:hover { color: var(--red); }
.woocommerce-breadcrumb { margin: 0; }

/* ── Sezione top ── */
.fm2-product-top { background: #fff; }
.fm2-product-top-inner {
  display: grid;
  grid-template-columns: 800px 1fr;
  gap: 80px;
  padding: 56px 60px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

/* ── Galleria ── */
.fm2-product-gallery {
  background: #f7f8fa;
  border-radius: 6px;
  padding: 0px;
}
.fm2-product-gallery .woocommerce-product-gallery { margin: 0 !important; }
.fm2-product-gallery .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ── Info prodotto ── */
.fm2-product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 12px;
}
.fm2-product-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--red);
}
.fm2-product-category a { color: var(--red); transition: opacity 0.2s; }
.fm2-product-category a:hover { opacity: 0.7; }

.fm2-product-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}
.fm2-product-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fm2-product-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--navy);
  background: rgba(0, 39, 87, 0.07);
  padding: 5px 12px;
  border-radius: 2px;
}
.fm2-product-tag a { color: inherit; }

/* ── Descrizione ── */
.fm2-product-description {
  background: #f7f8fa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.fm2-product-description-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 64px 60px;
}
.fm2-product-description-inner p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.85;
  margin-bottom: 1.4rem;
}
.fm2-product-description-inner p:last-child { margin-bottom: 0; }
.fm2-product-description-inner strong { color: var(--navy); font-weight: 600; }
.fm2-product-description-inner h2 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red);
  margin: 2.4rem 0 0.8rem;
  border: none;
}
.fm2-product-description-inner h2:first-child { margin-top: 0; }

/* ── Prodotti correlati ── */
.fm2-product-related {
  max-width: 1400px;
  margin: 0 auto;
  padding: 64px 60px;
}
.fm2-related-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--navy);
  margin-bottom: 36px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.fm2-related-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}
.fm2-related-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.fm2-related-item:hover { transform: translateY(-5px); }
.fm2-related-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f7f8fa;
  border-radius: 4px;
  padding: 16px;
  transition: background 0.2s;
}
.fm2-related-item:hover .fm2-related-img { background: #eef0f4; }
.fm2-related-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
  text-align: center;
  line-height: 1.4;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fm2-related-item:hover .fm2-related-name { color: var(--red); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1200px) {
  .fm2-product-top-inner { grid-template-columns: 560px 1fr; gap: 48px; padding: 48px 40px; }
}
@media (max-width: 1024px) {
  .fm2-product-top-inner { grid-template-columns: 1fr; gap: 32px; padding: 36px 24px; }
  .fm2-product-gallery { max-width: 480px; }
  .fm2-related-grid { grid-template-columns: repeat(3, 1fr); }
  .fm2-product-description-inner { padding: 48px 40px; }
  .fm2-product-related { padding: 48px 40px; }
}
@media (max-width: 768px) {
  .fm2-product-breadcrumb { padding: 0.8rem 20px; }
  .fm2-product-top-inner { padding: 28px 20px; }
  .fm2-product-title { font-size: 1.6rem; }
  .fm2-product-description-inner { padding: 36px 20px; }
  .fm2-product-related { padding: 36px 20px; }
  .fm2-related-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
/* ── Nascondi lente e numerazione galleria ── */
.woocommerce-product-gallery__trigger { display: none !important; }
.flex-control-nav li::before,
.flex-control-nav li a::before,
ol.flex-control-nav { list-style: none !important; counter-reset: none !important; }
.flex-control-nav li { counter-increment: none !important; }

/* ── Thumbnails: 3 colonne ── */
.flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin-top: 12px !important;
}
.flex-control-thumbs li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.flex-control-thumbs li img {
  width: 100% !important;
  height: auto !important;
  cursor: pointer !important;
  opacity: 0.6;
  transition: opacity .2s;
}
.flex-control-thumbs li img.flex-active,
.flex-control-thumbs li img:hover {
  opacity: 1;
}
.woocommerce-product-gallery__image a {
  cursor: zoom-in !important;
  pointer-events: auto !important;
}
/* ── Sezione galleria ── */
.fm2-product-gallery-section {
  background: #f7f8fa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 48px 60px;
}
.fm2-product-gallery-inner {
  max-width: 1400px;
  margin: 0 auto;
}
.fm2-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.fm2-gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #eee;
  transition: box-shadow .25s, border-color .25s;
}
.fm2-gallery-item:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  border-color: #ccc;
}
.fm2-gallery-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px;
}
.fm2-gallery-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform .3s ease;
}
.fm2-gallery-item:hover .fm2-gallery-img-wrap img {
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .fm2-product-gallery-section { padding: 40px; }
  .fm2-gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .fm2-product-gallery-section { padding: 32px 20px; }
  .fm2-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
@media (max-width: 480px) {
  .fm2-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Nasconde thumbnails WooCommerce — galleria gestita da FM2 */
.fm2-product-gallery .flex-control-thumbs {
  display: none !important;
}