/* ===========================================================
   WEEKLY DEALS  (/weekly-deals)
   Layers on top of style.css. Tokens and lp- primitives come
   from there; nothing here redefines them.
   =========================================================== */

/* .nav-deals lives in style.css, not here, because the Deals link appears in
   the topbar on every page and this stylesheet only loads on this one. */

/* Hero savings line. Sits between the h1 and the sub, so it is the second
   thing read on the page. */
.deals-hero-save {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-light);
  margin: 0 0 16px;
}

.deals-hero-save strong {
  color: var(--accent);
  font-weight: inherit;
  font-size: 1.22em;
}

.deals-h2 {
  font-family: var(--font-head);
  color: var(--white);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  margin: 0 0 20px;
}

/* ---------- Deal card ---------- */

.deal-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: start;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 28px;
}

.deal-card + .deal-card { margin-top: 26px; }

.deal-card.is-closed {
  border-left-color: var(--dark-4);
  opacity: 0.72;
}

/* ---------- Media ---------- */

.deal-media {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--black);
  overflow: hidden;
}

.deal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--black);
}

/* The poster lives in a button rather than the video's poster attribute so it
   can carry alt text and lazy-load. The video itself is preload="none", so a
   card costs one small image until somebody actually presses play. */
.deal-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: block;
}

.deal-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deal-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Solid enough to hold the accent against a blown-out sky, which is what the
     top half of a phone walkaround usually is. */
  background: rgba(11, 12, 12, 0.82);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.4rem;
  padding-left: 4px; /* optically centers the play triangle */
  transition: background 0.2s ease, color 0.2s ease;
}

.deal-play:hover .deal-play-icon { background: var(--green); color: #fff; }
.deal-play:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.deal-media.is-playing .deal-play { display: none; }

/* ---------- Body ---------- */

.deal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.deal-badge {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--green);
  color: #fff;
  padding: 5px 11px;
}

.deal-badge.is-sold { background: var(--dark-4); color: var(--silver); }

.deal-category {
  font-family: var(--font-head);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
}

.deal-card h2 {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  color: var(--white);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 16px;
  line-height: 1.1;
}

.deal-price-row {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 18px;
}

/* Price on the left, savings on the right, so the eye lands on the number the
   buyer pays and then on what it beats. */
.deal-price-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.deal-msrp {
  margin: 0 0 2px;
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
}

.deal-msrp s { text-decoration: line-through; text-decoration-thickness: 2px; }

.deal-save {
  background: var(--green);
  border-left: 3px solid var(--accent);
  padding: 11px 18px;
  text-align: center;
  flex-shrink: 0;
}

.deal-save-amt {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05;
}

.deal-save-pct {
  display: block;
  margin-top: 3px;
  font-family: var(--font-head);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

/* Corner flag on the video, so the saving reads before any text does. */
.deal-save-tag {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  background: var(--accent);
  color: var(--black);
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 15px;
  pointer-events: none;
}

.deal-price {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0;
}

.deal-price.is-closed {
  color: var(--silver);
  text-decoration: line-through;
}

.deal-valid {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--silver);
}

.deal-specs {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 22px;
}

.deal-specs li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 0.95rem;
  color: var(--silver-light);
  line-height: 1.45;
}

.deal-specs i { color: var(--accent); font-size: 0.78rem; flex-shrink: 0; }

.deal-blurb {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--silver);
  margin: 0 0 22px;
}

.deal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* .lp-btn is styled as an <a>; the claim CTA is a <button> so it can carry the
   deal id into the form without a page jump. Normalize the box model. */
.deal-cta button.lp-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-head);
}

/* ---------- Facts ---------- */

.deals-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.deals-fact {
  background: var(--dark-2);
  border: 1px solid var(--border);
  padding: 22px 24px;
}

.deals-fact h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 10px;
}

.deals-fact p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--silver);
}

.deals-fact a { color: var(--accent); border-bottom: 1px solid var(--border-green); }
.deals-fact a:hover { border-bottom-color: var(--accent); }

/* ---------- Forms ---------- */

.deals-form-intro {
  color: var(--silver-light);
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0 0 26px;
  max-width: 66ch;
}

.deals-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  background: var(--dark-2);
  border: 1px solid var(--border);
  padding: 28px;
}

.deals-form .span-2 { grid-column: 1 / -1; }

.deals-field { display: flex; flex-direction: column; gap: 7px; }

.deals-field label {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
}

.deals-field label .opt { color: var(--dark-4); letter-spacing: 0.08em; }

.deals-field input,
.deals-field select {
  background: var(--dark);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.2s ease;
}

.deals-field input:focus,
.deals-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.deals-field input.invalid,
.deals-field select.invalid { border-color: #c0392b; }

.deals-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--silver) 50%),
                    linear-gradient(135deg, var(--silver) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.deals-turnstile { min-height: 65px; }

.deals-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.deals-actions button.lp-btn {
  border: 0;
  cursor: pointer;
  font-family: var(--font-head);
}

.deals-actions button.lp-btn:disabled { opacity: 0.55; cursor: default; }

.deals-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--silver);
}

.deals-note a { color: var(--accent); }

.deals-msg {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--dark);
  color: var(--silver-light);
}

.deals-msg.is-error { border-left-color: #c0392b; color: #e08a80; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .deal-card { grid-template-columns: 1fr; gap: 24px; padding: 22px; }
  .deal-media { max-width: 330px; margin: 0 auto; width: 100%; }
  .deals-facts { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .deal-specs { grid-template-columns: 1fr; }
  /* Stacked, the savings block reads better full width than floated right. */
  .deal-save { width: 100%; }
  .deals-form { grid-template-columns: 1fr; padding: 22px; }
  .deals-form .span-2 { grid-column: auto; }
  .deal-cta .lp-btn { width: 100%; text-align: center; }
  .deals-actions button.lp-btn { width: 100%; }
}
