/* ============================================================
   Caribe Izlandz Mart & Kitchen — Global Stylesheet
   New template build (island-mart-v1 candidate) — not forked
   from Template Library. See README.md for full build log.
   ============================================================ */

:root {
  /* Brand palette — extracted from real logo asset */
  --color-gold: #FDD210;      /* primary accent — CTAs, headline highlights */
  --color-red: #D91B12;       /* secondary accent — tags, small details */
  --color-green: #047752;     /* structural — footer, thin rules */
  --color-turquoise: #54C7B3; /* tiny accent only — never a large block */

  /* Neutrals */
  --color-cream: #FBF6EC;     /* base background */
  --color-cream-tint: #F3ECDC;/* alternating section tint */
  --color-charcoal: #2A2622;  /* body text */
  --color-charcoal-deep: #1C1916; /* footer background */
  --color-white: #FFFFFF;

  /* Type */
  --font-display: 'Baloo 2', 'Fredoka', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Radii — rounded corners on all imagery per direction */
  --radius-img: 18px;
  --radius-img-lg: 28px;
  --radius-btn: 999px;

  /* Spacing rhythm */
  --section-pad: 6rem;
  --section-pad-mobile: 3rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }

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

img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-img);
}

.img-lg { border-radius: var(--radius-img-lg); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-charcoal-deep);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(253, 210, 16, 0.35);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-cream);
  color: var(--color-cream);
}

/* ---------- Section rhythm (alternating tint per design principles) ---------- */
.section { padding: var(--section-pad) 0; }
.section--tint { background: var(--color-cream-tint); }
.section--dark {
  background: var(--color-charcoal-deep);
  color: var(--color-cream);
}
.section--dark h2, .section--dark h3 { color: var(--color-white); }

@media (max-width: 768px) {
  .section { padding: var(--section-pad-mobile) 0; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-cream);
  border-bottom: 1px solid rgba(42,38,34,0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo img { height: 84px; border-radius: 0; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
}

.nav-links a {
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  border-color: var(--color-red);
  color: var(--color-red);
}

.nav-cta {
  background: var(--color-red);
  color: var(--color-white) !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--color-charcoal);
}

/* Base mobile-hidden state MUST come before the media query override below,
   or the hamburger menu becomes invisible on real devices (recurring bug —
   see Atlas memory notes on prior quiet-luxury-v1 builds). */
.nav-links { display: flex; }

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-cream);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(42,38,34,0.08);
  }
  .nav-links--open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------- Hero (slideshow) ---------- */
.hero {
  position: relative;
  height: 88vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active { opacity: 1; }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,25,22,0.15) 0%, rgba(28,25,22,0.65) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  padding: 0 1.5rem;
}

.hero-content h1 { color: var(--color-white); margin-bottom: 0.75rem; }
.hero-content p { font-size: 1.15rem; margin-bottom: 1.75rem; max-width: 40ch; }

/* ---------- Featured strip ---------- */
.featured-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.featured-item { text-align: center; }
.featured-item img { aspect-ratio: 1/1; object-fit: cover; width: 100%; margin-bottom: 0.75rem; }
.featured-item h4 { font-size: 1.05rem; }

@media (max-width: 768px) {
  .featured-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Two-column content block ---------- */
.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split-block img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split-block.reverse { direction: rtl; }
.split-block.reverse > * { direction: ltr; }

@media (max-width: 768px) {
  .split-block, .split-block.reverse { grid-template-columns: 1fr; direction: ltr; }
}

/* ---------- Gallery / showcase grid ---------- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.showcase-grid img { aspect-ratio: 1/1; object-fit: cover; width: 100%; cursor: pointer; }

@media (max-width: 768px) {
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-img-lg);
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(42,38,34,0.06);
}

.testimonial-card .stars { color: var(--color-gold); margin-bottom: 0.75rem; letter-spacing: 2px; }
.testimonial-card p { font-style: italic; margin-bottom: 1rem; }
.testimonial-card .name { font-family: var(--font-display); font-weight: 600; }

@media (max-width: 768px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-charcoal-deep);
  color: var(--color-cream);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo img { height: 90px; border-radius: 0; margin-bottom: 1rem; }
.footer-col h4 { color: var(--color-gold); margin-bottom: 1rem; font-size: 1rem; }
.footer-col a, .footer-col p { display: block; margin-bottom: 0.5rem; opacity: 0.85; }

.footer-bottom {
  border-top: 1px solid rgba(251,246,236,0.12);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Order Builder (order.html) ---------- */
.order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(42,38,34,0.08);
}

.order-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 12px;
}

.order-item-name {
  flex: 1;
  font-weight: 600;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(42,38,34,0.2);
  background: var(--color-white);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.qty-btn:hover { background: var(--color-cream-tint); }

.qty-value { min-width: 1.2rem; text-align: center; font-weight: 600; }

#order-summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(42,38,34,0.06);
}

@media (max-width: 900px) {
  .order-layout { grid-template-columns: 1fr !important; }
}

/* ---------- Footer social icons ---------- */
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.footer-social a { display: inline-flex; }

.footer-social img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.footer-social img:hover { transform: translateY(-3px); }
