/* ============================================================
   Cargills Online — Spin & Win (Sri Lanka)
   Layout, sizing and interaction mirror the 7-Eleven campaign
   portal; colour, type and imagery are re-skinned to the
   Cargills Online brand (red #d90d0e / yellow #fdd900).
   ============================================================ */
:root {
  --cgl-red: #d90d0e;
  --cgl-red-dark: #a70a0b;
  --cgl-red-bright: #ed1b24;
  --cgl-yellow: #fdd900;
  --cgl-ink: #222;
  --cgl-grey: #505050;
  --cgl-line: #e2e2e2;
  --cgl-panel: #f5f5f5;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}
.cgl-shell {
  min-height: 100vh;
  background: #fff;
  color: var(--cgl-ink);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, "Noto Sans Sinhala", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
img {
  max-width: 100%;
}

/* ---------- header ---------- */
.cgl-header {
  background: var(--cgl-red);
  border-bottom: 3px solid var(--cgl-yellow);
  position: relative;
  z-index: 3;
}
.cgl-header__bar {
  display: none;
}
.cgl-header__row {
  max-width: 960px;
  margin: 0 auto;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cgl-header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.cgl-logo {
  height: 26px;
  width: auto;
  max-width: 100%;
  display: block;
  flex: 0 1 auto;
}
.cgl-header__tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.cgl-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--cgl-yellow);
  color: #4a3200;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.cgl-chip b {
  color: var(--cgl-red-dark);
  font-weight: 900;
}
.cgl-lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}
.cgl-lang button {
  border: 0;
  background: transparent;
  padding: 0 11px;
  height: 26px;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.cgl-lang button[data-lang-btn="si"] {
  font-size: 13px;
  padding: 0 12px;
  line-height: 1.1;
}
.cgl-lang button.is-on {
  background: var(--cgl-yellow);
  color: #4a3200;
}

/* delivery strip — Cargills Online style */
.cgl-strip {
  background: var(--cgl-yellow);
  color: #3d2b00;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  padding: 6px 10px;
  letter-spacing: 0.2px;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 14px;
  row-gap: 1px;
}

/* ---------- main ---------- */
.cgl-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 12px 28px;
}
.cgl-hero {
  background: var(--cgl-panel);
  border: 1px solid var(--cgl-line);
  border-left: 5px solid var(--cgl-red);
  padding: 16px 14px;
}
.cgl-hero .cgl-eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--cgl-red);
}
.cgl-hero h1 {
  margin: 0 0 4px;
  font-size: 21px;
  line-height: 1.3;
  color: var(--cgl-red);
  letter-spacing: -0.2px;
}
.cgl-hero .cgl-sub {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #7a1010;
  font-weight: 600;
}
.cgl-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #444;
}
.cgl-hero strong {
  color: var(--cgl-ink);
}
.cgl-hero ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
}
.cgl-hero li + li {
  margin-top: 4px;
}

.cgl-panel {
  margin-top: 12px;
  background: var(--cgl-panel);
  border: 1px solid var(--cgl-line);
  padding: 16px 14px;
}
.cgl-panel h2 {
  margin: 0 0 10px;
  font-size: 17px;
  color: var(--cgl-ink);
}
.cgl-field {
  margin-top: 12px;
}
.cgl-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.cgl-phone {
  display: flex;
  gap: 8px;
}
.cgl-phone .cgl-cc {
  flex: 0 0 72px;
  text-align: center;
  background: #fafafa;
}
.cgl-phone input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 16px;
  font-family: inherit;
  color: #222;
}
.cgl-phone input:focus {
  outline: none;
  border-color: var(--cgl-red);
  box-shadow: 0 0 0 2px rgba(217, 13, 14, 0.15);
}
.cgl-hint {
  margin: 7px 0 0;
  font-size: 11.5px;
  color: #777;
}
.cgl-btn {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 4px;
  background: var(--cgl-red);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
.cgl-btn:hover {
  background: var(--cgl-red-bright);
}
.cgl-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cgl-btn--yellow {
  background: var(--cgl-yellow);
  color: #3d2b00;
}
.cgl-btn--yellow:hover {
  background: #ffd300;
}
.cgl-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11.5px;
  color: #777;
}
.cgl-pay svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #999;
  stroke-width: 1.6;
}

/* ---------- wheel ---------- */
.cgl-wheel-wrap {
  display: none;
  margin-top: 12px;
  text-align: center;
  padding: 22px 14px 16px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 42%, #d21b1c 0%, #6d0607 74%);
  box-shadow: 0 10px 28px rgba(120, 8, 8, 0.22);
}
.cgl-wheel-wrap.is-on {
  display: block;
}
.cgl-wheel-wrap.is-ready .cgl-wheel {
  cursor: pointer;
}
.cgl-wheel-box {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto;
  padding-top: 14px;
}
.cgl-wheel-pointer {
  position: absolute;
  left: 50%;
  top: 2px;
  z-index: 2;
  width: 28px;
  height: 36px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffe45c, #f2b800);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.35));
}
.cgl-wheel {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  will-change: transform;
}
.cgl-wheel-wrap .cgl-foot {
  color: #ffe9a8;
  font-size: 13px;
  font-weight: 700;
}
.cgl-foot {
  margin-top: 16px;
  font-size: 11px;
  color: #888;
  text-align: center;
  line-height: 1.5;
}

/* ---------- wait / toast / modal ---------- */
#cgl-wait {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5500;
  background: rgba(255, 255, 255, 0.94);
  align-items: center;
  justify-content: center;
}
#cgl-wait.is-open {
  display: flex;
}
.cgl-wait-card {
  text-align: center;
}
.cgl-wait-spin {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border: 3px solid #f7cfcf;
  border-top-color: var(--cgl-red);
  border-radius: 50%;
  animation: cglspin 0.75s linear infinite;
}
.cgl-wait-card p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--cgl-red-dark);
}
@keyframes cglspin {
  to {
    transform: rotate(360deg);
  }
}
#toast {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  z-index: 5000;
  border-radius: 8px;
  max-width: min(88vw, 340px);
  text-align: center;
}
#cgl-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(0, 0, 0, 0.58);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#cgl-modal.is-open {
  display: flex;
}
.cgl-modal-card {
  width: min(100%, 400px);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  padding: 0 18px 18px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}
.cgl-modal-card .cgl-modal-top {
  margin: 0 -18px 14px;
  padding: 16px 18px 14px;
  background: var(--cgl-red);
  border-radius: 14px 14px 0 0;
  color: #fff;
}
.cgl-modal-top h3 {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #fff;
}
.cgl-modal-top .cgl-modal-pts-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #ffe9a8;
  line-height: 1.45;
}
.cgl-modal-top h3 span {
  color: var(--cgl-yellow);
}
.cgl-modal-top .cgl-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--cgl-yellow);
}
.cgl-modal-top .cgl-tick svg {
  width: 24px;
  height: 24px;
  stroke: var(--cgl-red-dark);
  stroke-width: 3;
  fill: none;
}
.cgl-modal-card .cgl-pts {
  font-size: 32px;
  font-weight: 900;
  color: var(--cgl-red);
  margin: 8px 0;
  letter-spacing: -0.5px;
}
.cgl-modal-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}
.cgl-modal-card .cgl-btn {
  margin-top: 16px;
}
.cgl-modal-activate {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #4a2020;
  line-height: 1.5;
}
.cgl-modal-note {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* ---------- deals rail ---------- */
.cgl-deals {
  margin-top: 22px;
  padding-top: 4px;
}
.cgl-deals__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 4px;
  margin-bottom: 10px;
}
.cgl-deals__head h2 {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  min-width: 0;
  flex: 1 1 180px;
}
.cgl-deals__head a {
  font-size: 12px;
  font-weight: 700;
  color: var(--cgl-red);
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.cgl-deals__rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cgl-deals__rail::-webkit-scrollbar {
  height: 5px;
}
.cgl-deals__rail::-webkit-scrollbar-thumb {
  background: #e0dcd6;
  border-radius: 4px;
}
.cgl-card {
  flex: 0 0 146px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--cgl-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cgl-card__img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.cgl-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cgl-card__off {
  position: absolute;
  left: 6px;
  top: 6px;
  background: var(--cgl-yellow);
  color: #3d2b00;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  padding: 2px 5px;
  letter-spacing: 0.2px;
}
.cgl-card__body {
  padding: 7px 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.cgl-card__cat {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9a9a9a;
}
.cgl-card__name {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.32;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 33px;
}
.cgl-card__pack {
  font-size: 11px;
  color: #888;
}
.cgl-card__price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 3px;
}
.cgl-card__price b {
  font-size: 14px;
  font-weight: 900;
  color: var(--cgl-red);
  letter-spacing: -0.2px;
}
.cgl-card__price s {
  font-size: 11px;
  color: #aaa;
}
.cgl-card__add {
  margin-top: 7px;
  height: 28px;
  border: 1px solid var(--cgl-red);
  border-radius: 4px;
  background: #fff;
  color: var(--cgl-red);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}
.cgl-card__add:active {
  background: var(--cgl-red);
  color: #fff;
}
.cgl-deals__note {
  margin: 4px 0 0;
  font-size: 11px;
  color: #999;
  line-height: 1.5;
}

/* ---------- footer ---------- */
.cgl-sitefoot {
  margin-top: 26px;
  background: #f3f3f3;
  border-radius: 28px 28px 0 0;
  padding: 40px 24px 48px;
  text-align: center;
}
.cgl-sitefoot > img {
  height: 34px;
  width: auto;
  max-width: 220px;
}
.cgl-sitefoot__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-top: 34px;
}
.cgl-sitefoot__nav a {
  color: var(--cgl-ink);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 3px solid var(--cgl-yellow);
  padding-bottom: 3px;
  line-height: 1.35;
}
.cgl-ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-top: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.cgl-ig svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--cgl-red);
  stroke-width: 1.8;
}
.cgl-ig svg circle:last-child {
  fill: var(--cgl-red);
  stroke: none;
}
.cgl-copy {
  max-width: 350px;
  margin: 30px auto 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #444;
}
.cgl-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}
.cgl-legal a {
  color: #222;
  font-size: 15px;
  text-decoration: none;
}

/* ---------- Sinhala typography (needs more leading & smaller display sizes) ---------- */
html[lang="si"] .cgl-hero h1 {
  font-size: 19px;
  line-height: 1.5;
}
html[lang="si"] .cgl-hero p,
html[lang="si"] .cgl-hero li,
html[lang="si"] .cgl-hero .cgl-sub {
  line-height: 1.8;
}
html[lang="si"] .cgl-panel h2 {
  font-size: 16px;
  line-height: 1.5;
}
html[lang="si"] .cgl-btn {
  font-size: 15px;
}
html[lang="si"] .cgl-sitefoot__nav a {
  font-size: 16px;
}

/* ---------- small screens ---------- */
@media (max-width: 380px) {
  .cgl-header__tools .cgl-chip {
    display: none;
  }
  .cgl-hero h1 {
    font-size: 19px;
  }
  .cgl-card {
    flex: 0 0 134px;
  }
}
