/* DealsDasher public UI refinement layer — 2026-10-06
   Loaded after page-specific styles. Keep this focused on shared visual language,
   not page-specific layout behavior. */
:root{
  --dd-ui-ink:#18151a;
  --dd-ui-text:#4b5563;
  --dd-ui-muted:#6b7280;
  --dd-ui-primary:#800329;
  --dd-ui-primary-dark:#640220;
  --dd-ui-accent:#f8a82c;
  --dd-ui-surface:#fff;
  --dd-ui-bg:#f8f9fa;
  --dd-ui-line:#eee3e7;
  --dd-ui-line-strong:#e5d6dc;
  --dd-ui-radius-sm:12px;
  --dd-ui-radius:18px;
  --dd-ui-radius-lg:24px;
  --dd-ui-shadow:0 10px 28px rgba(24,21,26,.065);
  --dd-ui-shadow-hover:0 16px 38px rgba(24,21,26,.10);
  --dd-ui-section-gap:clamp(48px,6vw,76px);
  --dd-ui-heading-gap:clamp(22px,3vw,34px);
  --dd-ui-grid-gap:clamp(16px,2vw,24px);
}

html{scroll-behavior:smooth}
body,body.bg-light{
  color:var(--dd-ui-ink);
  background:var(--dd-ui-bg)!important;
  font-family:Poppins,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:15px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* Typography */
main :where(h1,h2,h3,h4,h5,h6){
  color:var(--dd-ui-ink);
  font-family:Poppins,system-ui,sans-serif;
  letter-spacing:-.025em;
}
main h2{font-weight:800!important}
main h3{font-weight:800!important}
main h4,main h5,main h6{font-weight:750!important}

main h2:not(.h1):not(.h2):not(.h3):not(.h4):not(.h5):not(.h6):not(.dd-store-profile__title):not(.dd-coupon-title):not(.modal-title){
  font-size:clamp(1.55rem,2.35vw,2rem);
  line-height:1.22;
}

main h3:not(.h1):not(.h2):not(.h3):not(.h4):not(.h5):not(.h6):not(.dd-coupon-title):not(.blog-card-title):not(.blog-card__title):not(.compdeals-card__title){
  font-size:clamp(1.05rem,1.6vw,1.25rem);
  line-height:1.3;
}

main :where(p,li,dd){
  line-height:1.72;
}
main p{color:var(--dd-ui-text)}
main small,.text-muted{color:var(--dd-ui-muted)!important}

/* One section-heading tier across old and new templates. Alignment is left to the component. */
:where(.heading,.section-heading,.section-title,.sec_headings,.sect-heading,.dd-section-title,.store-section-heading h2,.stores-section__header h2,.main-category-header h2){
  color:var(--dd-ui-ink)!important;
  font-family:Poppins,system-ui,sans-serif!important;
  font-size:clamp(1.55rem,2.35vw,2rem)!important;
  font-weight:800!important;
  line-height:1.22!important;
  letter-spacing:-.025em!important;
  padding-top:0!important;
  padding-bottom:0!important;
  margin-top:0;
  margin-bottom:clamp(18px,2.3vw,28px)!important;
}
.section-heading:after{display:none!important}

:where(.section-subheading,.section-subtitle,.dd-section-sub,.dd-page-lead){
  color:var(--dd-ui-muted)!important;
  font-weight:400!important;
  line-height:1.72!important;
}

/* Section rhythm: shared public content sections only. */
:where(.dd-section,.content-section,.stores-section,.coupons-list-section,.categories-content,.browse-categories,.popular-stores,.post-content-section,.sitemap-main){
  padding-top:var(--dd-ui-section-gap);
  padding-bottom:var(--dd-ui-section-gap);
}
:where(.dd-section,.content-section,.stores-section,.coupons-list-section,.categories-content,.browse-categories,.popular-stores,.post-content-section)+
:where(.dd-section,.content-section,.stores-section,.coupons-list-section,.categories-content,.browse-categories,.popular-stores,.post-content-section){
  padding-top:0;
}

/* Cards and panels: same edge, radius and depth without changing component padding/layout. */
:where(
  .card,.dd-content-card,.dd-form-card,.dd-side-card,.dd-store-profile,.dd-sidebar-trust,
  .dd-intelligence-card,.dd-offer-guide,.store-card,.store-card-row,.store-section,
  .home-store,.home-coupon,.home-product,.blog-card,.dd-blog-card,.dd-cat-card,.dd-store-card,
  .dd-product-card,.dd-deal-card,.filter-panel,.blog-search-card,.sitemap-section,
  .highlight-box,.method-card,.process-step,.subcategory-card,.direct-category-card
){
  border-color:var(--dd-ui-line)!important;
  border-radius:var(--dd-ui-radius)!important;
  box-shadow:var(--dd-ui-shadow)!important;
  background:var(--dd-ui-surface)!important;
}
:where(.home-store,.home-coupon,.home-product,.blog-card,.dd-blog-card,.dd-cat-card,.dd-store-card,.dd-product-card,.dd-deal-card,.store-card-row,.subcategory-card,.direct-category-card){
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
:where(.home-store,.home-coupon,.home-product,.blog-card,.dd-blog-card,.dd-cat-card,.dd-store-card,.dd-product-card,.dd-deal-card,.store-card-row,.subcategory-card,.direct-category-card):hover{
  border-color:rgba(128,3,41,.20)!important;
  box-shadow:var(--dd-ui-shadow-hover)!important;
  transform:translateY(-2px);
}

/* Common custom grids */
:where(.dd-method-grid,.dd-history-metrics,.dd-sale-basket-grid,.compdeals__grid,.blog-grid,.categories-grid,.stores-grid,.product-grid){
  gap:var(--dd-ui-grid-gap)!important;
}

/* Buttons */
:where(.btn-primary,.dd-btn-primary,.dd-product-btn,.content-coupon-card__btn,.read-more-btn){
  background:var(--dd-ui-primary)!important;
  border-color:var(--dd-ui-primary)!important;
  border-radius:999px!important;
  color:#fff!important;
  font-weight:800!important;
}
:where(.btn-primary,.dd-btn-primary,.dd-product-btn,.content-coupon-card__btn,.read-more-btn):hover{
  background:var(--dd-ui-primary-dark)!important;
  border-color:var(--dd-ui-primary-dark)!important;
  color:#fff!important;
}
:where(.btn-outline-primary,.coupon-filter-btn){
  border-radius:999px!important;
  font-weight:750!important;
}

/* Forms */
:where(.form-control,.form-select,textarea.form-control){
  border:1px solid var(--dd-ui-line-strong)!important;
  border-radius:14px!important;
  min-height:46px;
  color:var(--dd-ui-ink);
  background:#fff;
  box-shadow:none!important;
}
textarea.form-control{min-height:110px}
:where(.form-control,.form-select,textarea.form-control):focus{
  border-color:rgba(128,3,41,.42)!important;
  box-shadow:0 0 0 4px rgba(128,3,41,.08)!important;
}
.form-label{color:#30282d;font-weight:700}

/* Lists, dividers and tables */
main hr{border-color:var(--dd-ui-line);opacity:1}
main table{
  border-color:var(--dd-ui-line)!important;
  border-radius:var(--dd-ui-radius-sm);
}
main table th{
  font-weight:800;
}

/* Sidebars should feel related, but intentionally more compact than main content cards. */
:where(.sidebar-section,.dd-store-profile,.dd-sidebar-trust,.dd-side-card){
  border:1px solid var(--dd-ui-line)!important;
}
.sidebar-section{border-radius:var(--dd-ui-radius)!important}
.sidebar-section .sd-heading{
  color:var(--dd-ui-ink);
  font-weight:800;
  letter-spacing:-.015em;
}
.sidebar-section .related-stores li+li{border-top:1px solid #f3edef}
.sidebar-section .related-stores a{line-height:1.45}

/* Article/content copy */
:where(.about-content,.blog-content,.content-copy,.dd-content-card){
  color:var(--dd-ui-text);
}
:where(.about-content,.blog-content,.content-copy,.dd-content-card) p{
  margin-bottom:1rem;
  line-height:1.75!important;
}
:where(.about-content,.blog-content,.content-copy) h2{
  margin-top:clamp(30px,4vw,44px)!important;
  margin-bottom:14px!important;
}
:where(.about-content,.blog-content,.content-copy) h3{
  margin-top:26px!important;
  margin-bottom:10px!important;
}

/* Mobile refinement */
@media(max-width:767px){
  body,body.bg-light{font-size:14.5px}
  :root{--dd-ui-section-gap:42px;--dd-ui-grid-gap:16px}
  :where(.heading,.section-heading,.section-title,.sec_headings,.sect-heading,.dd-section-title,.store-section-heading h2,.stores-section__header h2,.main-category-header h2){
    margin-bottom:18px!important;
  }
}
