/*
Theme Name: SUSA Aromàtiques
Theme URI: https://susa.cat
Author: SUSA Aromàtiques
Description: Tema WordPress de SUSA Aromàtiques — Infusions artesanes de les Guilleries. Inclou formulari de contacte connectat a Forminit que envia les sol·licituds a info@susa.cat.
Version: 1.0.1
License: GPL-2.0-or-later
Text Domain: susa
*/

/* === Design tokens === */
:root {
  --background: hsl(40 35% 96%);
  --foreground: hsl(140 18% 14%);
  --card: hsl(40 40% 98%);
  --primary: hsl(140 28% 22%);
  --primary-fg: hsl(40 40% 97%);
  --secondary: hsl(36 30% 90%);
  --muted-fg: hsl(140 10% 38%);
  --accent: hsl(32 45% 48%);
  --terra: hsl(20 30% 38%);
  --gold: hsl(36 55% 55%);
  --cream: hsl(40 45% 94%);
  --forest-deep: hsl(145 30% 12%);
  --border: hsl(36 20% 84%);
  --radius: 0.75rem;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

.eyebrow { font-size: 0.7rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.9rem; }
.text-balance { text-wrap: balance; }
em.gold { color: var(--gold); font-style: normal; }
em.accent { color: var(--accent); font-style: italic; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  transition: all 0.2s ease; font-family: var(--font-body); font-weight: 500;
}
.btn-gold { background: var(--gold); color: #1a1a1a; }
.btn-gold:hover { filter: brightness(0.95); color: #1a1a1a; }
.btn-cream { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-cream:hover { background: var(--cream); color: var(--forest-deep); }
.product .btn-cream { background: transparent; color: var(--forest-deep); border-color: var(--forest-deep); }
.product .btn-cream:hover { background: var(--forest-deep); color: var(--cream); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--forest-deep); color: var(--primary-fg); }
.btn-hero { background: var(--accent); color: #fff; }
.btn-hero:hover { background: var(--terra); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 0.95rem; }

/* === Header === */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(250, 247, 240, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-size: 1.4rem; color: var(--primary); }
.brand img { height: 32px; width: auto; }
.brand .accent { color: var(--accent); font-style: italic; }
.nav-links { display: none; gap: 2rem; }
.nav-links a { font-size: 0.875rem; color: rgba(20,20,20,0.8); }
@media (min-width: 768px) { .nav-links { display: flex; } .menu-toggle, .mobile-menu { display: none !important; } }
.cta-buy { display: none; height: 36px; padding: 0 1.25rem; background: var(--primary); color: var(--primary-fg); border-radius: 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em; align-items: center; }
@media (min-width: 768px) { .cta-buy { display: inline-flex; } }
.menu-toggle { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0.5rem; }
.mobile-menu { display: none; border-top: 1px solid var(--border); background: var(--background); }
.mobile-menu.open { display: block; }
.mobile-menu .container { padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }

/* === Hero === */
.hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,40,25,0.92) 5%, rgba(15,40,25,0.35) 55%, transparent 100%); }
.hero .content { position: relative; padding: 8rem 1.5rem 5rem; color: var(--cream); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: 0.98; max-width: 60rem; }
.hero-title span,
.hero-title em { display: block; }
.hero-title em { margin-top: 0.12em; }
.hero p.lead { margin-top: 1.75rem; max-width: 32rem; font-size: 1.05rem; color: rgba(244, 238, 224, 0.88); line-height: 1.6; }
.hero .actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 1rem; }

@media (max-width: 520px) {
  .hero { min-height: 88vh; }
  .hero .content { padding: 7.5rem 1.5rem 3.5rem; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.25rem); line-height: 0.92; }
  .hero p.lead { font-size: 1rem; max-width: 19rem; }
}

/* === Sections === */
section { padding: 5rem 0; }
@media (min-width: 768px) { section { padding: 7rem 0; } }
section.alt { background: rgba(232, 222, 200, 0.35); }
section.alt-2 { background: rgba(232, 222, 200, 0.5); }

.section-head { max-width: 40rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); color: var(--primary); line-height: 1.1; }
.section-head p { margin-top: 1rem; color: var(--muted-fg); }

/* === Product grid === */
.products { display: grid; gap: 1.75rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products { grid-template-columns: repeat(3, 1fr); } }
.product {
  background: var(--card); border: 1px solid var(--border); border-radius: 1rem;
  overflow: hidden; box-shadow: 0 2px 24px -8px rgba(20,40,30,0.12);
  display: flex; flex-direction: column;
}
.product .img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--cream); }
.product .img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.6s ease; }
.product:hover .img img { transform: scale(1.03); }
.product .body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product h3 { font-size: 1.75rem; color: var(--primary); }
.product .tag { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.product .short { color: var(--muted-fg); font-size: 0.92rem; flex: 1; }
.product .product-meta { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: rgba(20,20,20,0.78); margin-top: 0.25rem; }
.product .product-meta .muted { color: var(--muted-fg); }
.product .product-meta p { margin: 0; }
.product .price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 0.5rem; }
.product .price { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); }
.product .format { font-size: 0.78rem; color: var(--muted-fg); }
.product .actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

@media (max-width: 700px) {
  .products { gap: 1.25rem; }
  .product .img { aspect-ratio: 4 / 5; }
  .product .body { padding: 1.25rem; gap: 0.6rem; }
  .product h3 { font-size: 1.5rem; line-height: 1.15; word-break: break-word; }
  .product .tag { font-size: 0.65rem; letter-spacing: 0.25em; }
  .product .short { font-size: 0.88rem; }
  .product .product-meta { font-size: 0.8rem; }
  .product .price { font-size: 1.35rem; }
  .product .price-row { flex-wrap: wrap; gap: 0.35rem; }
  .product .btn { width: 100%; padding: 0.8rem 1rem; font-size: 0.8rem; }
}

/* === Projecte === */
.two-col { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .two-col { grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr); gap: 4rem; } }
.gallery-card { border-radius: 1rem; overflow: hidden; box-shadow: 0 10px 40px -20px rgba(20,40,30,0.3); width: 100%; }
.projecte-carousel { border-radius: 1rem; border: 0; background: var(--cream); width: 100%; height: clamp(460px, 78vw, 640px); }
.projecte-carousel .susa-carousel-track,
.projecte-carousel .susa-slide { height: 100%; }
.projecte-carousel .susa-slide img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center; }
@media (min-width: 1024px) { .projecte-carousel { height: min(76vh, 720px); min-height: 620px; } }
@media (max-width: 700px) { .projecte-carousel { height: clamp(440px, 128vw, 560px); } }
.block-stack > div { margin-bottom: 1.6rem; }
.block-stack h3 { font-size: 1.4rem; color: var(--primary); margin-bottom: 0.4rem; }
.block-stack p { color: var(--muted-fg); }

/* === Activitats === */
.activity-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; margin-bottom: 3rem; }
@media (min-width: 768px) { .activity-grid { grid-template-columns: repeat(3, 1fr); } }
.activity { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 1.75rem; display: flex; flex-direction: column; }
.activity h3 { font-size: 1.65rem; color: var(--primary); margin-bottom: 0.6rem; font-weight: 600; letter-spacing: -0.02em; position: relative; padding-bottom: 0.5rem; }
.activity h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 2.5rem; height: 2px; background: var(--accent); border-radius: 2px; }
.activity p.desc { color: var(--muted-fg); font-size: 0.9rem; flex: 1; }
.activity .meta { margin-top: 1rem; font-size: 0.85rem; color: rgba(20,20,20,0.78); display: flex; flex-direction: column; gap: 0.3rem; }
.activity .meta span::before { content: "• "; color: var(--accent); }
.calendar-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 1024px) { .calendar-grid { grid-template-columns: 1fr 1fr; } }
.calendar-grid img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; border-radius: 1rem; }
.calendar-box { border: 1px dashed var(--border); border-radius: 1rem; padding: 1.5rem; background: rgba(232,222,200,0.4); text-align: center; display: flex; flex-direction: column; align-items: center; }
.calendar-box iframe { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 0.75rem; margin-top: 1rem; }

/* === Contacte === */
.contact-grid { display: grid; gap: 3.5rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 1rem; margin-top: 2.5rem; font-size: 0.95rem; }
.contact-info a, .contact-info p { display: flex; align-items: center; gap: 0.6rem; color: var(--foreground); margin: 0; }
.contact-info .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 999px; }
form.contact {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; padding: 2rem; box-shadow: 0 2px 24px -8px rgba(20,40,30,0.12);
  display: flex; flex-direction: column; gap: 1rem;
}
form.contact .row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { form.contact .row { grid-template-columns: 1fr 1fr; } }
form.contact label { font-size: 0.8rem; font-weight: 500; }
form.contact input, form.contact textarea {
  width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--border);
  border-radius: 0.5rem; background: #fff; font: inherit; color: inherit;
}
form.contact input:focus, form.contact textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
form.contact .field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-note { font-size: 0.75rem; color: var(--muted-fg); }
.form-status { font-size: 0.9rem; }
.form-status.ok { color: #1f7a3c; }
.form-status.err { color: #a4332a; }

/* === Footer === */
footer.site-footer { background: var(--forest-deep); color: var(--cream); padding: 3.5rem 0 0; }
footer.site-footer .grid {
  display: grid; gap: 2.5rem; grid-template-columns: 1fr;
  text-align: center;
}
@media (min-width: 768px) {
  footer.site-footer .grid { grid-template-columns: 2fr 1fr 1fr; text-align: left; }
}
footer .brand-block .brand { color: var(--cream); justify-content: center; }
@media (min-width: 768px) { footer .brand-block .brand { justify-content: flex-start; } }
footer .brand-block img { filter: brightness(0) invert(1); }
footer .brand-block p { margin-top: 1rem; color: rgba(244,238,224,0.7); font-size: 0.9rem; max-width: 24rem; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { footer .brand-block p { margin-left: 0; } }
footer .socials { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }
@media (min-width: 768px) { footer .socials { justify-content: flex-start; } }
footer .socials a { padding: 0.55rem 0.7rem; border: 1px solid rgba(244,238,224,0.3); border-radius: 999px; color: var(--cream); }
footer .socials a:hover { background: rgba(244,238,224,0.1); color: var(--cream); }
footer .col h4 { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; font-family: var(--font-body); font-weight: 500; }
footer .col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; color: rgba(244,238,224,0.8); }
footer .col a:hover { color: var(--gold); }
footer .bottom { border-top: 1px solid rgba(244,238,224,0.15); margin-top: 3rem; padding: 1.5rem 0; font-size: 0.78rem; color: rgba(244,238,224,0.6); }
footer .bottom .container { display: flex; flex-direction: column; gap: 0.4rem; text-align: center; }
@media (min-width: 768px) { footer .bottom .container { flex-direction: row; justify-content: space-between; text-align: left; } }

/* === Animations === */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-up { animation: fadeUp 0.8s ease-out both; }

/* === Product Modal === */
.susa-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.susa-modal.open { display: block; }
.susa-modal-overlay { position: absolute; inset: 0; background: rgba(15,30,20,0.65); backdrop-filter: blur(4px); }
.susa-modal-content {
  position: relative; max-width: 64rem; width: calc(100% - 2rem); max-height: 90vh;
  margin: 5vh auto; background: var(--background); border-radius: 1rem; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4); display: flex; flex-direction: column;
}
.susa-modal-close {
  position: absolute; top: 0.6rem; right: 0.8rem; z-index: 2;
  background: rgba(255,255,255,0.9); border: 0; width: 36px; height: 36px; border-radius: 999px;
  font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--primary);
}
.susa-modal-body { overflow: hidden; display: grid; grid-template-columns: 1fr; min-height: 0; }
@media (min-width: 768px) { .susa-modal-body { grid-template-columns: 1fr 1fr; } }
.susa-modal-body > img.susa-modal-hero { width: 100%; height: 16rem; object-fit: cover; background: var(--cream); display: block; position: static; min-height: 0; }
@media (min-width: 768px) { .susa-modal-body > img.susa-modal-hero { height: 100%; max-height: 90vh; object-fit: cover; } }
.susa-modal-info { padding: 1.75rem; overflow-y: auto; max-height: 80vh; }
@media (min-width: 768px) { .susa-modal-info { padding: 2.5rem; } }
.susa-modal-info .tag { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.susa-modal-info h3 { font-family: var(--font-display); font-size: 2.25rem; color: var(--primary); margin: 0.35rem 0 1.25rem; }
.susa-modal-info h4 { font-family: var(--font-display); font-size: 1.15rem; color: var(--primary); margin: 1.25rem 0 0.4rem; }
.susa-modal-info p { color: var(--muted-fg); font-size: 0.92rem; line-height: 1.6; white-space: pre-line; margin: 0; }
.susa-modal-info .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.susa-modal-info .gallery figure { margin: 0; }
.susa-modal-info .gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 0.4rem; border: 1px solid var(--border); }
.susa-modal-info .gallery figcaption { font-size: 0.65rem; color: var(--muted-fg); font-style: italic; margin-top: 0.2rem; line-height: 1.2; }
/* Carousel */
.susa-carousel { position: relative; overflow: hidden; border-radius: 0.6rem; border: 1px solid var(--border); background: #000; }
.susa-carousel-track { display: flex; transition: transform 0.4s ease; }
.susa-slide { flex: 0 0 100%; margin: 0; position: relative; }
.susa-slide img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.susa-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.5rem 0.75rem; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; font-size: 0.75rem; font-style: italic; }
.susa-carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 2.25rem; height: 2.25rem; border-radius: 999px; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.susa-carousel-btn:hover { background: rgba(0,0,0,0.8); }
.susa-carousel-btn.prev { left: 0.5rem; }
.susa-carousel-btn.next { right: 0.5rem; }
.susa-carousel-dots { position: absolute; bottom: 0.5rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.4rem; }
.susa-dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; border: none; background: rgba(255,255,255,0.5); cursor: pointer; padding: 0; transition: background 0.2s; }
.susa-dot.active { background: #fff; }
.susa-modal-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.susa-modal-footer .price { font-family: var(--font-display); font-size: 1.75rem; color: var(--primary); }
.susa-modal-footer .format { font-size: 0.75rem; color: var(--muted-fg); }
body.modal-open { overflow: hidden; }

@media (max-width: 767px) {
  .susa-modal-content { max-height: 92vh; margin: 4vh auto; overflow-y: auto; }
  .susa-modal-body { overflow: visible; }
  .susa-modal-info { max-height: none; overflow: visible; padding: 1.5rem; }
  .susa-modal-info h3 { font-size: 2rem; line-height: 1.05; }
  .susa-modal-info .susa-carousel { margin-top: 0.5rem; }
  .susa-modal-footer { flex-direction: column; align-items: stretch; }
}
