/* ============================================================
   Shanice Fudge - shared stylesheet for ALL pages
   (index.html, shop.html, checkout.html, contact.html)
   ============================================================ */

/* ===== Colour + font variables (change these to re-brand quickly) ===== */
:root {
  --brown: #7d5a3c;        /* main brand brown */
  --brown-dark: #5a3f28;   /* darker brown for the top bar */
  --tan: #b08d57;          /* buttons + footer */
  --cream: #f2ede6;        /* soft cream section background */
  --light: #faf8f5;        /* near-white background */
  --text: #3a2f27;         /* body text colour */
  --muted: #8a7b6d;        /* muted/secondary text */
  --star: #d8a24a;         /* review star colour */
  --white: #ffffff;
}

/* ===== Basic reset so browsers start from the same place ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif; /* clean default font stack */
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; } /* stop images overflowing */
a { text-decoration: none; color: inherit; } /* links inherit text colour */

.container { width: 90%; max-width: 1100px; margin: 0 auto; } /* centred content wrapper */

/* Reusable pill-shaped button */
.btn {
  display: inline-block;
  background: var(--tan);
  color: var(--white);
  padding: 10px 22px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease; /* smooth hover colour change */
}
.btn:hover { background: var(--brown); } /* darken button on hover */

/* ===== Top info bar (phone / email / opening hours) ===== */
.topbar { background: var(--brown-dark); color: var(--white); font-size: 13px; }
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; padding: 8px 0;
}
.topbar .left span { margin-right: 20px; } /* space between phone and email */

/* ===== Main navigation header ===== */
.header { background: var(--brown); color: var(--white); }
.header .container {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; flex-wrap: wrap;
}
.logo { background: #4a3524; padding: 10px 18px; font-weight: bold; letter-spacing: 1px; }
.nav a { margin: 0 14px; font-size: 15px; }
.nav a:hover { color: var(--tan); }               /* highlight nav link on hover */
.header-icons span { margin-left: 14px; cursor: pointer; } /* search / account / cart icons */

/* ===== Hero banner (static text over a background - NO carousel) ===== */
.hero {
  /* Warm gradient stands in for the hero background. */
  /* TO USE A PHOTO: replace the gradient with:
     background: url('images/hero.jpg') center/cover no-repeat; */
  background: linear-gradient(120deg, #4a2f1c 0%, #8a4b2e 50%, #b5623a 100%);
  color: var(--white);
  min-height: 380px;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-inner { max-width: 640px; padding: 20px; }
.hero h1 { font-size: 40px; margin-bottom: 14px; }
.hero p { font-size: 16px; margin-bottom: 20px; opacity: 0.95; }

/* Home-page hero: fudge photo with a dark overlay so white text stays readable */
.hero-home {
  background: linear-gradient(rgba(40,25,15,0.55), rgba(40,25,15,0.55)), /* dark tint on top */
              url('images/fudge-hero.jpg') center/cover no-repeat;       /* the fudge photo */
}

/* Smaller hero used as a page banner on inner pages */
.page-hero { min-height: 200px; }
.page-hero h1 { font-size: 34px; margin-bottom: 6px; }

/* ===== About section (text left, image right) ===== */
.about { background: var(--cream); padding: 70px 0; }
.about .container { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.about-text { flex: 1; min-width: 280px; }
.about-text h2 { font-size: 30px; margin-bottom: 18px; }
.about-text p { color: var(--muted); margin-bottom: 22px; }
.about-img {
  flex: 1; min-width: 280px; height: 300px; border-radius: 6px;
  background: linear-gradient(135deg, #d9c4a8, #b08d57); /* placeholder for product photo */
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 15px;
}

/* ===== Product grid (used on home + shop pages) ===== */
.products { background: var(--light); padding: 70px 0; }
.section-title { text-align: center; font-size: 30px; margin-bottom: 45px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: var(--white); border-radius: 6px; padding: 16px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* subtle card shadow */
}
/* Coloured block standing in for each fudge-bucket photo */
.product-img {
  height: 150px; border-radius: 6px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 13px;
}
.product-card h3 { font-size: 15px; margin-bottom: 4px; }
.product-price { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.stars { color: var(--star); font-size: 13px; margin-bottom: 12px; }
.stars small { color: var(--muted); margin-left: 4px; } /* review count */
.product-card .btn { width: 100%; } /* full-width button */
.see-more { text-align: center; margin-top: 40px; }

/* ===== Testimonials ===== */
.testimonials { background: var(--white); padding: 70px 0; text-align: center; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.testimonial { padding: 20px; text-align: left; }
.testimonial .quote-mark { color: var(--tan); font-size: 34px; line-height: 1; }
.testimonial p { color: var(--muted); font-size: 14px; margin: 8px 0; }
.testimonial .stars { margin: 6px 0; }
.testimonial .name { font-weight: bold; font-size: 14px; }
.testimonial .role { color: var(--muted); font-size: 12px; }

/* ===== Simple forms (checkout + contact) ===== */
.form-section { padding: 60px 0; background: var(--light); }
.form-card {
  background: var(--white); max-width: 560px; margin: 0 auto;
  padding: 32px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.form-card h2 { margin-bottom: 20px; font-size: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.form-group input, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd;
  border-radius: 4px; font-size: 14px; font-family: inherit;
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-card .btn { width: 100%; margin-top: 8px; font-size: 15px; }

/* Order summary box on the checkout page */
.order-summary {
  background: var(--cream); border-radius: 6px; padding: 18px 20px; margin-bottom: 24px;
}
.order-summary .row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 6px; }
.order-summary .total { font-weight: bold; font-size: 18px; border-top: 1px solid #ddd; padding-top: 10px; margin-top: 10px; }
.order-summary .row .value { color: var(--brown); }

/* Small green confirmation message (checkout + contact) */
.success-msg {
  display: none; /* shown by JavaScript after "submitting" */
  background: #e6f4ea; color: #2f7d43;
  padding: 14px; border-radius: 6px; margin-top: 16px; font-size: 14px; text-align: center;
}

/* ===== Contact info cards ===== */
.contact-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.contact-info .info-card {
  background: var(--white); padding: 24px; border-radius: 8px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.contact-info .icon { font-size: 26px; margin-bottom: 10px; }
.contact-info h3 { font-size: 16px; margin-bottom: 6px; }
.contact-info p { color: var(--muted); font-size: 14px; }

/* ===== Footer ===== */
.footer { background: var(--tan); color: var(--white); padding: 55px 0 25px; }
.footer .container { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-col { min-width: 160px; }
.footer-logo { background: #4a3524; display: inline-block; padding: 14px 22px; font-weight: bold; margin-bottom: 10px; }
.footer h4 { margin-bottom: 14px; font-size: 16px; }
.footer a, .footer p { display: block; color: var(--white); opacity: 0.9; margin-bottom: 8px; font-size: 14px; }
.footer a:hover { opacity: 1; text-decoration: underline; } /* underline footer links on hover */
.socials span { display: inline-block; margin-right: 10px; font-size: 18px; cursor: pointer; }
.footer-map {
  width: 150px; height: 150px; background: #4a4a4a; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}

/* ===== Responsive tweaks for tablets and phones ===== */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); } /* 2 columns on tablet */
  .testimonial-grid { grid-template-columns: 1fr; }        /* stack testimonials */
  .contact-info { grid-template-columns: 1fr; }            /* stack contact cards */
}
@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr; } /* 1 column on phone */
  .hero h1 { font-size: 30px; }
  .nav a { margin: 0 8px; font-size: 14px; }
}
