/* ===================================================================
   FRATELLI GIACOMAZZO | SCHEDE PRODOTTO E CATEGORIE
   01 Variabili  02 Base  03 Intestazione  04 Layout  05 Controlli
   06 Prodotti collegati  07 Footer  08 Responsive
   =================================================================== */
:root
{
  --forest:#113d29;
  --gold:#b88937;
  --cream:#fbfaf5;
  --beige:#f1e7d7;
  --ink:#183d2b;
  --muted:#65746a;
  --line:#e7dfd3;
  --shadow:0 16px 38px rgba(24,53,28,.075)
}

/* 02 Base */
*
{
  box-sizing:border-box
}

html
{
  scroll-behavior:smooth
}

body
{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font:16px/1.62 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  -webkit-font-smoothing:antialiased
}

img
{
  display:block;
  max-width:100%
}

a
{
  text-decoration:none;
  color:inherit
}

button,select,input
{
  font:inherit
}

button
{
  cursor:pointer
}

a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible
{
  outline:3px solid #b88937;
  outline-offset:3px
}

.wrap
{
  width:min(1160px,calc(100% - 36px));
  margin:auto
}

/* 03 Testata */
header
{
  background:#fffefa;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:10;
  box-shadow:0 3px 17px #183a2010
}

.head
{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:78px
}

.brand
{
  display:flex;
  align-items:center;
  gap:12px
}

.brand img
{
  width:58px;
  height:58px;
  object-fit:contain;
  mix-blend-mode:multiply
}

.brand-name
{
  font:700 24px/1.1 Georgia,serif;
  letter-spacing:-.03em
}

.brand-kicker
{
  display:block;
  font-size:10px;
  letter-spacing:.14em;
  color:#9e722d
}

.topnav
{
  display:flex;
  align-items:center;
  gap:14px
}

.topnav a
{
  font-size:13px;
  font-weight:700;
  border-radius:30px;
  padding:10px 13px
}

.topnav a:hover
{
  background:#f2eadc
}

.cart-indicator
{
  background:var(--forest);
  color:white;
  border-radius:30px;
  padding:10px 17px;
  font-size:13px;
  font-weight:750;
  white-space:nowrap
}

/* 04 Breadcrumb, scheda e fotografia */
.breadcrumb
{
  font-size:12px;
  color:var(--muted);
  padding:24px 0 17px
}

.breadcrumb a
{
  text-decoration:underline;
  text-underline-offset:3px
}

.product-layout
{
  display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);
  gap:clamp(20px,5vw,66px);
  align-items:start
}

.photo
{
  background:white;
  border:1px solid var(--line);
  padding:15px;
  border-radius:28px;
  box-shadow:var(--shadow)
}

.photo img
{
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
  border-radius:19px
}

.copy
{
  padding:18px 0
}

.kicker
{
  text-transform:uppercase;
  color:#a87a32;
  font-size:11px;
  letter-spacing:.18em;
  font-weight:750
}

.copy h1
{
  font:normal clamp(35px,4.4vw,62px)/1.08 Georgia,serif;
  letter-spacing:-.035em;
  margin:12px 0 19px
}

.detail
{
  font-size:16px;
  color:#4f6355;
  margin:0 0 22px
}

.price
{
  font-size:clamp(27px,3vw,40px);
  font-weight:800;
  color:var(--forest);
  margin:12px 0 21px
}

.price small
{
  font-size:13px;
  font-weight:500;
  color:var(--muted);
  display:block
}

.tagline
{
  display:flex;
  align-items:center;
  gap:9px;
  color:#617666;
  font-size:13px;
  margin:23px 0 12px
}

.tagline svg
{
  width:20px;
  height:20px;
  flex:none
}

/* 05 Selettori e azioni */
.buy-panel
{
  border:1px solid #e4d8be;
  border-radius:23px;
  background:#fffdf8;
  padding:24px;
  box-shadow:0 7px 25px #253d2810
}

.control-grid
{
  display:grid;
  grid-template-columns:1fr 135px;
  gap:14px
}

.field label
{
  display:block;
  color:#617463;
  font-size:12px;
  font-weight:700;
  margin-bottom:8px
}

.field select,.field input
{
  height:50px;
  width:100%;
  border:1px solid #d8d2c7;
  border-radius:13px;
  background:white;
  color:#173f2a;
  padding:0 12px;
  min-width:0
}

.field input
{
  text-align:center
}

.actions
{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px
}

.primary
{
  background:var(--forest);
  color:white;
  border:1px solid var(--forest);
  border-radius:99px;
  padding:14px 22px;
  font-weight:750;
  box-shadow:0 9px 21px #163c2725
}

.secondary
{
  background:white;
  border:1px solid #d7c69d;
  border-radius:99px;
  padding:14px 18px;
  font-size:14px;
  font-weight:700
}

.primary:hover
{
  background:#205a3d
}

.status
{
  min-height:23px;
  color:#236a45;
  font-size:13px;
  margin-top:10px
}

.micro
{
  font-size:12px;
  color:#6d786e;
  line-height:1.6;
  margin-top:17px
}

.value
{
  font-weight:700
}

.lineup
{
  border-top:1px solid var(--line);
  margin:38px 0 0;
  padding:27px 0 7px
}

.lineup h2
{
  font:normal 32px Georgia,serif;
  margin:4px 0 13px
}

/* 06 Prodotti consigliati */
.related
{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px
}

.related a
{
  display:block;
  background:white;
  border:1px solid var(--line);
  border-radius:19px;
  overflow:hidden;
  box-shadow:0 5px 17px #112e1a10
}

.related img
{
  aspect-ratio:1;
  object-fit:cover;
  width:100%
}

.related strong
{
  display:block;
  font-size:13px;
  line-height:1.35;
  margin:11px 12px 2px
}

.related span
{
  display:block;
  color:#967033;
  font-size:12px;
  font-weight:700;
  margin:0 12px 12px
}

/* 07 Footer */
footer
{
  background:#f1eee5;
  margin-top:45px;
  border-top:1px solid #ded8cb
}

footer .foot
{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  flex-wrap:wrap;
  padding:28px 0
}

footer a
{
  font-size:13px;
  text-decoration:underline;
  text-underline-offset:3px
}

footer .credit
{
  font-size:13px;
  color:#5b705f
}

.foot-links
{
  display:flex;
  flex-wrap:wrap;
  gap:18px
}

/* Category page */
.cat-heading
{
  padding:32px 0 28px
}

.cat-heading h1
{
  font:normal clamp(39px,5vw,64px)/1.1 Georgia,serif;
  margin:10px 0
}

.cat-heading p
{
  max-width:760px;
  color:#617061
}

.category-grid
{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px
}

.category-card
{
  display:block;
  background:#fff;
  border-radius:23px;
  border:1px solid #e6dfd2;
  overflow:hidden;
  box-shadow:var(--shadow)
}

.category-card img
{
  width:100%;
  aspect-ratio:1;
  object-fit:cover
}

.category-card .category-content
{
  padding:17px
}

.category-card strong
{
  font:24px/1.1 Georgia,serif;
  display:block
}

.category-card p
{
  font-size:13px;
  color:var(--muted);
  margin:7px 0
}

.category-card span
{
  font-size:17px;
  font-weight:800;
  color:var(--forest)
}

/* 08 Responsive */
@media(max-width:780px)
{
  .product-layout
  {
    grid-template-columns:1fr
  }

  .copy
  {
    padding-top:0
  }

  .related
  {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

  .category-grid
  {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

  .topnav
  {
    gap:4px
  }

}

@media(max-width:520px)
{
  .wrap
  {
    width:min(100% - 28px,1160px)
  }

  .head
  {
    min-height:68px;
    gap:8px
  }

  .brand img
  {
    width:43px;
    height:43px
  }

  .brand-name
  {
    font-size:16px
  }

  .brand-kicker
  {
    font-size:8px
  }

  .topnav a
  {
    display:none
  }

  .cart-indicator
  {
    padding:8px 11px;
    font-size:11px
  }

  .breadcrumb
  {
    padding-top:19px
  }

  .photo
  {
    padding:9px;
    border-radius:20px
  }

  .photo img
  {
    border-radius:15px
  }

  .copy h1
  {
    font-size:40px
  }

  .buy-panel
  {
    padding:16px
  }

  .control-grid
  {
    grid-template-columns:minmax(0,1fr) 92px;
    gap:10px
  }

  .actions
  {
    flex-direction:column
  }

  .actions button,.actions a
  {
    text-align:center;
    width:100%
  }

  .related
  {
    gap:10px
  }

  .related strong
  {
    font-size:12px
  }

  .category-grid
  {
    gap:10px
  }

  .category-card .category-content
  {
    padding:11px
  }

  .category-card strong
  {
    font-size:18px
  }

  .category-card span
  {
    font-size:14px
  }

}

@media(max-width:520px)
{
  .topnav a.cart-indicator
  {
    display:inline-flex;
    align-items:center
  }

}

@media(prefers-reduced-motion:reduce)
{
  *,*:before,*:after
  {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important
  }

}

/* 09 | COERENZA VISIVA PREMIUM CON LA HOME */
:root
{
  --sans: -apple-system,BlinkMacSystemFont,"Segoe UI Variable","Segoe UI",Arial,sans-serif;
  --serif: "Iowan Old Style",Baskerville,Georgia,serif;
}

body
{
  font-family:var(--sans);
  text-rendering:optimizeLegibility;
}

h1,h2,h3,.brand-name
{
  font-family:var(--serif);
}

@media(min-width:950px)
{
  .head
  {
    min-height:105px;
  }

  .brand img
  {
    width:92px;
    height:88px;
  }

  .brand-name
  {
    font-size:30px;
  }

}

.primary,.secondary,.cart-indicator,.topnav a,.related a
{
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}

.primary,.cart-indicator
{
  background:linear-gradient(130deg,#28754f,#134b32 50%,#0a3021);
  border-color:#397954;
  box-shadow:inset 0 1px 0 #dfffea66,0 8px 20px #0f342425;
}

.secondary
{
  background:linear-gradient(130deg,#fffdf8,#eee1c6);
  border-color:#d9bd7c;
  box-shadow:inset 0 1px 0 #fff,0 5px 17px #1b3d2318;
}

.primary:hover,.secondary:hover,.cart-indicator:hover,.related a:hover
{
  transform:translateY(-2px);
  box-shadow:0 11px 25px rgba(18,52,31,.18);
}

.buy-panel
{
  background:linear-gradient(155deg,#fffef9,#f8f3e8);
  border-color:#deceb0;
  box-shadow:0 13px 32px #102f2016;
}

.photo
{
  box-shadow:0 18px 38px rgba(28,56,32,.13);
}

.photo img
{
  image-rendering:auto;
}

@media(max-width:520px)
{
  .brand img
  {
    width:45px;
    height:45px
  }

  .primary,.secondary
  {
    min-height:48px;
  }

}

@media(prefers-reduced-motion:reduce)
{
  .primary,.secondary,.cart-indicator,.related a
  {
    transition:none!important;
    transform:none!important;
  }

}



/* ====================================================================
   10 | Fotografie delle schede: quadro 1:1 stabile in Safari / Chrome
   La cornice definisce la geometria; l'immagine non puo allungarla.
   ==================================================================== */
.product-layout > .photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  align-self: start;
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 11px solid #fffefa;
  border-radius: 25px;
  background: #fffefa;
  box-shadow: 0 22px 45px rgba(20, 49, 29, .15), 0 4px 11px rgba(20, 49, 29, .08);
}
.product-layout > .photo > img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
  border-radius: 16px;
  transform: none;
}
@media (max-width: 520px) {
  .product-layout > .photo {
    border-width: 8px;
    border-radius: 21px;
    box-shadow: 0 15px 28px rgba(20, 49, 29, .13), 0 3px 8px rgba(20, 49, 29, .06);
  }
  .product-layout > .photo > img { border-radius: 13px; }
}

/* 09 | DESCRIZIONI REALI DELLE SCHEDE PRODOTTO */
.product-story { margin:17px 0 18px;padding:15px 18px;border:1px solid #eadfce;border-radius:16px;background:linear-gradient(155deg,#fffefb,#f9f4e9);box-shadow:0 7px 24px rgba(17,54,34,.04); }
.product-story h2 { margin:0 0 8px; font-size:16px; line-height:1.35;font-family:Georgia,serif;color:#173f2b; }
.product-story p { margin:0 0 6px;font-size:14px;line-height:1.58;color:#405346; }
.product-story p:last-child {margin-bottom:0;}
@media(max-width:550px){.product-story{padding:14px 15px;}.product-story p{font-size:14px;}}


/* 09 | Abbinamenti in prima persona e pulsanti di aggiunta reale */
.lineup .related{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.lineup .related .related-choice{min-width:0;display:flex;flex-direction:column;gap:7px;padding:8px;border:1px solid #e8ddc8;background:#fff;border-radius:17px;box-shadow:0 8px 18px #163d2610}
.lineup .related .related-choice a{display:flex;flex-direction:column;flex:1;min-width:0;gap:5px}
.lineup .related .related-choice img{width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:11px}
.lineup .related .related-choice strong{font-size:14px;color:#214632;line-height:1.25}
.lineup .related .related-choice span{color:#6d756d;font-size:12px}
.cross-add,.cross-cart{border:1px solid #a0bb8d;border-radius:99px;padding:9px 13px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-weight:750;font-size:13px;color:#fff;background:linear-gradient(150deg,#3b7e54,#10432c);box-shadow:inset 0 1px 1px #ffffff44,0 5px 12px #16412622}
.cross-add:hover,.cross-cart:hover{filter:brightness(1.1)}
.cross-status{min-height:20px;color:#205b3a;font-weight:700}
.cross-cart{text-decoration:none}
.suggestion-explain{margin:7px 0 16px;color:#647367;font-size:14px;line-height:1.5}
.category-discover{margin:35px 0;padding:22px;border:1px solid #e6d7bc;border-radius:19px;background:linear-gradient(#fffefa,#f4eadb)}
.category-discover h2{font:500 26px/1.2 Georgia,serif;color:#183c2d;margin:0 0 8px}
.category-discover p{color:#68766a;margin:0 0 16px}
.category-discover-links{display:flex;flex-wrap:wrap;gap:9px}
.category-discover-links a{border:1px solid #d7c9a9;padding:10px 15px;border-radius:99px;font-weight:750;font-size:13px;color:#254631;background:white}
@media(max-width:820px){.lineup .related{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){.lineup .related{gap:8px}.lineup .related .related-choice strong{font-size:12px}.lineup .related .related-choice span{font-size:11px}.cross-add{font-size:12px;padding:8px}}

/* ==============================================================
   11 | Categorie: 6 pagine, foto quadrate senza deformazioni
   La cornice 1:1 comanda l'altezza, non gli attributi HTML
   delle fotografie. L'immagine riempie la cornice (cover).
   ============================================================== */
.category-grid > .category-card {
  min-width:0;
  display:flex;
  flex-direction:column;
  padding:9px;
  background:linear-gradient(165deg,#fffefa 0%,#fff 68%,#faf7ef 100%);
  border:1px solid #e4ddcf;
  border-radius:23px;
  overflow:hidden;
  box-shadow:0 12px 27px rgba(29,60,39,.075),0 2px 6px rgba(29,60,39,.035);
  transition:transform .24s ease,box-shadow .24s ease;
}
.category-grid > .category-card:hover {
  transform:translateY(-3px);
  box-shadow:0 19px 37px rgba(28,57,39,.13),0 5px 11px rgba(28,57,39,.06);
}
.category-grid > .category-card:focus-visible {
  outline:3px solid #b88937;
  outline-offset:4px;
}
.category-card .category-media {
  display:block;
  position:relative;
  width:100%;
  height:auto;
  aspect-ratio:1 / 1;
  min-width:0;
  min-height:0;
  flex:none;
  overflow:hidden;
  border-radius:17px;
  background:#f6f3eb;
  isolation:isolate;
}
.category-card .category-media > img {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  max-width:none;
  max-height:none;
  aspect-ratio:1 / 1;
  display:block;
  object-fit:cover;
  object-position:center center;
  border-radius:17px;
  image-rendering:auto;
}
.category-card .category-content {
  flex:1;
  min-width:0;
  padding:16px 10px 11px;
}
.category-card .category-content strong {
  overflow-wrap:break-word;
  line-height:1.2;
}
.category-card .category-content p {
  margin:8px 0 11px;
}
@media(max-width:520px) {
  .category-grid { gap:12px; }
  .category-grid > .category-card { padding:6px; border-radius:19px; }
  .category-card .category-media,
  .category-card .category-media > img { border-radius:14px; }
  .category-card .category-content { padding:11px 7px 10px; }
  .category-card .category-content strong { font-size:clamp(15px,4.2vw,18px); }
}
@media(prefers-reduced-motion:reduce) {
  .category-grid > .category-card { transition:none; }
  .category-grid > .category-card:hover { transform:none; }
}
