/* ===================================
   IL GUSTO DELLA COSTA — STILE CONDIVISO
   Design: Costa d'Oro — Luxury Mediterraneo
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Jost:wght@300;400;500;600&display=swap');

/* ── RESET & BASE ─────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0B1D3A;
  --navy-mid:   #142847;
  --gold:       #C9A456;
  --gold-light: #E8C97A;
  --gold-pale:  #F5E9C8;
  --cream:      #F8F2E4;
  --cream-dark: #EDE3CC;
  --sage:       #8FA67C;
  --rust:       #C05E3B;
  --text:       #1C1C2E;
  --text-mid:   #4A4A60;
  --text-light: #8A8A9A;
  --white:      #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', 'Helvetica Neue', sans-serif;

  --radius-sm:  6px;
  --radius-md:  14px;
  --radius-lg:  28px;

  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 8px 40px rgba(11,29,58,0.12);
  --shadow-hover: 0 20px 60px rgba(11,29,58,0.22);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: var(--font-body); }
ul { list-style: none; }

/* ── TYPOGRAPHY ───────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }
h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); font-weight: 300; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 400; }
h4 { font-size: 1.2rem; font-weight: 500; }
p  { font-weight: 300; line-height: 1.75; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.gold { color: var(--gold); }

/* ── NAV ──────────────────────────── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  transition: background var(--transition), box-shadow var(--transition);
}
#main-nav.scrolled {
  background: rgba(11,29,58,0.97);
  box-shadow: 0 2px 30px rgba(0,0,0,0.3);
}
#main-nav.light {
  background: transparent;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-logo img {
  width: auto;
  height: 60px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,0.4));
}
.nav-logo-text {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 100%;
  height: 1px;
  background: var(--gold);
  transition: right var(--transition);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { right: 0; }
.nav-links a.active { color: var(--gold); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cart-btn {
  position: relative;
  background: transparent;
  color: var(--cream);
  padding: 0.5rem;
  font-size: 1.2rem;
  transition: color var(--transition);
}
.cart-btn:hover { color: var(--gold); }
.cart-count {
  position: absolute;
  top: 0; right: 0;
  width: 18px; height: 18px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(4px,-4px);
  opacity: 0;
  transition: opacity var(--transition);
}
.cart-count.visible { opacity: 1; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  padding: 0.5rem;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cream);
  transition: var(--transition);
}

/* ── MOBILE MENU ──────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: transparent;
  color: var(--cream);
  font-size: 1.8rem;
  line-height: 1;
}

/* ── CART DRAWER ──────────────────── */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  z-index: 1100;
  background: var(--white);
  box-shadow: -10px 0 60px rgba(0,0,0,0.2);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-overlay {
  position: fixed; inset: 0; z-index: 1099;
  background: rgba(11,29,58,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h3 { font-size: 1.3rem; }
.cart-close { background: transparent; font-size: 1.5rem; color: var(--text-mid); }

.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-empty { text-align: center; color: var(--text-light); padding: 3rem 0; }
.cart-empty .icon { font-size: 3rem; margin-bottom: 1rem; }

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cream-dark);
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item-info h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.25rem; }
.cart-item-info p { font-size: 0.85rem; color: var(--gold); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.cart-item-qty button { width: 24px; height: 24px; border-radius: 50%; background: var(--cream); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.cart-item-qty span { font-weight: 600; font-size: 0.9rem; min-width: 20px; text-align: center; }
.cart-item-remove { color: var(--text-light); font-size: 1.1rem; background: transparent; transition: color var(--transition); }
.cart-item-remove:hover { color: var(--rust); }

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--cream-dark);
  background: var(--cream);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}
.cart-total .label { font-size: 1rem; color: var(--text-mid); }
.cart-total .amount { font-size: 1.6rem; font-weight: 600; color: var(--navy); }

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: #25D366;
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: background var(--transition);
}
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-whatsapp svg { width: 22px; height: 22px; }

/* ── BUTTONS ──────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(201,164,86,0.4); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.btn-navy {
  background: var(--navy);
  color: var(--cream);
}
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-2px); }

.btn-add-cart {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}
.btn-add-cart:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); }

/* ── SECTION BASE ─────────────────── */
.section { padding: 6rem 2rem; }
.section-narrow { max-width: 900px; margin: 0 auto; text-align: center; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

.section-title {
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-mid);
  max-width: 600px;
  margin: 0 auto 3.5rem;
  font-weight: 300;
}

/* ── PAGE HERO (subpages) ─────────── */
.page-hero {
  position: relative;
  height: 50vh;
  min-height: 360px;
  background: var(--navy);
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 3rem;
}
.page-hero-content .eyebrow { margin-bottom: 0.75rem; }
.page-hero-content h1 { color: var(--cream); font-size: clamp(2.5rem, 5vw, 4.5rem); }

/* ── PRODUCT CARD ─────────────────── */
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.product-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.07); }

.product-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.badge-new { background: var(--gold); color: var(--navy); }
.badge-bio { background: var(--sage); color: var(--white); }

.product-card-body {
  padding: 1.2rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.product-card-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}
.product-card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy);
}
.product-card-desc {
  font-size: 0.84rem;
  color: var(--text-mid);
  flex: 1;
}
.product-card-footer {
  padding: 0 1.4rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.product-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
}
.product-price sup { font-size: 0.8rem; vertical-align: super; }

/* ── GRID ─────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── FILTER BAR ───────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.filter-btn {
  padding: 0.55rem 1.3rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--white);
  color: var(--text-mid);
  border: 1.5px solid var(--cream-dark);
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

/* ── DIVIDER ──────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
}
.divider-icon { font-size: 1.2rem; opacity: 0.7; }

/* ── FOOTER ───────────────────────── */
#main-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 5rem 2rem 2rem;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .nav-logo-text { font-size: 1.4rem; margin-bottom: 1.5rem; }
.footer-brand p { font-size: 0.9rem; color: rgba(248,242,228,0.6); line-height: 1.8; }
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(248,242,228,0.7);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-contact p {
  font-size: 0.88rem;
  color: rgba(248,242,228,0.7);
  margin-bottom: 0.5rem;
}
.footer-contact a { color: rgba(248,242,228,0.7); transition: color var(--transition); }
.footer-contact a:hover { color: var(--gold); }
.social-links { display: flex; gap: 1rem; margin-top: 1.5rem; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--cream);
  transition: var(--transition);
  font-size: 1rem;
}
.social-link:hover { border-color: var(--gold); color: var(--gold); }

.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(248,242,228,0.4); }
.footer-bottom a { color: rgba(248,242,228,0.4); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--gold); }

/* ── SCROLL REVEAL ────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── TOAST ────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  color: var(--cream);
  padding: 0.9rem 1.8rem;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
  border-left: 3px solid var(--gold);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── RESPONSIVE ───────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 4rem 1.25rem; }
  .page-hero-content { padding: 0 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { display: none; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cart-drawer { width: 100vw; }
}