/* Colon landing — styled after the YouCan product page it clones. */
:root {
  --primary: #803160;
  --buy: #ff0000;
  --text: #000;
  --muted: #747474;
  --border: #e3e3e3;
  --bg: #fff;
  --bg-soft: #f7f7f7;
  --stars: #9cff07;
  --error: #d92020;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding-bottom: 84px; /* room for the sticky button */
}
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.header__icon { background: none; border: 0; padding: 8px; color: var(--text); cursor: pointer; }
/* The logo file has wide white margins: show only the wordmark (≈ x 11–89%, y 26–77% of the image). */
.header__logo { position: relative; display: block; width: 154px; height: 40px; overflow: hidden; }
.header__logo img { position: absolute; left: -22px; top: -20px; width: 198px; height: 78px; max-width: none; }
/* EasyChic logo (women's page): crop the whitespace around the wordmark */
.header__logo--easychic { width: 152px; height: 42px; }
.header__logo--easychic img { left: -11px; top: -13px; width: 169px; height: 68px; }

/* ---------- Product layout ---------- */
.product { padding-top: 30px; padding-bottom: 30px; display: grid; gap: 24px; }
@media (min-width: 900px) {
  .product { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .product__gallery { position: sticky; top: 20px; }
}

/* Image slots: show a soft placeholder until the real image is added. */
.img-slot { position: relative; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.img-slot img { width: 100%; height: auto; }
.img-slot__label { display: none; }
.img-slot.is-empty img { display: none; }
.img-slot.is-empty .img-slot__label {
  display: grid; place-items: center; position: absolute; inset: 0;
  color: #aaa; font-weight: 700; border: 2px dashed #ddd; border-radius: 6px;
}
.img-slot--square.is-empty { aspect-ratio: 1 / 1; }
.img-slot--tall.is-empty { aspect-ratio: 840 / 1600; }

.product__title { font-size: 26px; font-weight: 800; margin: 0; line-height: 1.4; }
.stars { color: var(--stars); font-size: 22px; letter-spacing: 6px; margin: 6px 0 4px; }

.price { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 8px 0 18px; }
.price__after { color: var(--primary); font-size: 26px; font-weight: 800; }
.price__before { color: var(--muted); font-size: 18px; text-decoration: line-through; }
.price small { font-size: .7em; font-weight: 600; }
.price__badge { background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 4px 8px; }

/* ---------- Checkout form ---------- */
.checkout { border: 2px dashed var(--primary); border-radius: 8px; padding: 16px; background: #fff; scroll-margin-top: 20px; }
.checkout__title { margin: 0 0 12px; font-weight: 700; text-align: center; }
.checkout__total { margin: 10px 0 0; text-align: center; color: var(--muted); }
.checkout__total strong { color: var(--primary); font-size: 18px; }

.field { position: relative; margin-bottom: 10px; }
.field input {
  width: 100%; height: 48px; padding: 0 44px 0 12px;
  border: 1px solid #ccc; border-radius: 6px; background: #fff; color: var(--text);
  font-size: 16px; outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--primary); }
.field input[type=tel] { text-align: right; }
.field__icon { position: absolute; right: 0; top: 0; width: 44px; height: 48px; display: grid; place-items: center; color: #555; pointer-events: none; }
.field__error { margin: 4px 2px 0; font-size: 13px; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }
.field.is-invalid input { border-color: var(--error); }

.buy-row { display: flex; gap: 10px; align-items: stretch; margin-top: 14px; }
.qty { display: flex; border: 1px solid #f0f0f0; border-radius: 6px; overflow: hidden; flex: 0 0 auto; }
.qty__btn { width: 40px; border: 0; background: #f0f0f0; color: #333; font-size: 20px; cursor: pointer; }
.qty__input { width: 44px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty__input::-webkit-inner-spin-button, .qty__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.btn-buy {
  flex: 1; position: relative; min-height: 52px; padding: 10px 16px;
  border: 0; border-radius: 6px; background: var(--buy); color: #fff;
  font-size: 18px; font-weight: 800; cursor: pointer; width: 100%;
}
.btn-buy:disabled { opacity: .8; cursor: progress; }
.btn-buy.pulsed { animation: pulse 2s infinite; }
.btn-buy.pulsed:hover { animation: none; }
@keyframes pulse {
  0%   { transform: scale(.95); box-shadow: 0 0 0 0 rgba(255, 0, 0, .7); }
  70%  { transform: scale(1);   box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
  100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-left: 8px; }
.btn-buy.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__error { color: var(--error); text-align: center; margin: 8px 0 0; font-size: 14px; }
.form__error:empty { display: none; }

.description { margin-top: 24px; display: grid; gap: 0; }
.description img { width: 100%; height: auto; }

/* Invisible clickable area over a button drawn inside an image. Add ?hotspots to the URL to see it. */
.hotspot-wrap { position: relative; }
.hotspot {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  background: transparent; border: 0; padding: 0; border-radius: 12px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hotspot:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.debug-hotspots .hotspot { background: rgba(0, 200, 255, .35); outline: 2px dashed #00a; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 30px 0; margin-top: 20px; }
.footer__inner { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer h3 { font-size: 16px; margin: 0 0 8px; }
.footer a { display: block; color: #444; text-decoration: none; font-size: 14px; padding: 2px 0; }
.footer a:hover { color: var(--primary); }

/* ---------- Sticky button ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.1);
  transform: translateY(110%); transition: transform .25s;
}
.sticky.is-visible { transform: none; }
@media (min-width: 900px) { .sticky .btn-buy { max-width: 520px; margin: 0 auto; display: block; } }

/* ---------- Success modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__card { background: #fff; border-radius: 12px; padding: 28px 20px 20px; max-width: 380px; width: 100%; text-align: center; }
.modal__icon { width: 64px; height: 64px; border-radius: 50%; background: #1fa64a; color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.modal__card h2 { font-size: 20px; margin: 0 0 6px; outline: none; }
.modal__card p { margin: 0 0 18px; color: #555; }

@media (prefers-reduced-motion: reduce) { .btn-buy.pulsed { animation: none; } }
