/* Shop the 11.11 Deals grid. Every selector is scoped to .toh-deals so the
   Sober theme and WooCommerce loop styles never leak in or out. */
.toh-deals {
  --td-bg: #f6eee8;
  --td-card: #ffffff;
  --td-ink: #3a1a33;
  --td-muted: #6f5a66;
  --td-plum: #5a1f4f;
  --td-plum-hover: #461739;
  --td-sale: #a3214f;
  --td-line: rgba(58, 26, 51, 0.10);
  --td-radius: 16px;
  --td-sans: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --td-serif: Georgia, "Times New Roman", serif;
  background: var(--td-bg);
  color: var(--td-ink);
  font-family: var(--td-sans);
  padding: 64px 0 72px;
  scroll-margin-top: 90px;
}
.toh-deals[hidden] { display: none !important; }
.toh-deals *, .toh-deals *::before, .toh-deals *::after { box-sizing: border-box; }
.toh-deals__inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.toh-deals__head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.toh-deals .toh-deals__kicker {
  margin: 0 0 10px; color: var(--td-sale); font-family: var(--td-sans);
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.toh-deals .toh-deals__title {
  margin: 0; color: var(--td-ink); font-family: var(--td-serif); font-weight: 700;
  font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; letter-spacing: 0; text-transform: none;
}
.toh-deals .toh-deals__intro { margin: 12px 0 0; color: var(--td-muted); font-size: 16px; line-height: 1.6; }

.toh-deals .toh-deals__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  margin: 0; padding: 0; list-style: none;
}
.toh-deals .toh-deals__item { margin: 0; padding: 0; list-style: none; min-width: 0; }
.toh-deals .toh-deals__item::before { content: none; }

.toh-deal {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--td-card); border-radius: var(--td-radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(58, 26, 51, 0.06), 0 8px 24px rgba(58, 26, 51, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.toh-deal:focus-within { box-shadow: 0 0 0 2px var(--td-plum), 0 8px 24px rgba(58, 26, 51, 0.10); }

.toh-deals .toh-deal__media {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
  background: #faf6f3; border: 0; text-decoration: none;
}
.toh-deals .toh-deal__media img {
  display: block; width: 100%; height: 100%; max-width: none; margin: 0;
  object-fit: cover; border-radius: 0; transition: transform 0.45s ease;
}
.toh-deal__noimg { display: block; width: 100%; height: 100%; }
.toh-deal.is-out .toh-deal__media img { opacity: 0.6; }

.toh-deal__badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: 0.02em;
}
.toh-deal__badge--sale { background: var(--td-sale); color: #fff; }
.toh-deal__badge--featured { background: rgba(255, 255, 255, 0.92); color: var(--td-plum); box-shadow: inset 0 0 0 1px rgba(90, 31, 79, 0.25); font-weight: 600; }
.toh-deal__badge--out { background: #3d3a3c; color: #fff; }

.toh-deal__body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.toh-deals .toh-deal__title {
  margin: 0 0 10px; font-family: var(--td-sans); font-size: 15px; font-weight: 500;
  line-height: 1.4; letter-spacing: 0; text-transform: none;
  overflow-wrap: anywhere; min-height: 2.8em;
}
.toh-deals .toh-deal__title a { color: var(--td-ink); text-decoration: none; border: 0; }
.toh-deals .toh-deal__title a:hover { color: var(--td-plum); }
.toh-deals .toh-deal__title a:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 3px; }

.toh-deals .toh-deal__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; line-height: 1.25; }
.toh-deal__now { color: var(--td-ink); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.toh-deal__now.is-sale { color: var(--td-sale); }
.toh-deals .toh-deal__was { color: var(--td-muted); font-size: 14px; font-weight: 400; text-decoration: line-through; opacity: 1; }

.toh-deals .toh-deal__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; }
.toh-deal__save { color: var(--td-sale); font-weight: 600; }
.toh-deal__tax { color: var(--td-muted); }

.toh-deals .toh-deal__stock { margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: #2f6b4a; }
.toh-deals .toh-deal__stock--out-of-stock { color: #8a2b2b; font-weight: 600; }
.toh-deals .toh-deal__stock--available-on-backorder { color: #8a5a12; }

.toh-deal__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; padding-top: 16px; }
.toh-deals a.toh-deal__btn,
.toh-deals a.toh-deal__btn:visited {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; max-width: 100%; min-height: 44px;
  margin: 0; padding: 10px 16px; border: 0; border-radius: 10px;
  background: var(--td-plum); color: #fff; box-shadow: none;
  font-family: var(--td-sans); font-size: 14px; font-weight: 600; line-height: 1.2;
  letter-spacing: 0.01em; text-transform: none; text-decoration: none; text-align: center;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.toh-deals a.toh-deal__btn:hover { background: var(--td-plum-hover); color: #fff; }
.toh-deals a.toh-deal__btn:focus-visible { outline: 2px solid var(--td-plum); outline-offset: 3px; }
.toh-deals a.toh-deal__btn--options,
.toh-deals a.toh-deal__btn--view { background: #fff; color: var(--td-plum); box-shadow: inset 0 0 0 1.5px var(--td-plum); }
.toh-deals a.toh-deal__btn--options:hover,
.toh-deals a.toh-deal__btn--view:hover { background: #f7eff5; color: var(--td-plum-hover); }
/* WooCommerce AJAX states: .loading while adding, .added + a "View cart" link afterwards. */
.toh-deals a.toh-deal__btn.loading { opacity: 0.65; pointer-events: none; }
.toh-deals a.toh-deal__btn.loading::after,
.toh-deals a.toh-deal__btn.added::after { content: none; display: none; }
.toh-deals a.toh-deal__btn.added::before { content: "\2713"; margin-right: 6px; }
.toh-deals .toh-deal__actions a.added_to_cart {
  display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none;
  color: var(--td-plum); font-size: 13px; font-weight: 600; text-align: center;
  text-decoration: underline; text-underline-offset: 3px;
}

.toh-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (hover: hover) and (pointer: fine) {
  .toh-deal:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(58, 26, 51, 0.06), 0 18px 36px rgba(58, 26, 51, 0.12); }
  .toh-deal:hover .toh-deal__media img { transform: scale(1.04); }
}

/* 4 columns down to 900px, so 8 products always form two full rows; 2 columns below. */
@media (max-width: 1100px) {
  .toh-deals .toh-deals__grid { gap: 16px; }
  .toh-deal__body { padding: 14px 14px 16px; }
}
@media (max-width: 899px) {
  .toh-deals { padding: 48px 0 56px; }
  .toh-deals__head { margin-bottom: 28px; }
  .toh-deals .toh-deals__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 600px) {
  .toh-deals__inner { width: calc(100% - 32px); }
  .toh-deals .toh-deals__intro { font-size: 15px; }
  .toh-deals .toh-deals__grid { gap: 12px; }
  .toh-deal { border-radius: 12px; }
  .toh-deal__badge { top: 8px; left: 8px; padding: 4px 8px; font-size: 11px; }
  .toh-deal__body { padding: 12px 12px 14px; }
  .toh-deals .toh-deal__title { font-size: 13.5px; margin-bottom: 8px; }
  .toh-deal__now { font-size: 17px; }
  .toh-deals .toh-deal__was { font-size: 12.5px; }
  .toh-deals .toh-deal__meta, .toh-deals .toh-deal__stock { font-size: 11.5px; }
  .toh-deal__actions { padding-top: 12px; }
  .toh-deals a.toh-deal__btn { min-height: 44px; padding: 10px 8px; font-size: 13px; }
}
@media (max-width: 339px) {
  .toh-deals .toh-deals__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .toh-deal, .toh-deal__media img, .toh-deals a.toh-deal__btn { transition: none; }
  .toh-deal:hover { transform: none; }
  .toh-deal:hover .toh-deal__media img { transform: none; }
}
