/* ============================================================
   Glow & Lovely UAE — Win Gold campaign
   Brand pink: #EC008C   Asterisk red: #E4002B
   Layout: mobile-first, 1080x1920 vertical design @ ~540 CSS px
   ============================================================ */

:root {
  --pink: #ec008c;
  --pink-dark: #c20074;
  --red: #e4002b;
  --ink: #1f1f1f;
  --marble-1: #f6f1ea;
  --marble-2: #efe7dc;
  --radius: 16px;
  --maxw: 600px;
  --pad: 5.5%;
}

* { box-sizing: border-box; }

/* Ensure the [hidden] attribute always wins over display rules below
   (e.g. .thank-card { display:flex }), so the thank-you card stays
   hidden until JS reveals it. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

/* Marble fills the whole viewport behind the centered column */
body {
  background:
    radial-gradient(120% 60% at 80% 8%, rgba(201,162,74,.10), transparent 60%),
    radial-gradient(90% 50% at 5% 92%, rgba(201,162,74,.10), transparent 60%),
    linear-gradient(135deg, var(--marble-1), var(--marble-2));
  background-attachment: fixed;
  min-height: 100vh;
}

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  background:
    linear-gradient(135deg, var(--marble-1), var(--marble-2));
  overflow: hidden;
}

/* ---- Artwork bands (shared bg.jpg, top badge + bottom products) ---- */
.hero,
.products {
  background-image: url("../img/bg.jpg");
  background-repeat: no-repeat;
  background-size: 100% auto;
  width: 100%;
}
.hero {
  background-position: top center;
  padding-top: 46%;   /* reveals the gold WIN GOLD badge + headline */
}
.products {
  background-position: bottom center;
  padding-top: 50%;   /* reveals the product lineup */
}

/* ---- Content / cards ---- */
.content {
  padding: 6px var(--pad) 4px;
}

.card {
  background: #fff;
  border: 2px solid var(--pink);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
  padding: 18px 16px 16px;
}

/* ---- Form layout ---- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.field { margin-bottom: 11px; display: flex; flex-direction: column; }
.field.full { width: 100%; }

label {
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}
.req { color: var(--red); font-weight: 700; }

input[type="text"],
input[type="tel"],
input[type="email"],
select {
  width: 100%;
  height: 38px;
  border: 2px solid var(--pink);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: box-shadow .15s, border-color .15s;
}
input:focus,
select:focus {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 3px rgba(236, 0, 140, .15);
}
input.invalid,
select.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, .12);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ec008c' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

/* ---- Upload ---- */
.upload {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--pink);
  border-radius: 6px;
  padding: 4px 4px 4px 10px;
  min-height: 38px;
}
.upload-text {
  flex: 1;
  font-size: 13px;
  color: #8a8a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-choose {
  flex: none;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-choose:hover { background: var(--pink-dark); }

.hint { font-size: 11px; color: #8a8a8a; margin-top: 5px; }

.file-list { list-style: none; margin: 8px 0 0; padding: 0; }
.file-list li {
  font-size: 13px;
  color: var(--ink);
  background: #fdf0f7;
  border: 1px solid #f6cbe4;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.file-list li.bad { background: #fdeaec; border-color: #f4c4cb; color: var(--red); }
.file-list button {
  border: none; background: none; color: var(--pink);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px;
}

/* ---- Agreement ---- */
.agree {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 2px;
  cursor: pointer;
}
.agree input {
  width: 18px; height: 18px; flex: none;
  accent-color: var(--pink);
  cursor: pointer;
}
.agree a { color: var(--pink); text-decoration: none; }
.agree a:hover { text-decoration: underline; }

/* ---- Submit + errors ---- */
.btn-submit {
  width: 100%;
  margin-top: 12px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn-submit:hover { background: var(--pink-dark); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.form-error {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  background: #fdeaec;
  border: 1px solid #f4c4cb;
  border-radius: 7px;
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
}
.form-error.show { display: block; }

/* ---- Thank you card ---- */
.thank-card {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.thank-title {
  margin: 0;
  color: var(--pink);
  font-weight: 800;
  font-size: clamp(30px, 8.5vw, 46px);
  line-height: 1.12;
  letter-spacing: .5px;
}

/* ---- Terms & Conditions popup ---- */
.tc-link { color: var(--pink); text-decoration: none; cursor: pointer; }
.tc-link:hover { text-decoration: underline; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 16, .55);
}
.modal-card {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--pink);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  animation: modalIn .18s ease-out;
}
@keyframes modalIn {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal-card h2 {
  margin: 0;
  padding: 20px 24px 14px;
  color: var(--pink);
  font-size: 22px;
  font-weight: 700;
  border-bottom: 1px solid #f1e3ec;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  background: #fbe9f3;
  color: var(--pink);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: #f6d3e6; }
.modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}
.modal-body h3 { font-size: 15px; margin: 18px 0 4px; color: var(--ink); }
.modal-body p { margin: 4px 0; }

.tc-list { margin: 0; padding-left: 20px; }
.tc-list li { margin-bottom: 14px; padding-left: 4px; }
.tc-list li::marker { color: var(--pink); font-weight: 700; }
.tc-en { display: block; }
.tc-ar { display: block; margin-top: 4px; color: #666; direction: rtl; font-size: 13.5px; }
.tc-note {
  background: #fdf0f7;
  border: 1px solid #f6cbe4;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.modal-foot {
  padding: 14px 24px;
  border-top: 1px solid #f1e3ec;
  text-align: right;
}
.btn-modal {
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-modal:hover { background: var(--pink-dark); }

/* ---- Only stack the paired fields on very small phones ---- */
@media (max-width: 359px) {
  .grid { grid-template-columns: 1fr; }
  .grid .field { margin-bottom: 16px; }
}
