/* Amersham Saw Mill - responsive site styles (replaces reset.css, generic.css, additional.css) */

:root {
    --ink: #16110b;
    --wood-900: #2a1d10;
    --wood-700: #453017;
    --wood-600: #50432e;
    --wood-500: #5b4b37;
    --tan: #cc9d76;
    --tan-dark: #b9875d;
    --brass: #896c47;
    --cream: #fdf7ef;
    --sand: #f5efe6;
    --stone: #dcd6cf;
    --line: #e6ddd0;
    --text: #2e2a25;
    --muted: #6b5f50;
    --danger: #a32020;

    --max: 1180px;
    --gutter: clamp(16px, 4vw, 32px);
    --band-pad: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
    --radius: 14px;
    --shadow: 0 1px 2px rgba(42, 29, 16, .06), 0 8px 24px rgba(42, 29, 16, .08);
    --shadow-lg: 0 2px 4px rgba(42, 29, 16, .08), 0 18px 40px rgba(42, 29, 16, .14);

    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body { margin: 0; background: var(--sand); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; border: 0; }
strong, b { font-weight: 700; }

a { color: var(--wood-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brass); }

:focus-visible { outline: 3px solid var(--tan); outline-offset: 2px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cream); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* legacy helpers still used in page markup */
.clear::after { content: ""; display: block; clear: both; }
.fl { float: left; }
.fr { float: right; }
.tar { text-align: right; }
.tac { text-align: center; }
.db { display: block; }
.di { display: inline-block !important; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.ml { margin-left: 12px; }
.generic { font-size: 16px; line-height: 1.7; }
.ifr { float: right; margin: 0 0 20px 30px; }
.ibl { display: block; margin: 0 0 15px; }

/* decorative dividers from the old fixed-width design */
img[src*="small_divider"], img[src*="large_divider"] { display: none; }

#outer_container { min-height: 100vh; display: flex; flex-direction: column; }
#page_wrapper { flex: 1; display: flex; flex-direction: column; }
#page_wrapper > #footer_wrapper { margin-top: auto; }

/* ---------- buttons ---------- */

.goforward, .goback, a.add, a.but, .update, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 12px 22px; border: 0; border-radius: 999px;
    font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
    cursor: pointer; transition: background-color .15s, transform .15s, box-shadow .15s;
}
.goforward, a.add, .btn-primary { background: var(--tan); color: var(--ink); box-shadow: 0 6px 16px rgba(204, 157, 118, .35); }
.goforward:hover, a.add:hover, .btn-primary:hover { background: var(--tan-dark); color: var(--ink); transform: translateY(-1px); }
.goforward::after { content: "\2192"; font-size: 18px; }
.goback, .update, a.but, .btn-dark { background: var(--wood-700); color: var(--cream); }
.goback:hover, .update:hover, a.but:hover, .btn-dark:hover { background: var(--wood-500); color: var(--cream); }
.goback::before { content: "\2190"; font-size: 18px; }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px rgba(253, 247, 239, .45); }
.btn-ghost:hover { color: var(--cream); box-shadow: inset 0 0 0 2px var(--cream); }

a.add span { display: inline-flex; align-items: center; gap: 10px; }
a.add span::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM5.2 4l.6 2H21l-2.6 8.2c-.3.8-1 1.3-1.8 1.3H8.3c-.8 0-1.6-.6-1.8-1.4L3.7 4H2V2h3c.4 0 .8.3 1 .7z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM5.2 4l.6 2H21l-2.6 8.2c-.3.8-1 1.3-1.8 1.3H8.3c-.8 0-1.6-.6-1.8-1.4L3.7 4H2V2h3c.4 0 .8.3 1 .7z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- header ---------- */

#page_top { background: var(--ink); color: var(--cream); position: relative; z-index: 50; }

#top_strip { background: var(--wood-900); font-size: 13px; color: var(--stone); }
#top_strip .wrap { display: flex; justify-content: space-between; gap: 16px; padding-block: 7px; }
#top_strip a { color: var(--stone); text-decoration: none; }
#top_strip a:hover { color: var(--tan); }

#top_wrapper { background: radial-gradient(120% 140% at 50% 120%, #3b2614 0%, var(--ink) 62%); }
#top_wrapper .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }

#logo { display: block; flex: none; }
#logo img { display: block; width: auto; height: 84px; }

#header_actions { display: flex; align-items: center; gap: 10px; }
#header_actions svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

#hdr_phone { display: inline-flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 600; font-size: 20px; letter-spacing: .01em; padding: 8px 12px; border-radius: 999px; }
#hdr_phone svg { color: var(--tan); }
#hdr_phone:hover { color: var(--tan); }

#hdr_basket { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 18px 8px 14px; background: var(--cream); color: var(--ink); border-radius: 999px; text-decoration: none; font-weight: 600; }
#hdr_basket:hover { background: #fff; color: var(--ink); }
#hdr_basket .count.zero { display: none; }
#hdr_basket .count { position: absolute; top: -4px; left: 26px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--tan); color: var(--ink); font-size: 12px; line-height: 20px; text-align: center; }

#nav_toggle { display: none; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; border: 0; border-radius: 999px; background: rgba(253, 247, 239, .1); color: var(--cream); font: 600 15px var(--sans); cursor: pointer; }
#nav_toggle .bars, #nav_toggle .bars::before, #nav_toggle .bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
#nav_toggle .bars { position: relative; }
#nav_toggle .bars::before, #nav_toggle .bars::after { content: ""; position: absolute; left: 0; }
#nav_toggle .bars::before { top: -6px; }
#nav_toggle .bars::after { top: 6px; }
.nav_open #nav_toggle .bars { background: transparent; }
.nav_open #nav_toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.nav_open #nav_toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }

#nav_wrapper { background: var(--wood-900); border-top: 1px solid rgba(204, 157, 118, .18); }
#nav_wrapper ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
#nav_wrapper a { display: block; padding: 14px 14px; color: var(--stone); text-decoration: none; font-weight: 500; font-size: 15px; position: relative; }
#nav_wrapper a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 2px; background: var(--tan); transform: scaleX(0); transition: transform .2s; }
#nav_wrapper a:hover, #nav_wrapper a.on { color: #fff; }
#nav_wrapper a:hover::after, #nav_wrapper a.on::after { transform: scaleX(1); }

/* ---------- breadcrumb ---------- */

ul.breadcrumb { max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter) 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--muted); }
ul.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--stone); }
ul.breadcrumb a { color: var(--muted); text-decoration: none; }
ul.breadcrumb a:hover { color: var(--wood-700); text-decoration: underline; }

/* ---------- page headings (shared by every inner page) ---------- */

#about_top, #faq_top, #delivery_top, #contact_top, #product_header {
    max-width: var(--max); width: 100%; margin: 0 auto; padding: 28px var(--gutter) 8px; background: none; min-height: 0;
}
#about_top h1, #faq_top h1, #delivery_top h1, #contact_top h1, #product_header h1 {
    font-family: var(--serif); font-weight: 800; font-size: clamp(32px, 5.5vw, 52px); line-height: 1.05; letter-spacing: -.02em; color: var(--wood-700);
}
#about_top h2, #faq_top h2, #delivery_top h2, #contact_top h2, #product_header #ph_inner h2 {
    margin: 10px 0 0; font-family: var(--sans); font-size: clamp(17px, 2.2vw, 20px); font-weight: 400; line-height: 1.45; color: var(--muted); letter-spacing: 0; max-width: 46ch;
}
#faq_top p, #about_top p, #delivery_top p, #contact_top p { margin-top: 14px; max-width: 70ch; width: auto; }

#product_header { margin: 0 auto; }
#product_header #ph_inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; padding: 0; background: none; color: var(--wood-700); font-family: var(--sans); }
#product_header #ph_inner > .fl, #product_header #ph_inner > .fr { float: none; }
#product_header #ph_inner::after { display: none; }
#product_header #ph_inner > .fr { text-align: left; }
#product_header #ph_inner > .fr br { display: none; }
#product_header #ph_inner > .fr:empty { display: none; }
/* "Free delivery" promo on listing pages */
#product_header #ph_inner h3 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; background: none; font: 700 18px/1.3 var(--sans); letter-spacing: 0; color: var(--wood-700); }
#product_header #ph_inner h3::before { content: ""; width: 26px; height: 23px; flex: none; background: url("../img/truck_icon.png") no-repeat center / contain; }
#product_header #ph_inner h4 { display: block; margin: 2px 0 4px 36px; font: 600 15px/1.4 var(--sans); letter-spacing: 0; color: var(--wood-500); }
#product_header #ph_inner span { display: block; margin-left: 36px; font: 400 14px/1.5 var(--sans); color: var(--muted); }
#product_header #ph_inner:has(h3) > .fr { padding: 14px 18px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
/* checkout total */
#product_header #ph_inner > .fr > h2:only-child { margin: 0; font: 700 22px var(--serif); color: var(--wood-700); }

/* ---------- generic content ---------- */

.content_block { max-width: var(--max); width: 100%; margin: 0 auto; padding: 24px var(--gutter) 40px; }
.content_block > .content_block { padding-inline: 0; }

.sub_marker, h2.delarea, h2.basket_contents, h2.sub_total {
    font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; letter-spacing: -.01em; color: var(--wood-700); margin: 32px 0 6px;
}
.content_block > .sub_marker:first-child, .content_block > h2.delarea:first-child, .content_block > h2.basket_contents:first-child { margin-top: 0; }

.lhs_stuff, .rhs_stuff { float: none; margin: 8px 0 20px; }
.lhs_stuff img, .rhs_stuff img, p.generic img, .content_block > div > img { display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.content_block img[src*="fsc_logo"] { box-shadow: none; border-radius: 0; max-width: 160px; }

ul.bull { margin: 14px 0 6px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
ul.bull li { padding: 6px 14px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; }

.area_cta { clear: both; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 760px) { .area_cta .btn { width: 100%; } }

ul.errors { margin: 16px 0; padding: 16px 20px 16px 38px; list-style: disc; color: var(--danger); background: #fbeeee; border: 1px solid #efcaca; border-radius: 10px; font-size: 15px; line-height: 1.6; }

.red_busy { margin-top: 20px; padding: 20px; background: #9f0000; color: #fff; border-radius: 10px; font-size: 16px; }

/* ---------- FAQ / delivery Q&A ---------- */

.faq_question, .delivery_question, .about_question {
    max-width: calc(var(--max) - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter)); margin: 14px auto 0; height: auto;
    padding: 16px 20px 6px; background: var(--cream); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; box-shadow: none;
    font: 700 17px/1.35 var(--sans); color: var(--wood-700); text-shadow: none;
}
.faq_answer, .delivery_answer, .about_answer {
    max-width: calc(var(--max) - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter)); margin: 0 auto;
    padding: 0 20px 16px; background: var(--cream); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
    color: var(--text); font: 400 15.5px/1.65 var(--sans);
}
.content_block .delivery_question, .content_block .delivery_answer { width: 100%; }
#page_wrapper > h2.sub_marker { max-width: calc(var(--max) - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter)); margin: 40px auto 4px; padding: 0 !important; }
#page_wrapper > .faq_answer:last-of-type { margin-bottom: 48px; }

/* ---------- contact ---------- */

.order_by_phone, .order_by_email { display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 24px 24px 24px 96px; min-height: 110px; background-color: var(--cream); background-position: 22px center; background-size: 52px auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.order_by_phone { background-image: url("../img/lg_phone.png"); background-repeat: no-repeat; }
.order_by_email { background-image: url("../img/lg_email.png"); background-repeat: no-repeat; }
.order_by_phone h2, .order_by_email h2 { margin: 0 0 4px; font: 700 20px/1.3 var(--serif); letter-spacing: 0; color: var(--wood-700); }
.order_by_phone p, .order_by_email p { margin: 0; }
.content_block:has(.order_by_phone) { display: grid; grid-template-columns: 1fr; gap: 16px; }
.content_block:has(.order_by_phone) > p { grid-column: 1 / -1; }
.content_block:has(.order_by_phone) > * { min-width: 0; overflow-wrap: anywhere; }

/* ---------- home ---------- */

.home_hero { position: relative; overflow: hidden; color: var(--cream); background: linear-gradient(180deg, var(--ink) 0%, #24180d 100%); }
.home_hero::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%; background: radial-gradient(closest-side, rgba(204, 157, 118, .22), transparent); pointer-events: none; }
.home_hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding-block: 56px 64px; }
.home_hero .eyebrow { display: inline-block; margin-bottom: 14px; color: var(--tan); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.home_hero h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -.025em; }
.home_hero h1 em { font-style: normal; color: var(--tan); }
.home_hero p { margin-top: 18px; max-width: 54ch; color: #e8dfd2; font-size: 17px; line-height: 1.65; }
.home_hero .hero_ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home_hero .hero_img { padding: 12px; background: #fff; border-radius: calc(var(--radius) + 6px); box-shadow: 0 24px 48px rgba(0, 0, 0, .45); transform: rotate(1deg); }
.home_hero .hero_img img { display: block; width: 100%; }

.usp_bar { background: var(--wood-700); color: var(--cream); }
.usp_bar ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-block: 18px; }
.usp_bar li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.35; }
.usp_bar li strong { display: block; font-weight: 700; }
.usp_bar li span { color: var(--stone); font-size: 13.5px; }
.usp_bar svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--tan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.section_head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.section_head h2 { font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.1; letter-spacing: -.02em; color: var(--wood-700); }
.section_head p { color: var(--muted); max-width: 52ch; }
.section_head a { font-weight: 600; white-space: nowrap; }

#home_accessories { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px 40px; padding: clamp(24px, 4vw, 44px); background: radial-gradient(120% 160% at 100% 0%, var(--wood-500) 0%, var(--wood-700) 55%, var(--wood-900) 100%); color: var(--cream); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-lg); }
#home_accessories::after { display: none; }
#home_accessories ul { float: none; height: auto; order: 2; display: flex; gap: 16px; }
#home_accessories ul li { width: 160px; height: auto; margin: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transition: transform .2s; }
#home_accessories ul li:hover { transform: translateY(-3px) rotate(-1deg); }
#home_accessories ul li img { display: block; width: 100%; }
#home_accessories h2 { padding: 0; font: 800 clamp(28px, 4vw, 40px)/1.05 var(--serif); letter-spacing: -.02em; color: var(--cream); }
#home_accessories h3 { padding: 6px 0 12px; font: 500 19px/1.4 var(--sans); color: var(--tan); letter-spacing: 0; }
#home_accessories p { color: #e8dfd2; line-height: 1.65; max-width: 56ch; }
#home_accessories .btn { margin-top: 20px; }

.area_band { background: var(--cream); border-top: 1px solid var(--line); }
.area_band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; padding-block: 48px; }
.area_band h2 { font: 800 clamp(26px, 3.6vw, 36px)/1.1 var(--serif); letter-spacing: -.02em; color: var(--wood-700); margin-bottom: 10px; }
.area_band p { color: var(--text); }
.area_band ul.bull { margin-top: 18px; }
.area_band img { display: block; padding: 10px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- product cards (home + related) ---------- */

.content_block:has(> .product_block) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; }
.content_block:has(> .product_block)::after { display: none; }

.product_block { float: none; width: auto; margin: 0; padding: 0 0 20px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: left; transition: transform .2s, box-shadow .2s; }
.product_block:hover { opacity: 1; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product_block a.product_img { width: 100%; height: auto; aspect-ratio: 290 / 240; background-color: #fff; background-size: contain; background-position: center; background-repeat: no-repeat; text-indent: -9999px; overflow: hidden; border-bottom: 1px solid var(--line); }
.product_block h2 { padding: 16px 20px 4px; font: 600 18px/1.35 var(--sans); letter-spacing: 0; }
.product_block h2 a { color: var(--wood-700); text-decoration: none; }
.product_block h2 a::after { content: ""; position: absolute; inset: 0; }
.product_block { position: relative; }
.product_block span.price { display: block; padding: 0 20px; font: 700 20px var(--serif); color: var(--brass); }

#related { max-width: var(--max); width: 100%; height: auto; margin: 8px auto 0; padding: 32px var(--gutter) 0; background: none; border-top: 1px solid var(--line); }
#related h3 { padding: 0; font: 800 clamp(24px, 3vw, 30px)/1.2 var(--serif); letter-spacing: -.01em; color: var(--wood-700); text-shadow: none; }

/* ---------- product listing rows ---------- */

.product_row { display: grid; grid-template-columns: 220px 1fr auto; grid-template-areas: "thumb info price" "thumb info basket"; gap: 8px 28px; margin-bottom: 18px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow); }
.product_row::after { display: none; }
.product_row .pthumb { grid-area: thumb; float: none; width: 100%; height: auto; margin: 0; aspect-ratio: 236 / 191; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; overflow: hidden; }
.product_row .pthumb a { display: contents; }
.product_row .pthumb img { max-height: 100%; max-width: 100%; width: auto; padding: 0; object-fit: contain; }
.product_row .pinfo { grid-area: info; float: none; width: auto; padding-top: 4px; }
.product_row .pinfo h1 { margin-bottom: 8px; font: 700 clamp(20px, 2.4vw, 24px)/1.25 var(--serif); letter-spacing: -.01em; }
.product_row .pinfo h1 a { color: var(--wood-700); text-decoration: none; }
.product_row .pinfo h1 a:hover { color: var(--brass); }
.product_row .pinfo p { padding: 0; color: var(--text); font: 400 15px/1.65 var(--sans); }
.product_row .pprice { grid-area: price; float: none; padding: 4px 0 0; text-align: right; font-size: 13px; color: var(--muted); }
.product_row .pprice h2 { margin: 0; font: 800 30px/1.1 var(--serif); color: var(--wood-700); }
.product_row .pbasket { grid-area: basket; position: static; width: auto; align-self: end; text-align: right; }
.product_row .pbasket form { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

p.qty { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 15px var(--sans); }
p.qty input { width: 56px; height: 44px; padding: 0; background: #fff; border: 1px solid var(--stone); border-radius: 10px; font: 600 17px var(--sans); text-align: center; color: var(--ink); }
p.qty input:focus { border-color: var(--tan); outline: 3px solid rgba(204, 157, 118, .35); outline-offset: 0; }
a.add { width: auto; height: auto; margin-top: 0; }
a.add.ml { margin-left: 4px; }

/* ---------- product detail ---------- */

.content_block:has(> .product_left) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "img info"; gap: 40px; align-items: start; }
.content_block:has(> .product_left)::after { display: none; }
.product_left { grid-area: info; float: none; width: auto; }
.product_left h2 { margin-bottom: 14px; font: 800 clamp(28px, 4vw, 40px)/1.1 var(--serif); letter-spacing: -.02em; color: var(--wood-700); }
.product_left p.info { margin-bottom: 22px; font-size: 16px; line-height: 1.7; }
.product_left h3 { margin-bottom: 18px; font: 800 36px/1 var(--serif); color: var(--brass); }
.product_left form p.qty { flex-wrap: wrap; padding: 16px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
.product_right { grid-area: img; float: none; width: auto; }
.product_right .main_img { width: 100%; height: auto; margin: 0; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); }
.product_right .main_img a { display: contents; }
.product_right .main_img img { max-width: 100%; max-height: 100%; width: auto; height: auto; padding: 0; object-fit: contain; }
p.already { margin-top: 14px; padding: 12px 16px; background: #eef4ea; border: 1px solid #d3e3c8; border-radius: 10px; font-size: 15px; color: #2f4a22; }

/* ---------- basket ---------- */

#noitems { padding: 72px 20px; text-align: center; font: 500 24px/1.4 var(--serif); font-style: normal; color: var(--muted); }
#noitems::after { content: "Browse our firewood logs, coals and accessories to get started."; display: block; margin-top: 8px; font: 400 16px var(--sans); }

.basket_row { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; width: 100%; margin-bottom: 14px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.basket_row::after { display: none; }
.basket_row .bthumb { float: none; width: 110px; height: 100px; display: flex; align-items: center; justify-content: center; }
.basket_row .bthumb img { max-height: 100%; width: auto; }
.basket_row .binfo { float: none; width: auto; padding: 0; font-size: 14px; color: var(--muted); }
.basket_row .binfo h2 { margin-bottom: 2px; font: 700 20px/1.3 var(--serif); }
.basket_row .binfo h2 a { color: var(--wood-700); text-decoration: none; }
.basket_row .binfo h3 { margin-top: 6px; font: 800 22px var(--serif); color: var(--brass); }
.basket_row .bqty { float: none; width: auto; padding: 0; background: none; box-shadow: none; text-align: right; }
.basket_row .bqty p.qty { display: block; }
.basket_row .bqty input[type="text"] { margin-left: 6px; }
.basket_row .bqty a { display: inline-block; margin-top: 10px; color: var(--danger); font-size: 14px; }
.basket_row .bqty br { display: block; }

form#basket_qtys > .clear:not(.basket_row) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 20px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
form#basket_qtys > .clear:not(.basket_row)::after { display: none; }
form#basket_qtys > .clear:not(.basket_row) > .fl, form#basket_qtys > .clear:not(.basket_row) > .fr { float: none; }
h2.sub_total { margin: 0 0 4px; }
span.excludes_delivery { font-size: 14px; color: var(--muted); }

p.minimum { display: flex; align-items: center; gap: 12px; width: auto; max-width: 360px; min-height: 0; padding: 12px 16px; background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 10px; font-size: 14px; line-height: 1.45; color: #6b4b10; }
p.minimum::before { content: ""; width: 28px; height: 28px; flex: none; background: url("../img/warning_icon.png") no-repeat center / contain; }

#map-canvas { width: 100%; height: 450px; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 25px; }

/* ---------- checkout ---------- */

#overlay { position: fixed; inset: 0; z-index: 9999; display: none; background: rgba(253, 247, 239, .96); }
#overlay #loading { margin: 30vh auto 0; text-align: center; font: 600 20px var(--serif); color: var(--wood-700); }

.content_block > .clear:has(> .co_left) { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 36px; align-items: start; }
.content_block > .clear:has(> .co_left)::after { display: none; }
.co_left, .co_right { float: none; width: auto; }
.co_right { position: sticky; top: 20px; }

#isummary { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-family: var(--sans); }
.srow { display: grid; grid-template-columns: 72px 1fr; gap: 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.srow::after { display: none; }
.srow .sthumb { float: none; width: 72px; height: 68px; display: flex; align-items: center; justify-content: center; }
.srow .sthumb img { max-height: 100%; width: auto; }
.srow .sinfo { float: none; width: auto; font: 400 13.5px/1.5 var(--sans); color: var(--muted); }
.srow .sinfo a { display: block; margin-bottom: 4px; font: 600 16px/1.3 var(--sans); color: var(--wood-700); text-decoration: none; }

p.cform_row { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 6px 16px; margin-top: 14px; font-size: 15px; }
p.cform_row:not(:has(label)) { display: block; color: var(--muted); font-size: 14px; }
p.cform_row label { width: auto; font-weight: 600; color: var(--wood-700); }
p.cform_row .tb { width: 100%; max-width: 420px; min-height: 46px; padding: 10px 14px; background: #fff; border: 1px solid var(--stone); border-radius: 10px; font: 400 16px var(--sans); color: var(--ink); cursor: text; }
p.cform_row select.tb { cursor: pointer; }
p.cform_row .tb:focus { border-color: var(--tan); outline: 3px solid rgba(204, 157, 118, .35); outline-offset: 0; }
span.divider { display: block; margin: 22px 0 6px; border-bottom: 1px solid var(--line); }
input.goforward { margin-top: 22px; }

.hbox { width: 48%; }
.content_block .mt.clear:has(> .hbox) { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.content_block .mt.clear:has(> .hbox) > .hbox { float: none; width: auto; text-align: left; }
.content_block .mt.clear:has(> .hbox)::after { display: none; }

#paypal_buttons { max-width: 420px; }

/* ---------- footer ---------- */

#footer_wrapper { position: static; width: 100%; height: auto; margin-top: 56px; padding: 0; background: var(--ink); color: var(--stone); font-size: 15px; }
#footer_inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-block: 48px 36px; }
.footer_brand img { display: block; width: 170px; height: auto; margin-bottom: 14px; }
.footer_brand p { max-width: 36ch; color: #b9afa3; font-size: 14.5px; line-height: 1.65; }
#footer_wrapper h2 { margin-bottom: 12px; font: 700 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--tan); }
#footer_wrapper ul { margin: 0; font-size: 15px; }
#footer_wrapper ul li { display: block; margin: 0 0 8px; padding: 0; border: 0; }
#footer_wrapper ul li a { font-size: 15px; color: var(--stone); text-decoration: none; overflow-wrap: anywhere; }
#footer_wrapper ul li a:hover { color: #fff; text-decoration: underline; }
#footer_inner img#dog { position: absolute; right: var(--gutter); bottom: -6px; width: 54px; height: auto; }
#footer_base { padding-block: 18px 22px; border-top: 1px solid rgba(220, 214, 207, .14); font-size: 12.5px; color: #988d80; }
#footer_base p + p { margin-top: 6px; }
#footer_base a { color: var(--stone); }

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
    #top_strip { display: none; }
    #page_top { position: sticky; top: 0; box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
    #top_wrapper .wrap { padding-block: 10px; }
    #logo img { height: 52px; }
    #hdr_phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    #hdr_phone { width: 48px; height: 48px; justify-content: center; padding: 0; background: rgba(253, 247, 239, .1); }
    #hdr_phone svg { color: var(--cream); }
    #nav_toggle { display: inline-flex; }

    #nav_wrapper { display: none; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 72px); overflow-y: auto; box-shadow: 0 16px 32px rgba(0, 0, 0, .35); }
    .nav_open #nav_wrapper { display: block; }
    #nav_wrapper ul { flex-direction: column; gap: 0; padding-block: 8px; }
    #nav_wrapper li + li { border-top: 1px solid rgba(220, 214, 207, .1); }
    #nav_wrapper a { padding: 15px 4px; font-size: 17px; }
    #nav_wrapper a::after { display: none; }
    #nav_wrapper a.on { color: var(--tan); }

    .home_hero .wrap { grid-template-columns: 1fr; padding-block: 36px 44px; gap: 28px; }
    .home_hero .hero_img { max-width: 520px; }
    .usp_bar ul { grid-template-columns: repeat(2, 1fr); }
    #home_accessories { grid-template-columns: 1fr; }
    #home_accessories ul { order: 0; }
    .area_band .wrap { grid-template-columns: 1fr; }

    #footer_inner { grid-template-columns: 1fr 1fr; }
    .footer_brand { grid-column: 1 / -1; }

    .content_block > .clear:has(> .co_left) { grid-template-columns: 1fr; }
    .co_right { position: static; order: -1; }
}

@media (min-width: 700px) {
    .lhs_stuff { float: left; max-width: 46%; margin: 6px 28px 16px 0; }
    .rhs_stuff { float: right; max-width: 46%; margin: 6px 0 16px 28px; }
    .content_block:has(.order_by_phone) { grid-template-columns: 1fr 1fr; }
    .content_block:has(.order_by_phone) > .lhs_stuff, .content_block:has(.order_by_phone) > h2, .content_block:has(.order_by_phone) > p { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    body { font-size: 15.5px; }
    #hdr_basket .total { display: none; }
    #hdr_basket { padding: 8px 14px; }
    #nav_toggle .label { display: none; }
    #nav_toggle { width: 48px; justify-content: center; padding: 0; }

    .product_row { grid-template-columns: 112px 1fr; grid-template-areas: "thumb info" "price basket"; gap: 14px 16px; padding: 14px; }
    .product_row .pthumb { align-self: start; }
    .product_row .pinfo p { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
    .product_row .pprice { text-align: left; align-self: end; }
    .product_row .pprice h2 { font-size: 26px; }
    .product_row .pbasket form { flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
    .product_row .pbasket p.qty { font-size: 0; }
    .product_row .pbasket p.qty input { font-size: 17px; }

    .content_block:has(> .product_left) { grid-template-columns: 1fr; grid-template-areas: "img" "info"; gap: 24px; }
    .product_right .main_img { aspect-ratio: 4 / 3; }

    .basket_row { grid-template-columns: 80px 1fr; }
    .basket_row .bthumb { width: 80px; height: 76px; }
    .basket_row .bqty { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; }
    .basket_row .bqty p.qty { display: flex; width: 100%; justify-content: space-between; align-items: center; flex-wrap: wrap; }
    .basket_row .bqty br { display: none; }
    .basket_row .bqty a { margin-top: 0; }
    form#basket_qtys > .clear:not(.basket_row) > .fr, form#basket_qtys .update { width: 100%; }

    #product_header #ph_inner > .fr .goforward, #product_header #ph_inner > .fr .goback { width: 100%; }
    #product_header #ph_inner > .fr { width: 100%; }

    p.cform_row { grid-template-columns: 1fr; }
    p.cform_row .tb { max-width: none; }
    input.goforward, a.but, .content_block .goforward { width: 100%; }
    a.but { height: auto; white-space: normal; }
    .content_block .mt.clear:has(> .hbox) { grid-template-columns: 1fr; }

    .order_by_phone, .order_by_email { padding: 20px 20px 20px 84px; background-position: 18px 22px; background-size: 46px auto; }

    #footer_inner { grid-template-columns: 1fr; gap: 26px; padding-block: 36px 28px; }
}

@media (max-width: 420px) {
    #logo img { height: 44px; }
    .usp_bar ul { grid-template-columns: 1fr; }
    #home_accessories ul li { width: 50%; }
    .product_row { grid-template-columns: 96px 1fr; }
    .home_hero .hero_ctas .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
