/* =========================================================
   Children's eyewear page (global tokens live in style.css)
   Cream and teal like the rest of the site, with a lighter, rounder touch.
   ========================================================= */

:root { --ce-sun: #f4c95d; --ce-sky: #cfe3e8; --ce-blush: #f3d9d2; }

.ce-left { text-align: left; margin: 10px 0 22px; }

/* ---------- Intro + facts ---------- */
.ce-intro { padding-block: clamp(56px, 7vw, 96px) 0; }
.ce-intro__lead {
  max-width: 820px; margin: 0 auto; text-align: center;
  font-family: var(--font-title); font-weight: 300; font-size: clamp(24px, 2.8vw, 36px); line-height: 1.3; color: var(--ink);
}
.ce-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: clamp(36px, 5vw, 56px); list-style: none; padding: 0; }
.ce-facts li { padding: 26px 24px; border-radius: 22px; background: var(--white); border: 1px solid var(--gold-soft); text-align: center; }
.ce-facts li:nth-child(1) { background: var(--ce-sky); border-color: transparent; }
.ce-facts li:nth-child(2) { background: var(--ce-blush); border-color: transparent; }
.ce-facts li:nth-child(3) { background: #f7ecc9; border-color: transparent; }
.ce-facts strong { display: block; font-family: var(--font-title); font-weight: 300; font-size: clamp(30px, 3vw, 40px); line-height: 1; color: var(--teal-deep); }
.ce-facts span { display: block; margin-top: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }

/* ---------- Ray-Ban Kids ---------- */
.ce-rb__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.ce-rb__logo { display: block; width: 120px; height: auto; margin-bottom: 18px; }
.ce-rb__copy > p:not([class]) { margin-top: 14px; font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); }
.ce-rb__copy .text-link { margin-top: 22px; }
.ce-rb__stack { position: relative; height: clamp(360px, 38vw, 480px); list-style: none; padding: 0; margin: 0; }
.ce-rb__card {
  position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: #f2f2f2; box-shadow: 0 24px 50px -28px rgba(31, 31, 31, .45);
}
.ce-rb__card img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); }
.ce-rb__card--1 { top: 0; left: 4%; border: 10px solid var(--ce-blush); }
.ce-rb__card--2 { top: 14%; right: 0; width: 46%; border: 10px solid var(--ce-sky); }
.ce-rb__card--3 { bottom: 0; left: 26%; width: 44%; border: 10px solid #f7ecc9; }
@media (prefers-reduced-motion: no-preference) {
  .ce-rb__card { animation: ceFloat 7s ease-in-out infinite; }
  .ce-rb__card--2 { animation-delay: -2.3s; }
  .ce-rb__card--3 { animation-delay: -4.6s; }
}
@keyframes ceFloat { 50% { transform: translateY(-10px); } }

.ce-coll { margin-top: clamp(56px, 7vw, 96px); }
.ce-switch { display: flex; justify-content: center; gap: 8px; border: 0; padding: 0; margin: 0 auto clamp(26px, 3.6vw, 40px); }
.ce-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ce-switch label {
  padding: 12px 24px; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  transition: background .3s, color .3s, border-color .3s;
}
.ce-switch label:hover { color: var(--teal); border-color: var(--teal); }
.ce-switch input:checked + label { background: var(--teal); border-color: var(--teal); color: var(--white); }
.ce-switch input:focus-visible + label { outline: 2px solid var(--teal); outline-offset: 3px; }

.ce-prods { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); list-style: none; padding: 0; }
.ce-coll:has(#ce-type-sun:checked) .ce-prods--sun,
.ce-coll:has(#ce-type-opt:checked) .ce-prods--opt { display: grid; }
.ce-prods li { animation: ceIn .6s var(--ease-out) both; }
.ce-prods li:nth-child(2) { animation-delay: .05s; } .ce-prods li:nth-child(3) { animation-delay: .1s; }
.ce-prods li:nth-child(4) { animation-delay: .15s; } .ce-prods li:nth-child(5) { animation-delay: .2s; }
.ce-prods li:nth-child(6) { animation-delay: .25s; } .ce-prods li:nth-child(7) { animation-delay: .3s; }
.ce-prods li:nth-child(8) { animation-delay: .35s; }
@keyframes ceIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ce-prod__img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; background: #f3f3f3; }
.ce-prod__img img { display: block; width: 100%; height: 100%; object-fit: contain; transform: scale(1.08); transition: transform .9s var(--ease-out); }
.ce-prod:hover .ce-prod__img img { transform: scale(1.14) rotate(-1.5deg); }
.ce-prod__name { margin-top: 12px; font-family: var(--font-title); font-weight: 300; font-size: 20px; line-height: 1.15; color: var(--ink); }
.ce-prod__colour { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
@media (min-width: 1001px) { .ce-prods--opt { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 75%; margin-inline: auto; } }
.ce-coll__note { max-width: 620px; margin: 28px auto 0; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- When to come in ---------- */
.ce-when__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.ce-when__copy > p { margin-top: 14px; font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); }
.ce-when__copy > p.ce-when__lead { font-size: 18px; line-height: 1.6; color: var(--ink); }
.ce-when__copy .text-link { margin-top: 22px; }
.ce-when__list { padding: clamp(26px, 3.4vw, 40px); border-radius: 26px; background: var(--white); box-shadow: 0 24px 60px -36px rgba(31, 31, 31, .35); }
.ce-when__list h3 { font-family: var(--font-title); font-weight: 300; font-size: clamp(24px, 2.4vw, 30px); color: var(--ink); margin-bottom: 18px; }
.ce-checks { list-style: none; padding: 0; display: grid; gap: 12px; }
.ce-checks li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.ce-checks li::before {
  content: ""; position: absolute; left: 0; top: .1em; width: 20px; height: 20px; border-radius: 50%; background: var(--ce-sky);
}
.ce-checks li::after {
  content: ""; position: absolute; left: 7px; top: calc(.1em + 4px); width: 5px; height: 9px;
  border: solid var(--teal-deep); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Choosing and fitting ---------- */
.ce-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); list-style: none; padding: 0; }
.ce-steps li { padding: 28px 26px; border-top: 3px solid var(--teal); background: var(--cream-2); border-radius: 0 0 20px 20px; }
.ce-steps__n { font-family: var(--font-title); font-weight: 300; font-size: 40px; line-height: 1; color: var(--gold); }
.ce-steps h3 { margin: 14px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); }
.ce-steps p { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); }

.ce-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: clamp(56px, 7vw, 96px); }
.ce-split__media { margin: 0; position: sticky; top: 110px; border-radius: 28px; overflow: hidden; }
.ce-split__media img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.ce-guide__title { margin: 10px 0 20px; font-family: var(--font-title); font-weight: 300; font-size: clamp(28px, 3vw, 38px); color: var(--ink); }
.ce-guide__item { border-top: 1px solid var(--gold-soft); }
.ce-guide__item:last-of-type { border-bottom: 1px solid var(--gold-soft); }
.ce-guide__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; letter-spacing: .04em; color: var(--ink);
}
.ce-guide__item summary::-webkit-details-marker { display: none; }
.ce-guide__item summary:hover { color: var(--teal); }
.ce-guide__item summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.ce-guide__item summary i { position: relative; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 1px solid currentColor; }
.ce-guide__item summary i::before, .ce-guide__item summary i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%);
}
.ce-guide__item summary i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .3s; }
.ce-guide__item[open] summary i::after { transform: translate(-50%, -50%) rotate(0); }
.ce-guide__body { padding-bottom: 22px; }
.ce-guide__body p { font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.ce-guide__body p + p { margin-top: 12px; }

.ce-tips { margin-top: clamp(56px, 7vw, 96px); padding: clamp(28px, 4vw, 48px); border-radius: 28px; background: var(--teal-deep); color: var(--cream-2); }
.ce-tips h3 { font-family: var(--font-title); font-weight: 300; font-size: clamp(26px, 2.8vw, 34px); color: var(--cream-2); }
.ce-tips ol { counter-reset: tip; list-style: none; padding: 0; margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 36px; }
.ce-tips li { counter-increment: tip; position: relative; padding-left: 44px; font-size: 14.5px; line-height: 1.65; opacity: .92; }
.ce-tips li::before {
  content: counter(tip); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ce-sun); color: var(--teal-deep); font-weight: 700; font-size: 13px;
}

/* ---------- Contact lenses + squint ---------- */
.ce-more__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); align-items: start; }
.ce-card { border-radius: 26px; overflow: hidden; background: var(--white); box-shadow: 0 24px 60px -40px rgba(31, 31, 31, .4); }
.ce-card__img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 18%; }
.ce-card__body { padding: clamp(24px, 3vw, 36px); }
.ce-card__title { margin: 10px 0 14px; font-family: var(--font-title); font-weight: 300; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.1; color: var(--ink); }
.ce-card__body p { font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.ce-card__more { margin-top: 14px; }
.ce-card__more summary {
  display: inline-flex; cursor: pointer; list-style: none; padding-bottom: 3px; border-bottom: 1px solid currentColor;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal);
}
.ce-card__more summary::-webkit-details-marker { display: none; }
.ce-card__more[open] summary { margin-bottom: 12px; }
.ce-card__more p + p { margin-top: 12px; }

/* ---------- Related links ---------- */
.ce-links__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; }
.ce-links__grid a {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px 22px; border-radius: 20px;
  border: 1px solid var(--gold-soft); background: var(--cream-2); transition: background .3s, border-color .3s, transform .3s var(--ease-out);
}
.ce-links__grid a:hover { background: var(--white); border-color: var(--teal); transform: translateY(-3px); }
.ce-links__k { font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); }
.ce-links__t { flex: 1; font-family: var(--font-title); font-weight: 300; font-size: 21px; line-height: 1.2; color: var(--ink); }
.ce-links__grid .arrow { margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ce-links__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .ce-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ce-rb__grid, .ce-when__grid, .ce-split { grid-template-columns: 1fr; }
  .ce-split__media { position: static; max-width: 520px; }
  .ce-steps { grid-template-columns: 1fr; }
  .ce-more__grid { grid-template-columns: 1fr; }
  .ce-tips ol { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .ce-facts { grid-template-columns: 1fr; }
  .ce-links__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ce-rb__stack { height: 300px; }
  .ce-prod__name { font-size: 17px; }
  .ce-links__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ce-prods li { animation: none; }
}
