/* Force slider caption text to white and add subtle dark overlay for contrast */
.home-slider .slide-caption,
.hero-slider-1 .slide-caption,
.slider-animated-1 .slide-caption {
  color: #ffffff !important;
  text-shadow: 0 4px 18px rgba(0,0,0,0.6);
}

/* If caption container is transparent, add a subtle dark background for readability */
.home-slider .slide-caption {
  background: rgba(0,0,0,0.28); /* adjust opacity if needed */
  padding: 18px 20px;
  border-radius: 8px;
  max-width: 540px;
}

/* Ensure headings & paragraph sizes are nice and responsive */
.home-slider .slide-caption h2 { color: #fff; margin:0 0 6px; font-size: clamp(20px, 3.6vw, 34px); }
.home-slider .slide-caption p  { color: #f3f3f3; margin:0; font-size: clamp(13px, 1.6vw, 16px); }

/* Make sure it stays white on mobile too */
@media (max-width: 768px) {
  .home-slider .slide-caption {
    max-width: none;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 12% !important;
    padding: 14px;
  }
}

/* ---------------- CLEANED HERO + CLASSIC + POPPY + FOOTER SHOWCASE ----------------
   - Duplicates removed
   - Consistent image sizing (cover on desktop, contain on mobile)
   - Accessibility: focus-visible added
   - Reduced-motion respected
   - Responsive breakpoints preserved
   - No other theme files touched
*/

/* Theme variables */
:root {
  --poppy-red: #e32222;
  --poppy-dark: #0f1112;
  --poppy-text: #ffffff;
  --poppy-muted: #cfcfcf;
}

/* ---------- HERO SECTION (FINAL COMPACT VERSION) ---------- */
/* Base / Desktop layout */
.hero-section {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  min-height: 370px; /* compact height for desktop */
  font-family: "Poppins", system-ui, Arial, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

/* Left image side */
.hero-image {
  flex: 1 1 50%;
  min-width: 50%;
  position: relative;
  overflow: hidden;
  background: #000; /* fallback */
  display: block;
}

/* Make image cover the container on desktop for full-bleed look */
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.9s ease;
  -webkit-backface-visibility: hidden;
}

/* Right text side */
.hero-text {
  flex: 1 1 50%;
  min-width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: #fff;
  padding: 48px 40px; /* reduced padding for compact look */
  box-sizing: border-box;
}

.hero-content {
  max-width: 470px;
  width: 100%;
}

/* Typography */
.hero-title {
  margin: 0 0 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
}

.hero-title span::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin-top: 8px;
  background: var(--poppy-red);
  border-radius: 3px;
}

.hero-sub {
  color: #d6d6d6;
  font-size: clamp(14px, 1.5vw, 17px);
  margin-bottom: 20px;
}

.hero-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 28px;
  border: 2px solid var(--poppy-red);
  background: transparent;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  outline: none;
}

/* Keyboard focus visibility */
.hero-btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(227,34,34,0.14);
}

.hero-btn:hover {
  background: var(--poppy-red);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(227,34,34,0.16);
}

/* Animation (optional zoom) */
.hero-section.animate .hero-image img {
  transform: scale(1.04);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-image img,
  .hero-btn,
  .hero-section.animate .hero-image img {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- RESPONSIVE (HERO) ---------- */
/* Tablet */
@media (max-width: 1024px) {
  .hero-section { min-height: 50vh; }
  .hero-text { padding: 40px 24px; }
  .hero-title { font-size: clamp(24px, 5vw, 36px); }
  .hero-sub { font-size: 15px; }
}

/* Mobile: stack vertically, text first then image */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    min-height: auto;
  }

  .hero-text,
  .hero-image {
    flex: none;
    width: 100%;
    min-width: 100%;
    height: auto;
  }

  /* reverse order: text first */
  .hero-text {
    order: 1;
    padding: 28px 16px;
    text-align: center;
  }
  .hero-image {
    order: 2;
  }

  .hero-content {
    max-width: 92%;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .hero-sub {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .hero-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 9px 20px;
    font-size: 14px;
  }

  /* mobile: show full image without cropping */
  .hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* Very small screens */
@media (max-width: 420px) {
  .hero-title { font-size: 20px; }
  .hero-sub { font-size: 13px; }
  .hero-btn { padding: 8px 16px; font-size: 13px; }
}

/* Safety adjustments */
html, body {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Ensure images don't overflow */
.hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- CLASSIC HERO (CENTERED VARIANT) ---------- */
.classic-hero {
  width: 100%;
  background: #f7f5f3; /* soft warm background */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 20px; /* vertical space controlled */
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.classic-hero-inner {
  width: 100%;
  max-width: 980px; /* center content width */
  text-align: center;
  padding: 20px;
}

/* Title */
.ch-title {
  margin: 0 0 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: #111;
  font-size: clamp(34px, 6.8vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.6px;
}

/* Lead paragraph */
.ch-lead {
  margin: 0 auto;
  color: #6a6a6a;
  font-family: "Poppins", system-ui, Arial, sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.8;
  max-width: 760px;
}

/* Small underline accent */
.ch-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 3px;
  background: var(--poppy-red);
  margin: 18px auto 0;
  border-radius: 3px;
  opacity: 0.95;
}


/* Responsive tweaks */
@media (max-width: 1024px) {
  .classic-hero { padding: 70px 18px; }
  .ch-title { font-size: clamp(30px, 7.5vw, 48px); }
  .ch-lead { font-size: 15px; }
}
@media (max-width: 640px) {
  .classic-hero { padding: 44px 14px; }
  .ch-title { font-size: clamp(22px, 9.5vw, 32px); }
  .ch-lead { font-size: 14px; line-height: 1.7; }
}
@media (prefers-contrast: more) {
  .ch-title { color: #000; }
  .ch-lead { color: #333; }
}

/* ---------- POPPY HERO (BRAND VARIANT) ---------- */
/* Container */
.poppy-hero {
  display: flex;
  width: 100%;
  min-height: 380px;
  box-sizing: border-box;
  overflow: hidden;
  font-family: "Poppins", system-ui, Arial, sans-serif;
}

/* Left image */
.poppy-left {
  flex: 1 1 50%;
  min-width: 50%;
  overflow: hidden;
  background: #000;
}

.poppy-left img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  transition: transform .9s ease;
}

/* Right text */
.poppy-right {
  flex: 1 1 50%;
  min-width: 50%;
  background: var(--poppy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--poppy-text);
  padding: 48px 64px;
  box-sizing: border-box;
}

.poppy-inner {
  max-width: 620px;
  width: 100%;
}

/* Title / description / button */
.ph-title {
  margin: 0 0 12px;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--poppy-text);
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.ph-desc {
  margin: 0 0 26px;
  color: var(--poppy-muted);
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.65;
}

.ph-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 28px;
  background: transparent;
  color: var(--poppy-text);
  border: 2px solid rgba(255,255,255,0.12);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .6px;
  transition: all .22s ease;
}

.ph-btn:hover {
  background: var(--poppy-text);
  color: var(--poppy-dark);
  border-color: var(--poppy-text);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.ph-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--poppy-red);
  border-radius: 3px;
  margin-top: 12px;
}

.poppy-hero.animate .poppy-left img {
  transform: scale(1.04);
}

/* Tablet */
@media (max-width: 1024px) {
  .poppy-hero { min-height: 48vh; }
  .poppy-right { padding: 36px 36px; }
  .ph-title { font-size: clamp(26px, 6.7vw, 40px); }
}

/* Mobile */
@media (max-width: 768px) {
  .poppy-hero { flex-direction: column; min-height: auto; }

  .poppy-right {
    order: 1;
    width: 100%;
    min-width: 100%;
    padding: 28px 18px;
    text-align: center;
  }

  .poppy-left {
    order: 2;
    width: 100%;
    min-width: 100%;
    height: auto;
  }

  .poppy-left img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .ph-title { font-size: clamp(20px, 7.5vw, 30px); }
  .ph-desc { font-size: 15px; margin-bottom: 18px; color: #bfbfbf; text-align: center; }
  .ph-btn { padding: 10px 20px; font-size: 14px; }
}

@media (max-width: 420px) {
  .ph-title { font-size: 20px; }
  .ph-desc { font-size: 14px; }
  .poppy-right { padding: 22px 14px; }
}

/* ---------- FOOTER PRODUCT SHOWCASE ---------- */
.footer-product-showcase {
  background: #fff;
  padding: 28px 0 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 28px;
}

.fps-inner {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* left image */
.fps-media {
  flex: 0 0 40%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  display: block;
}
.fps-media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: transform .7s ease;
  border-radius: 8px;
}
.fps-media:hover img { transform: scale(1.04); }

/* right content */
.fps-content {
  flex: 1 1 56%;
  padding: 6px 18px;
  box-sizing: border-box;
}
.fps-kicker {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c72b2b;
  margin-bottom: 10px;
  font-weight: 700;
}
.fps-title {
  font-size: 26px;
  margin: 0 0 10px;
  font-family: 'Georgia', serif;
  line-height: 1.2;
  color: #111;
}
.fps-title a { color: inherit; text-decoration: none; }
.fps-desc {
  color: #555;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.6;
}
.fps-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.fps-price {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}
.fps-actions .btn {
  margin-right: 10px;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}
.btn-primary { background:#c72b2b; color:#fff; border:none; }
.btn-outline { background:transparent; border:1px solid #c72b2b; color:#c72b2b; }

/* responsive */
@media (max-width: 991px) {
  .fps-inner {
    flex-direction: column-reverse;
    gap: 18px;
    align-items: center;
    padding: 0 20px;
  }
  .fps-media { width: 100%; flex-basis: auto; }
  .fps-media img { height: 260px; }
  .fps-content { text-align: center; padding: 6px 8px; }
  .fps-title { font-size: 24px; }
}
@media (max-width: 480px) {
  .fps-media img { height: 180px; }
  .fps-title { font-size: 20px; }
  .fps-price { font-size: 17px; }
  .fps-content { padding: 6px 6px; }
}

/* ---------------- UTILITIES ---------------- */
html, body {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

.simple-slider {
    position: relative;
}
.simple-slider .item {
    position: relative;
}
.simple-slider .slide-caption {
    position: absolute;
    bottom: 20%;
    left: 10%;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
    z-index: 99;
}
.simple-slider .slide-caption h2 {
    font-size: 38px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-transform: capitalize;
}
.simple-slider .slide-caption p {
    font-size: 20px;
    margin-top: 10px;
}



/* Checkout note container */
.checkout-custom-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(180deg, #fffdf6 0%, #fff7e6 100%);
  border: 1px solid #f0dca8;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  font-size: 14px;
  color: #5a4a2a;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Icon */
.checkout-custom-note .note-icon {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(90,74,42,0.08);
  font-weight: 700;
}

/* Text block */
.checkout-custom-note .note-text {
  flex: 1;
  padding-top: 1px;
}

/* Strong bit */
.checkout-custom-note .note-text strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

/* Small helper line (optional link style) */
.checkout-custom-note .note-text small {
  display: block;
  color: #6a5a3a;
  margin-top: 4px;
}

/* Mobile tweaks */
@media (max-width: 767.98px) {
  .checkout-custom-note { font-size: 13px; gap: 10px; padding: 10px; }
  .checkout-custom-note .note-icon { min-width: 32px; min-height: 32px; }
}



document.addEventListener('DOMContentLoaded', function () {
  try {
    // Build note HTML (edit text here if needed)
    var noteHtml = '\
      \
        i\
        \
          Important delivery note\
          Please add any delivery instructions or ID requirements in the "Order notes" box below. For COD orders, keep exact change ready — our courier may not have change for large bills.\
          If you need invoice details, check "Requires company invoice" and fill company info.\
        \
      ';

    // Preferred insertion point: just above the Order notes textarea (id="description")
    var descriptionEl = document.getElementById('description');

    if (descriptionEl) {
      // Insert wrapper before description
      descriptionEl.insertAdjacentHTML('beforebegin', noteHtml);
    } else {
      // Fallback: if description not found, try to insert near checkout form end
      var checkoutForm = document.getElementById('checkout-form');
      if (checkoutForm) {
        // put before submit button row
        var submitRow = checkoutForm.querySelector('button[type="submit"]');
        if (submitRow) {
          submitRow.insertAdjacentHTML('beforebegin', noteHtml);
        } else {
          checkoutForm.insertAdjacentHTML('beforeend', noteHtml);
        }
      }
    }
  } catch (e) {
    // fail silently — won't break checkout if something unexpected happens
    console && console.log && console.log('Checkout note injection error:', e);
  }
});

