/*
Theme Name: Done Right Appliances
Description: Storefront for Done Right Appliances. Black, brushed steel and gold, from the logo.
Version: 1.0.0
Requires PHP: 8.2
Text Domain: doneright
*/

:root {
  --ink: #0b0b0c;
  --charcoal: #16171a;
  --steel-50: #f6f7f8;
  --steel-100: #eceef1;
  --steel-200: #dde1e6;
  --steel-300: #c3c9d0;
  --steel-500: #6f7883;
  --steel-700: #3b424a;
  --gold: #d4a245;
  --gold-light: #f3d27e;
  --gold-dark: #8a5a1c;
  --danger: #b42318;
  --ok: #1f7a3f;
  --warn: #9a5b00;
  --radius: 8px;
  --display: "Montserrat", "Arial Narrow", sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.55 var(--sans); display: flex; flex-direction: column; min-height: 100vh; }
img { max-width: 100%; height: auto; }
a { color: var(--gold-dark); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
main { flex: 1; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: absolute; left: 8px; top: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; color: var(--ink); padding: 8px; }

/* ---- Type ---- */
h1, h2, h3, h4, .h-display { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
.gold-rule { display: flex; align-items: center; gap: 1rem; font: 600 .72rem var(--display); text-transform: uppercase; letter-spacing: .35em; color: var(--gold); margin: 0; }
.gold-rule::before, .gold-rule::after { content: ""; height: 3px; width: 2.5rem; border-radius: 3px; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); }
.steel-text { background: linear-gradient(175deg, #f4f5f7 0%, #a7adb5 30%, #eef0f2 52%, #8d949c 78%, #dfe2e6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--steel-500); }

/* ---- Buttons (WooCommerce's too) ---- */
.btn, .button, button.button, a.button, input.button, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 6px; padding: .7rem 1.2rem;
  font: 600 .9rem/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  background: var(--ink); color: #fff; transition: filter .15s, background .15s;
}
.btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--steel-700); color: #fff; }
.btn-gold, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce #place_order, .single_add_to_cart_button, .woocommerce a.checkout-button {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 55%, #b8862f 100%) !important; color: var(--ink) !important; border: 0;
}
.btn-gold:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover { filter: brightness(1.05); color: var(--ink); }
.btn-light { background: transparent; border-color: var(--steel-500); color: #fff; }
.btn-light:hover { border-color: var(--gold); color: var(--gold-light); background: transparent; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--steel-300); }
.btn-ghost:hover { background: var(--steel-100); color: var(--ink); }
.btn-lg { padding: .9rem 1.5rem; font-size: 1rem; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgb(11 11 12 / .96); border-bottom: 1px solid rgb(212 162 69 / .3); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.brand__words { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font: 600 1.05rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.brand__sub { margin-top: .25rem; font: 600 .6rem var(--display); letter-spacing: .42em; text-transform: uppercase; color: var(--gold); }
.nav { display: none; gap: 1.5rem; }
.nav a, .nav-mobile a { font: 600 .75rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--steel-300); text-decoration: none; }
.nav a:hover, .nav-mobile a:hover { color: var(--gold-light); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.cart-link { position: relative; color: var(--steel-300); padding: .4rem; }
.cart-link:hover { color: var(--gold-light); }
.cart-count { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--gold); color: var(--ink); font: 700 .7rem/18px var(--sans); text-align: center; }
.nav-mobile { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; border-top: 1px solid rgb(255 255 255 / .1); padding: .55rem 16px; }
.nav-mobile a { flex-shrink: 0; }
.call-btn .long { display: none; }
@media (min-width: 768px) { .nav { display: flex; } .nav-mobile { display: none; } }
@media (min-width: 640px) { .call-btn .long { display: inline; } .call-btn .short { display: none; } }
@media (max-width: 380px) { .brand__words { display: none; } }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--steel-300); border-top: 1px solid rgb(212 162 69 / .3); margin-top: 3rem; }
.site-footer a { color: var(--steel-300); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.footer-grid { display: grid; gap: 2.5rem; padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-grid h2 { font-size: .85rem; color: var(--gold); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .9rem; }
.footer-logo { width: 14rem; }
.footer-legal { border-top: 1px solid rgb(255 255 255 / .1); padding-top: 1rem; padding-bottom: 1rem; font-size: .75rem; color: var(--steel-500); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

/* ---- Home ---- */
.hero { color: #fff; background:
  repeating-linear-gradient(90deg, rgb(255 255 255 / .018) 0 1px, transparent 1px 3px),
  radial-gradient(900px 420px at 80% 0%, rgb(212 162 69 / .14) 0%, transparent 65%),
  radial-gradient(700px 400px at 10% 100%, #2a2e33 0%, transparent 70%), var(--ink); }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
@media (min-width: 768px) { .hero__grid { grid-template-columns: 1.1fr 1fr; padding-top: 5rem; padding-bottom: 5rem; } }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.75rem); line-height: 1.05; margin: 1.25rem 0 0; }
.hero h1 .gold { color: var(--gold-light); }
.hero p.lead { color: var(--steel-300); font-size: 1.1rem; max-width: 28rem; margin: 1.25rem 0 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.feature-card { display: block; overflow: hidden; border-radius: var(--radius); background: var(--charcoal); box-shadow: 0 25px 50px rgb(0 0 0 / .45); outline: 1px solid rgb(212 162 69 / .3); text-decoration: none; color: #fff; }
.feature-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.feature-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.feature-card__eyebrow { font: 600 .65rem var(--display); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.feature-card__title { font: 700 1.15rem var(--display); }
.feature-card__price { font: 700 1.5rem var(--display); }
.promises { background: var(--steel-50); border-bottom: 1px solid var(--steel-200); }
.promises__grid { display: grid; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 640px) { .promises__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .promises__grid { grid-template-columns: repeat(4, 1fr); } }
.promise { display: flex; gap: .75rem; }
.promise svg { flex-shrink: 0; color: var(--gold-dark); margin-top: 2px; }
.promise h2 { font-size: 1rem; margin: 0 0 .25rem; }
.promise p { margin: 0; font-size: .9rem; color: var(--steel-700); }
.section { padding: 3.5rem 0; }
.section--alt { background: var(--steel-50); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.section__head h2 { margin: 0; font-size: 1.9rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.pill-list .n { color: var(--steel-500); margin-left: .35rem; }
.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .two-col { grid-template-columns: 1fr 1fr; align-items: center; } }
.card { border: 1px solid var(--steel-200); border-radius: var(--radius); background: #fff; padding: 1.5rem; }

/* ---- Product grid ---- */
.woocommerce ul.products, ul.products { display: grid !important; gap: 1.25rem; grid-template-columns: 1fr; list-style: none; margin: 0 !important; padding: 0; }
@media (min-width: 640px) { .woocommerce ul.products, ul.products { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, 1fr); } }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product.unit-card, li.unit-card { width: auto !important; margin: 0 !important; float: none !important; padding: 0; }
.unit-card a.unit-card__link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--steel-200); border-radius: var(--radius); overflow: hidden; background: #fff; text-decoration: none; color: var(--ink); transition: box-shadow .2s; }
.unit-card a.unit-card__link:hover { box-shadow: 0 12px 30px rgb(0 0 0 / .12); }
.unit-card__img { position: relative; aspect-ratio: 4/3; background: var(--steel-100); overflow: hidden; }
.unit-card__img img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; transition: transform .3s; }
.unit-card a:hover .unit-card__img img { transform: scale(1.03); }
.unit-card.is-sold .unit-card__img img { filter: grayscale(1); opacity: .6; }
.unit-card__badges { position: absolute; top: .5rem; left: .5rem; display: flex; gap: .35rem; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: .15rem .6rem; font: 600 .72rem/1.4 var(--sans); }
.chip--ok { background: rgb(255 255 255 / .95); color: var(--ok); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.chip--okbg { background: rgb(31 122 63 / .1); color: var(--ok); }
.chip--dark { background: var(--ink); color: #fff; }
.chip--warn { background: var(--warn); color: #fff; }
.chip--steel { background: var(--steel-100); color: var(--steel-700); }
.unit-card__body { display: flex; flex-direction: column; flex: 1; gap: .25rem; padding: 1rem; }
.unit-card__title { font: 700 1.05rem/1.25 var(--display); margin: 0; }
.unit-card__facts { font-size: .85rem; color: var(--steel-500); margin: 0; }
.unit-card__foot { margin-top: auto; padding-top: .75rem; display: flex; justify-content: space-between; align-items: flex-end; }
.unit-card__price { font: 700 1.45rem var(--display); }
.unit-card.is-sold .unit-card__price { color: var(--steel-500); text-decoration: line-through; }
.unit-card__msrp { font-size: .75rem; color: var(--steel-500); }
.no-photo { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--steel-500); font-size: .85rem; }

/* ---- Shop: filter sidebar (drawer on phones), chips, sort ---- */
.shop-head { padding-top: 2rem; }
.shop { display: grid; gap: 1.5rem; margin-top: 1.25rem; }
@media (min-width: 1024px) { .shop { grid-template-columns: 16rem 1fr; gap: 2rem; } }
.filters-drawer > summary { list-style: none; width: 100%; }
.filters-drawer > summary::-webkit-details-marker { display: none; }
@media (min-width: 1024px) { .filters-drawer > summary { display: none; } }
.facets { display: grid; gap: 0; margin-top: .75rem; }
@media (min-width: 1024px) { .facets { margin-top: 0; } }
.facet { border-bottom: 1px solid var(--steel-200); padding: .85rem 0; margin: 0; }
.facet__title { font: 700 .78rem var(--display); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; margin: 0 0 .5rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.facet > summary.facet__title { margin: 0; }
details.facet[open] > summary.facet__title { margin-bottom: .5rem; }
details.facet > summary::-webkit-details-marker { display: none; }
details.facet > summary::after { content: "+"; font: 400 1.1rem var(--sans); color: var(--steel-500); }
details.facet[open] > summary::after { content: "−"; }
.facet__count { background: var(--gold); color: var(--ink); border-radius: 999px; padding: 0 .45rem; font-size: .7rem; letter-spacing: 0; margin-left: auto; margin-right: .5rem; }
.facet__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; max-height: 16rem; overflow: auto; }
.facet__list li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.facet__list input { width: 1.05rem; height: 1.05rem; accent-color: var(--gold-dark); margin: 0; }
.facet__list input:disabled + label { color: var(--steel-300); }
.facet__list a { color: var(--ink); text-decoration: none; }
.facet__list a:hover { color: var(--gold-dark); }
.facet__list .n { color: var(--steel-500); font-size: .8rem; }
.facets__actions { display: flex; gap: .5rem; padding-top: 1rem; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .75rem; margin-bottom: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.chip--filter { background: var(--ink); color: #fff; text-decoration: none; padding: .3rem .7rem; }
.chip--filter:hover { background: var(--steel-700); color: #fff; }
.sort { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.sort .lbl { margin: 0; white-space: nowrap; }
.sort select { width: auto; }
.shop__results .woocommerce ul.products, .shop__results ul.products { grid-template-columns: 1fr; }
@media (min-width: 640px) { .shop__results ul.products { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .shop__results ul.products { grid-template-columns: repeat(3, 1fr); } }
label.lbl, .lbl { display: block; font-size: .85rem; font-weight: 500; color: var(--steel-700); margin-bottom: .25rem; }
.input, .woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .dr-ask input, .dr-ask textarea {
  width: 100%; border: 1px solid var(--steel-300); border-radius: 6px; padding: .55rem .75rem; font: 1rem var(--sans); color: var(--ink); background: #fff;
}
.input:focus { border-color: var(--ink); outline: none; }
.empty { text-align: center; padding: 3rem 1.5rem; }

/* ---- Single unit ---- */
.unit { padding: 1.5rem 0 0; }
.crumbs { font-size: .85rem; color: var(--steel-500); margin-bottom: 1rem; }
.crumbs a { color: var(--steel-500); text-decoration: none; }
.unit__top { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .unit__top { grid-template-columns: 1.4fr 1fr; } }
.gallery__main { aspect-ratio: 4/3; background: var(--steel-100); border-radius: var(--radius); overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery__thumbs { display: flex; gap: .5rem; overflow-x: auto; margin: .75rem 0 0; padding: 0; list-style: none; }
.gallery__thumbs button { display: block; width: 80px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; }
.gallery__thumbs button[aria-current="true"] { border-color: var(--gold); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.unit__meta { font-size: .85rem; color: var(--steel-500); margin: 0; }
.unit h1 { margin: .25rem 0 0; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.unit__series { color: var(--steel-700); margin: .25rem 0 0; }
.unit__price { display: flex; align-items: flex-end; gap: .75rem; margin: 1rem 0; }
.unit__price .price, .unit__price .price .amount { font: 700 2.8rem/1 var(--display); color: var(--ink); }
.unit__price .msrp, .unit__price .msrp .amount { font: 400 .9rem/1 var(--sans); color: var(--steel-500); padding-bottom: .4rem; }
.unit__badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.unit__buy { margin: 1.25rem 0; display: grid; gap: .75rem; }
.unit__buy form.cart { margin: 0 !important; }
.unit__buy .single_add_to_cart_button { width: 100%; padding: 1rem !important; font-size: 1.05rem !important; }
.unit__buy .quantity { display: none !important; }
.unit__buy .stock { display: none; }
.dr-terms { border: 2px solid var(--ink); border-radius: var(--radius); padding: 1rem; font-size: .88rem; line-height: 1.55; margin: 1rem 0; }
.dr-terms--warranty { border-color: rgb(31 122 63 / .4); background: rgb(31 122 63 / .05); }
.dr-terms__title { font-size: 1rem; margin: 0 0 .35rem; }
.dr-terms p { margin: 0; }
.specs { margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--steel-100); padding: .5rem 0; font-size: .9rem; }
.specs dt { color: var(--steel-500); }
.specs dd { margin: 0; font-weight: 500; text-align: right; }
.unit__bottom { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 1024px) { .unit__bottom { grid-template-columns: 1.4fr 1fr; } }
.tested { display: grid; gap: .45rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .tested { grid-template-columns: 1fr 1fr; } }
.tested li { display: flex; gap: .5rem; font-size: .9rem; }
.tested svg { color: var(--ok); flex-shrink: 0; margin-top: 3px; }
.note-box { background: var(--steel-50); border-radius: var(--radius); padding: 1.25rem; font-size: .9rem; color: var(--steel-700); }
.dr-ask { display: grid; gap: .75rem; }
.dr-ask .row2 { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
.dr-ask .hp { position: absolute; left: -9999px; }
.ok-msg { background: rgb(31 122 63 / .1); color: var(--ok); border-radius: 6px; padding: .9rem; font-weight: 500; }

/* ---- WooCommerce pages ---- */
.woo-page { padding: 2rem 0; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--gold) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--gold-dark) !important; }
.woocommerce-error { border-top-color: var(--danger) !important; }
.dr-checkout-terms { border: 1px solid var(--steel-200); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; }
.dr-checkout-terms__item { margin: .75rem 0 0; }
.dr-terms-accept label { font-weight: 600; }
.woocommerce-checkout #payment, .woocommerce-checkout #payment.woocommerce-checkout-payment { background: var(--steel-50) !important; border: 1px solid var(--steel-200); border-radius: var(--radius); }
.woocommerce-checkout #payment div.payment_box { background: #fff !important; border: 1px solid var(--steel-200); color: var(--steel-700) !important; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff !important; }
.woocommerce-checkout #payment ul.payment_methods { border-bottom-color: var(--steel-200) !important; }
.dr-next-steps { background: var(--steel-50); border-left: 4px solid var(--gold); padding: 1rem 1.25rem; margin-bottom: 2rem; }
.woocommerce table.shop_table { border-radius: var(--radius); }
.woocommerce-cart .cart-collaterals .cart_totals { width: 100%; }
@media (min-width: 768px) { .woocommerce-cart .cart-collaterals .cart_totals { width: 48%; } }

/* ---- Text pages ---- */
.prose { max-width: 48rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.prose h1 { margin-bottom: 1rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose p, .prose li { color: var(--steel-700); }
.prose .notice { border: 2px solid var(--ink); border-radius: var(--radius); padding: 1rem; color: var(--ink); font-size: .9rem; }
