:root { --page-max: 1500px; }

html, body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;   /* ✅ prevent sideways scroll */
}

body {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 16px;
  color: #333;
  background: #f9f9f9;
  margin: 0;
  padding: 0;
}

/* ===== GENERAL ===== */
.content-section { max-width: 800px; margin: 0 auto; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  color: #222;
  margin-top: 0;
}
h1 {
  font-size: 40px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 2rem;
}
h2 {
  font-size: clamp(1.25rem, 2.75vw, 2rem);
  text-align: center;
}
ul { list-style: none; }
li { padding-bottom: 1.2rem; }

code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}
a { color: #ffffff; text-decoration: none; font-family: 'Poppins', sans-serif; }
a:hover { text-decoration: underline; }

/* ===== HERO ===== */
.hero-wrapper {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 68%;
  display: block;
  aspect-ratio: 3 / 2;   /* desktop intrinsic ratio (1920×1280) */
}
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-content .intro-card {
  padding: 4rem 5rem;
  text-align: justify;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ===== INTRO CARD ===== */
.intro-section { display: flex; justify-content: center; }

.intro-card {
  background: white;
  padding: 3rem 4rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
  width: 100%;
  max-width: 1200px;
}
.intro-card p {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 1rem;
  font-weight: 300;
}
/* ---------- Coupons (store page style) ---------- */
#coupons.coupons-section {
  padding-block: 10vh;
  /* padding-inline: 250px; */
  max-width: 1200px;
  margin: 0 auto;
}

.coupons-title::before,
.coupons-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
}

.coupons-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* smaller cards fit better */
  gap: 2rem;             /* reduce spacing between cards */
  justify-content: center;
}

.coupon-item {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  display: flex;
  text-align: center;
  border-radius: 20px;
  align-items: center;
  flex-direction: column;
  font-size: 22px;
}

.coupon-badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%); /* center badge above card */
  padding: 5px 10px;
  font-weight: bold;
  font-size: 0.9rem;
  border: 2px solid #ff9800;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.coupon-code,
.coupon-expiry {
  font-size: 1rem;
}

.coupon-link {
  display: block;
  background: #4a8593;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  width: auto;        
  min-width: 275px;  
  text-decoration: none;
  margin-top: auto;
}

.coupon-brand a {
  font-size: 26px;
  color: black !important;
}


/* ===== TIPS ===== */
.tips-section {
  max-width: 1000px;
  margin: 5vw;
  padding: 2vw;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.tips-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5vw;
  text-align: left;
  margin-bottom: 2rem;
  color: #2d3e50;
}
.tips-list { list-style: none; margin: 0; padding: 0; }
.tip-item { padding: 1rem; border-bottom: 1px solid #eee; transition: background 0.2s ease; }
.tip-item:last-child { border-bottom: none; }
.tip-item:hover { background: #f9fafb; }
.tip-text {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9vw;
  color: #555;
  line-height: 1.6;
}
.store-tips-back {
  background-image: var(--summary-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-block: 1rem;
}

/* ===== STORE SUMMARY ===== */
.store-summary-section {
  background: #ffffff;
  padding: 3rem 2rem;
  width: 100%;
  margin: 5rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.store-summary-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5vw;
  font-weight: 500;
  text-align: left;
  margin-bottom: 2.5rem;
  color: #1a1a1a;
}
.store-summary-content {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1vw;
  line-height: 1.7;
  color: #2d3e50;
  text-align: justify;
}
.store-summary-content p {
  font-size: 1vw;
  margin-bottom: 1.5rem;
  text-align: justify;
}
.store-summary-content strong { color: #4a8593; font-weight: 600; }

/* ---------- Related Stores ---------- */
.related-stores-title {
  margin-top: 8vh;
  margin-bottom: 8vh;
  font-size: 40px;
  font-weight: 600;
  text-align: center;
}

.related-stores-list { 
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1200px;   /* ✅ constrain to content width */
  margin: 0 auto 10vh; /* ✅ center it on the page */
}

.related-store-item { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  text-align: center; 
  width: 30%;           /* ✅ allow 3 per row inside 1200px */
  min-width: 350px;
}

.related-store-logo { 
  width: 200px; 
  height: 200px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border: 3px solid #000; 
  background: #fff; 
  margin-bottom: 8px; 
}

.related-store-logo img { 
  max-width: 95%; 
  max-height: 95%; 
  object-fit: contain; 
}

.related-store-name { 
  font-size: 16px; 
  font-weight: 500; 
  color: #333; 
  font-family: 'Poppins', sans-serif; 
  text-decoration: none; 
  margin-top: 6px;
}

/* ---------- Recommendations (cards) ---------- */
.recs-section { margin: 5rem auto; max-width: 1500px; padding: 0 2rem; }
.recs-title { font-size: 2.2rem; text-align: center; margin-bottom: 2rem; }
.recs-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.rec-card { background: #fff; border: 1px solid #d9e1e6; overflow: hidden; transition: transform .15s; border-radius: 20px;}
.rec-card:hover { transform: translateY(-2px); }
.rec-card__img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.rec-card__brand { font-size: 23px; font-weight: 500; color: #1c1e21; font-family: 'Poppins', sans-serif; padding: 10px;}

/* ===== SUMMARY BACKGROUND WRAPPER ===== */
.store-summary-back {
  --summary-bg: url('/output/images/about-store-background.jpeg');
  background-image: var(--summary-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 150px;
}
.store-summary-back .store-summary-section { margin: 0 auto; }

/* ===== MONEY-SAVING / TIPS HERO ===== */
.tips-hero { 
  background: url('/output/images/store-page-background.webp') center/cover no-repeat; 
  padding: 150px; 
}
.tips-hero__wrap { display: flex; }
.tips-hero__text { flex: 1 1 640px; min-width: 0; }
.tips-hero .tips-section { margin: 0; display: flex; flex-direction: column; }
.tips-hero__image {
  flex: 1 1 520px;
  min-height: 420px;
  background: var(--tips-photo) center/cover no-repeat;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
@media (max-width: 900px){
  .tips-hero__wrap { flex-direction: column; }
  .tips-hero__image { order: -1; min-height: 200px; border-radius: 10px; }
}

/* ===== MOBILE OVERRIDES ===== */
@media (max-width: 767px) {
  .hero-wrapper { min-height: 50vh; }

  .intro-section {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 320px;
}

  .hero-content .intro-card,
  .hero-content__inner .intro-card {
    padding: 1.25rem;
    max-width: 600px;
    text-align: left;
  }

  .hero-content .intro-card h1,
  .hero-content__inner .intro-card h1 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .hero-content .intro-card p,
  .hero-content__inner .intro-card p {
    font-size: 13px;
    line-height: 1.5;
  }

  .hero-bg img { aspect-ratio: 3 / 5; }

  .coupons-list { grid-template-columns: 1fr; gap: 1rem; margin-top: 30px; }
  .coupon-item { padding: 1rem; }
  .coupon-link { font-size: 1rem; padding: 0.6rem; }

  .coupon-brand a {
    font-size: 20px;
    color: black !important;
  }

  .tips-section { margin: 1rem; padding: 1rem; }
  .tips-title { font-size: clamp(1.1rem, 4vw, 1.5rem); }
  .tip-text { font-size: 3vw; }

  .store-summary-back { padding: 30px 15px; }
  .store-summary-section { padding: 1.25rem; max-width: 700px; }
  .store-summary-title { font-size: 20px; margin-bottom: unset; }
  .store-summary-content { font-size: 1rem; line-height: 1.6; }
  .store-summary-content p { font-size: 2vw; margin-bottom: unset; text-align: justify; }
  .store-summary-back .store-summary-section { margin: unset; width: auto; }

  .related-stores-list { gap: 1rem; flex-direction: column; align-items: center; }
  .related-store-item { width: 100%; max-width: 300px; }

  .related-stores-title { 
    margin-top: 30px; 
    font-size: 30px;
  }

  .recs-title {font-size: 30px;}
  .recs-list { grid-template-columns: 1fr; gap: 1rem; }
  .rec-card { max-width: 320px; margin: 0 auto; }
  .rec-card__brand { font-size: 1rem; font-weight: 600; padding: 0.5rem; }

  .tips-hero { padding: 30px 15px; }
  .tips-hero__text { flex: unset; min-width: auto; width: 100%; }
  .tips-hero__image { min-height: 200px; border-radius: 8px; }

  .tip-item { padding: unset; }

/* Coupons section */
#coupons.coupons-section {
  display: flex;
  flex-direction: column;
  align-content: center;
  align-items: center;
  width: 100%;
  max-width: 320px;
  padding-block: 45px;
}

.coupons-title {
font-size: 25px;
text-align: center;
margin-bottom: unset;
width: 100%;
max-width: 320px;
}

.coupons-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.coupon-brand {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a8593;
}

.coupon-title {
  font-size: 1rem;
  font-weight: 600;
}

.coupon-code {
  font-size: 0.9rem;
  color: #333;
  display: block;
}

.coupon-link {
  font-size: 0.9rem;
  text-align: center;
  display: inline-block;
  border-radius: 10px;
  background: #4a8593;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  margin-top: auto;
}

/* ✅ Mobile coupon spacing fix */
@media (max-width: 768px) {
  .coupon-item {
    margin: 8px 0;   /* tighter vertical spacing */
    padding: 12px;   /* reduce inner padding */
    gap: unset;
  }

  .coupon-grid,
  .coupons-list {
    gap: 12px;       /* shrink gaps between items */
  }
}

}


/* ---------- coupon slider logi ---------- */
@media (max-width: 768px) {
  .coupons-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    flex-direction: unset;
    width: 95%;
    flex-direction: row;        /* ✅ force horizontal */
    justify-content: flex-start; /* ✅ start flush left */
  }
  .coupon-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
  }
}







@media (max-width: 415px) {
  .hero-wrapper {
    min-height: 60vh;
  }
}

@media (max-width: 1200px) and (min-width: 950px) {
  .intro-card,
  .store-summary-section,
  .tips-hero__wrap,
  #coupons.coupons-section,
  .related-stores-list {
    max-width: 950px;
  }

  .rec-card__brand {
    font-size: 20px;
    font-weight: 500;
    color: #1c1e21;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
}

.coupon-title {
    margin-top: 1vh;
    font-size: 14px;
}

.coupon-code, .coupon-expiry {
    font-size: .85rem;
}
.coupon-brand a {
    font-size: 22px;
    color: black !important;
}

.intro-card p {
    font-size: 18px;
}
}


@media (min-width: 768px) and (max-width: 1025px) {

  .intro-card h1 {
    font-size: 28px !important;
  }

  .intro-card p {
    font-size: 16px;
  }

  .hero-wrapper {
    position: relative;
    width: 100%;
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .intro-card {
    width: 100%;
    max-width: 700px;
  }

  .hero-content .intro-card {
    padding: 25px 40px;
  }

  /* Coupons section wrapper */
  #coupons.coupons-section {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 700px;           /* ⬅ you can tweak this */
    padding-block: 35px;        /* even padding top/bottom */
    margin: 50px auto;
  }

  /* Section title */
  .coupons-title {
    font-size: 28px;            /* slightly larger for iPad */
    text-align: center;
    width: 100%;
    line-height: 1.2;
  }

  /* Horizontal scroll cards */
  .coupons-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    flex-direction: unset;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    padding-top: 1rem;
  }


  .coupons-list::-webkit-scrollbar {
    height: 8px;
  }
  .coupons-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }

  /* Each coupon card */
  .coupon-item {
    flex: 0 0 280px;            /* fixed width per card */
    scroll-snap-align: start;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-align: center;
    padding: 1.25rem;
    border: 1px solid #ddd;
  }

  .coupon-brand a {
    font-size: 28px;
  }

  .coupon-code,
  .coupon-expiry {
    font-size: 0.875rem;
    display: block;
    color: #333;
    margin-top: 0.25rem;
  }

  .coupon-link {
    display: block;
    width: 70%;
    max-width: 220px;
    margin: 0 auto;
    margin-top: auto;
    padding: 0.75rem 1rem;
    text-align: center;
    background: #4a8593;
    color: #fff;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .coupon-link:hover {
    background: #3a6a75;
  }

  .nav-menu {
    display: flex;
    align-items: center;
    gap: 60px;
  }

  .logo span {
    display: none;
  }

  .related-stores-list {
    max-width: 700px;
  }

  .related-store-item {
    min-width: 200px;
  }

  .related-stores-title {
    margin-top: 5vh;
    margin-bottom: 5vh;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
  }

  .related-store-logo {
    width: 100px!important;
    height: 100px!important;
  }
  .related-store-name {
    font-size: 1rem;
  }

  .related-stores-list {
    grid-template-columns: repeat(3, 1fr) !important;
    max-width: 100%;
  }
}

/* ——— Related Stores Section ——— */
.related-stores-section {
  width: 100%;
  max-width: 1400px;
  margin: 3rem auto 2rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  scroll-margin-top: 100px; /* smooth anchor scroll offset */
}

/* Title */
.related-stores-title {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  font-weight: 600;
  color: #222;
  margin-bottom: 1.75rem;
}

/* Store card layout */
.related-stores-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  width: 100%;
  justify-items: center;
}

/* Individual store item */
.related-store-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-store-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}

/* Link wraps everything */
.related-store-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Background image */
.related-store-bg {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.related-store-bg img.rec-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.9);
  transition: filter 0.3s ease;
}

.related-store-item:hover .rec-card__img {
  filter: brightness(1.05);
}

/* Centered logo overlay */
.related-store-logo {
  position: absolute;
  bottom: 0%;
  left: 50%;
  transform: translateX(-50%);
  width: 145px;
  height: 145px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 2px solid #000;
  margin-bottom: unset;
}

.related-store-logo img {
  width: 125px;
  height: auto;
}

/* Store name below image */
.related-store-name {
  font-size: 1.1rem;
  font-weight: 500;
  padding: 1rem 0 1.25rem;
  color: #333;
}

.coupon-title {
  display: block;
  max-width: 100%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  font-size: 16px;
}

.coupon-brand {
  padding: 10px;
}

.coupon-logo {
margin: 10px auto 0px auto !important;
align-items: center !important;
}