/* ============================================================================
   Warehouse Clearance Deals — Deals by Location directory (from Deals by Location.dc.html).
   ========================================================================== */

/* The filter toggles [hidden] on cards/pills/groups — never let a display
   rule defeat it (the recurring UA-stylesheet bug). */
.wcddl [hidden] { display: none !important; }

/* ---- Hero ---- */
.wcddl-hero { background: linear-gradient(180deg, var(--wcd-primary-tint) 0%, #faf8f6 60%, #fff 100%); padding-top: 16px; }
.wcddl-hero__inner { max-width: 840px; margin: 0 auto; padding: 44px 22px 46px; text-align: center; }
.wcddl-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wcd-primary); background: #fff; border: 1px solid var(--wcd-primary-tint-2); padding: 7px 15px; border-radius: var(--wcd-r-pill); margin-bottom: 22px; }
.wcddl-h1 { margin: 0; font-size: 58px; line-height: 1.03; font-weight: 600; letter-spacing: -.025em; color: var(--wcd-ink); }
.wcddl-sub { margin: 20px auto 0; max-width: 600px; font-size: 20px; line-height: 1.5; font-weight: 300; color: #484850; }
.wcddl-x97 { font-weight: 500; color: var(--wcd-ink); }
.wcddl-x97 span { color: var(--wcd-navy); }
.wcddl-stats { display: flex; justify-content: center; gap: 44px; margin-top: 34px; flex-wrap: wrap; }
.wcddl-stat__n { font-size: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--wcd-primary); }
.wcddl-stat__l { font-size: 13px; color: var(--wcd-muted); margin-top: 2px; }
.wcddl-alldeals { max-width: 660px; margin: 38px auto 0; background: #fff; border: 1px solid var(--wcd-line-soft); border-radius: var(--wcd-r-md); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left; box-shadow: 0 16px 38px -26px rgba(36,52,71,.5); }
.wcddl-alldeals__main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.wcddl-alldeals__icon { flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--wcd-primary-tint); display: flex; align-items: center; justify-content: center; }
.wcddl-alldeals__t { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--wcd-ink); }
.wcddl-alldeals__b { font-size: 14px; line-height: 1.45; color: #707070; margin-top: 2px; }
.wcddl-alldeals__btn { flex: none; display: inline-flex; align-items: center; gap: 8px; background: var(--wcd-primary); color: #fff; border-radius: var(--wcd-r-pill); padding: 13px 22px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.wcddl-alldeals__btn:hover { background: var(--wcd-primary-dark); color: #fff; text-decoration: none; }
.wcddl-alldeals__btn span { font-size: 17px; line-height: 1; }

/* ---- Sticky filter + A–Z rail ---- */
.wcddl-sticky { position: sticky; top: 58px; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--wcd-line-soft); }
.wcddl-sticky__inner { padding-top: 14px; padding-bottom: 14px; display: flex; flex-direction: column; gap: 13px; }
.wcddl-searchwrap { position: relative; width: 100%; max-width: 620px; margin: 0 auto; }
.wcddl-searchwrap svg { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); }
.wcddl-searchwrap input { width: 100%; border: 1px solid var(--wcd-line); border-radius: var(--wcd-r-pill); background: #fff; padding: 15px 18px 15px 50px; font-size: 16px; color: var(--wcd-ink); outline: none; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.wcddl-searchwrap input:focus { border-color: var(--wcd-primary); box-shadow: 0 0 0 3px rgba(232,89,12,.12); }
.wcddl-searchwrap input::placeholder { color: #a1a1a8; font-weight: 400; }
.wcddl-alpha { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.wcddl-alpha button { width: 27px; height: 30px; border: none; background: transparent; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--wcd-primary); font-family: inherit; transition: background .18s, color .18s; }
.wcddl-alpha button:hover:not(:disabled) { background: var(--wcd-primary-tint); }
.wcddl-alpha button:disabled { color: #cfcfd6; cursor: default; }

/* ---- Groups ---- */
.wcddl-results { padding-top: 36px; padding-bottom: 20px; }
.wcddl-groups { display: flex; flex-direction: column; gap: 40px; }
.wcddl-group { scroll-margin-top: 130px; }
.wcddl-group__head { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; }
.wcddl-group__letter { font-size: 38px; font-weight: 700; color: var(--wcd-primary); letter-spacing: -.03em; line-height: 1; min-width: 34px; }
.wcddl-group__rule { flex: 1; height: 1px; background: var(--wcd-line-soft); }
/* Column flow (masonry-style), not a row grid: rows sized by their tallest
   card left dead air under short states. Columns pack tight, auto-balance,
   and read alphabetically downward like a phone directory. */
.wcddl-grid { columns: 322px 3; column-gap: 18px; }
.wcddl-card { border: 1px solid var(--wcd-line-soft); border-radius: var(--wcd-r-sm); padding: 20px 22px; background: #fff; transition: box-shadow .2s, border-color .2s; break-inside: avoid; margin-bottom: 18px; }
.wcddl-card:hover { box-shadow: 0 10px 30px -18px rgba(0,0,0,.22); border-color: var(--wcd-line-soft); }
.wcddl-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 15px; }
.wcddl-card__head h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.wcddl-card__head h3 a { color: var(--wcd-ink); }
.wcddl-card__head h3 a:hover { color: var(--wcd-primary); text-decoration: none; }
.wcddl-card__head span { flex: none; font-size: 12px; color: var(--wcd-muted); font-weight: 500; }
.wcddl-card__cities { display: flex; flex-wrap: wrap; gap: 8px 9px; }
.wcddl-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--wcd-ink); padding: 8px 13px; border-radius: var(--wcd-r-pill); background: var(--wcd-wash); transition: background .2s, color .2s; }
.wcddl-pill:hover { background: var(--wcd-primary-tint); color: var(--wcd-primary); text-decoration: none; }
.wcddl-pill span { font-size: 11px; color: #a1a1a8; font-weight: 500; }

/* ---- Empty state ---- */
.wcddl-empty { text-align: center; padding: 70px 20px 90px; }
.wcddl-empty svg { margin: 0 auto 14px; display: block; }
.wcddl-empty__t { font-size: 20px; font-weight: 600; color: var(--wcd-ink); }
.wcddl-empty p { margin: 8px 0 20px; font-size: 15px; color: var(--wcd-muted); }

/* ---- Missing-location note ---- */
.wcddl-notewrap { padding-top: 8px; padding-bottom: 56px; }
.wcddl-note { background: var(--wcd-wash); border-radius: var(--wcd-r-md); padding: 30px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wcddl-note__main { max-width: 560px; }
.wcddl-note__t { font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--wcd-ink); }
.wcddl-note p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: #707070; }
.wcddl-note .wcd-btn { flex: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.wcddl-h1 { font-size: 46px; }
	.wcddl-alpha { justify-content: flex-start; }
}
@media (max-width: 640px) {
	.wcddl-h1 { font-size: 36px; }
	.wcddl-grid { columns: 1; }
	.wcddl-stats { gap: 20px; }
	.wcddl-alldeals { flex-direction: column; align-items: stretch; }
	.wcddl-alldeals__btn { justify-content: center; }
}

/* Ad card in the state grid — occupies one cell, label only when filled,
   collapses to nothing (zero height, align-start) when no ad serves. */
.wcddl-adcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; break-inside: avoid; margin-bottom: 18px; }
.wcddl-adcard .wcd-adbar__label { display: none; }
.wcddl-adcard:has(iframe) .wcd-adbar__label { display: block; }

/* ---- Tag-directory variant (page-deals-by-category.php) ---- */
.wcddl-card--tags { break-inside: auto; margin-bottom: 0; }
.wcddl-adrow { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wcddl-adrow .wcd-adbar__label { display: none; }
.wcddl-adrow:has(iframe) { margin: 8px 0 34px; }
.wcddl-adrow:has(iframe) .wcd-adbar__label { display: block; }
