/* Otto's General Store — warm, clean general-store look.
   Cream background, deep green + rust accents, friendly serif headings.
   Responsive by construction: fluid type (clamp), images capped at
   container width, grids collapse on phones, overflow-x guard. */

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:hidden;overflow-x:clip}
body{margin:0;overflow-x:hidden;overflow-x:clip;font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#26221c;background:#faf6ee;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto}
a{color:inherit}
h1,h2,h3{font-family:"Fraunces",Georgia,serif;font-weight:700}
.eyebrow{letter-spacing:.16em;text-transform:uppercase;color:#b4552d;font-weight:800;font-size:.72rem;margin:0}

/* ---------- Top bar ---------- */
.topbar{position:sticky;top:0;z-index:20;background:rgba(250,246,238,.96);backdrop-filter:blur(14px);border-bottom:2px solid #2f5d3a;display:flex;align-items:center;flex-wrap:wrap;gap:.6rem 1.2rem;padding:.7rem clamp(1rem,4vw,3rem)}
.topbar .brand{font-family:"Fraunces",Georgia,serif;font-weight:700;font-size:1.35rem;text-decoration:none;color:#2f5d3a;flex:0 0 auto}
.topbar .brand span{color:#b4552d}
.topbar nav{display:flex;flex-wrap:wrap;gap:.35rem 1rem;min-width:0}
.topbar nav a{text-decoration:none;font-size:.86rem;font-weight:600;white-space:nowrap;padding:.3rem 0}
.topbar nav a:hover{color:#b4552d}

/* ---------- Hero ---------- */
.hero{background:#2f5d3a;color:#fdfaf3;display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(1.5rem,4vw,4rem);align-items:center;width:100%;padding:clamp(2.5rem,7vw,5rem) clamp(1.25rem,5vw,4rem);overflow:hidden}
.hero-copy{min-width:0}
.hero .eyebrow{color:#f2c094}
.hero h1{font-size:clamp(2.2rem,5.5vw,4rem);line-height:1.05;margin:.7rem 0 1rem}
.lede{color:#e8e2d2;font-size:clamp(1rem,1.6vw,1.18rem);line-height:1.55;max-width:560px;margin:0 0 2rem}
.hero-actions{display:flex;gap:.8rem;flex-wrap:wrap}
.button{display:inline-block;text-decoration:none;padding:.9rem 1.35rem;font-weight:800;letter-spacing:.02em;font-size:.95rem;border-radius:10px}
.button.solid{background:#b4552d;color:#fff}
.button.solid:hover{background:#96431f}
.button.outline{border:1.5px solid #e8e2d2;color:#fdfaf3}
.button.dark{background:#2f5d3a;color:#fff}
.stats{display:flex;gap:clamp(1rem,3vw,2.2rem);flex-wrap:wrap;margin-top:2.6rem;color:#cfd8c8;font-size:.85rem}
.stats strong{display:block;color:#fff;font-size:1.3rem;margin-bottom:.15rem}
.hero-media{min-width:0;text-align:center}
.hero-media img{width:min(520px,100%);margin:0 auto;display:block;border-radius:14px}

/* ---------- Trust strip ---------- */
.strip{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem;padding:2rem clamp(1.25rem,5vw,4rem);border-bottom:1px solid #e7ddc9;max-width:1360px;margin:0 auto}
.strip strong{display:block;margin-bottom:.3rem;color:#2f5d3a}
.strip span{color:#6b6252;font-size:.92rem;line-height:1.45}

/* ---------- Sections ---------- */
.section{padding:clamp(3rem,6vw,4.5rem) clamp(1.25rem,5vw,4rem)}
.section>*{max-width:1240px;margin-left:auto;margin-right:auto}
.section.alt{background:#f3ecdb}
.section-head{margin-bottom:1.8rem}
.section-head h2{font-size:clamp(1.9rem,4.5vw,3rem);line-height:1.05;margin:.45rem 0 .6rem;color:#2f5d3a}
.section-head p{color:#6b6252;max-width:640px;line-height:1.55;margin:0}

/* ---------- Product grid & cards ---------- */
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}
.card{border:1px solid #e3d8bf;background:#fffdf8;display:flex;flex-direction:column;min-width:0;position:relative;overflow:hidden;border-radius:12px}
.card-body{padding:1rem;display:flex;flex-direction:column;gap:.55rem;flex:1;min-width:0}
.card h3{font-family:"Inter",sans-serif;font-weight:700;font-size:1rem;line-height:1.25;margin:0}
.card p{color:#6b6252;font-size:.9rem;line-height:1.45;margin:0}
.ship-note{font-size:.76rem;font-weight:700;color:#b4552d}
.buy-row{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding-top:.5rem}
.price{font-size:1.15rem;font-weight:800;white-space:nowrap;color:#2f5d3a}
.buy{background:#2f5d3a;color:#fff;text-decoration:none;padding:.65rem 1.05rem;font-weight:800;white-space:nowrap;border-radius:8px}
.buy:hover{background:#b4552d}

/* ---------- Contact & footer ---------- */
.contact{background:#2f5d3a;color:#fff;text-align:center;padding:clamp(3rem,6vw,4.5rem) 1.25rem;display:flex;flex-direction:column;align-items:center;gap:1.2rem}
.contact .eyebrow{color:#f2c094}
.contact h2{font-size:clamp(1.9rem,4.5vw,2.8rem);margin:.4rem 0}
.contact p{color:#e8e2d2;line-height:1.6;max-width:640px;margin:0}
footer{padding:2.5rem 1.25rem 3rem;text-align:center;color:#6b6252;font-size:.92rem}
footer .foot-brand{font-family:"Fraunces",Georgia,serif;font-weight:700;font-size:1.4rem;color:#2f5d3a;margin:0 0 .6rem}
footer .fine{color:#9a8f78;font-size:.8rem;line-height:1.55;max-width:640px;margin:.8rem auto 0}

/* ---------- Tablets & phones ---------- */
@media (max-width:1100px){
  .grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:900px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .hero{grid-template-columns:1fr}
  .hero-media img{width:min(420px,86vw)}
  .strip{grid-template-columns:1fr;gap:1.1rem}
  .topbar nav{order:3;flex-basis:100%}
}
@media (max-width:520px){
  .topbar{padding:.6rem 1rem;gap:.5rem .8rem}
  .topbar nav{gap:.25rem .8rem}
  .topbar nav a{font-size:.82rem}
  .hero{padding-top:2.2rem}
  .stats{gap:.9rem 1.2rem}
  .grid{gap:.7rem}
  .card-body{padding:.8rem}
  .card h3{font-size:.95rem}
  .card p{font-size:.85rem}
  .buy{padding:.6rem .9rem}
}
@media (max-width:340px){
  .grid{grid-template-columns:1fr}
}

/* ---------- Scroll reveal ---------- */
.js [data-reveal]{opacity:0;transform:translateY(22px);filter:blur(1.5px);transition:opacity .7s cubic-bezier(.17,0,.55,1),transform .7s cubic-bezier(.17,0,.55,1),filter .7s cubic-bezier(.17,0,.55,1)}
.js [data-reveal].in{opacity:1;transform:none;filter:none}
@media (prefers-reduced-motion: reduce){
  .js [data-reveal]{opacity:1;transform:none;filter:none;transition:none}
}
@media print{
  .js [data-reveal]{opacity:1;transform:none;filter:none}
}

/* ---------- Cart button (topbar) ---------- */
.cart-btn{margin-left:auto;border:1.5px solid #2f5d3a;background:#fffdf8;color:#2f5d3a;padding:.5rem .85rem;font-weight:700;font-size:.86rem;white-space:nowrap;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:.45rem;border-radius:8px}
.cart-btn:hover{background:#2f5d3a;color:#fff}
.cart-count{background:#b4552d;color:#fff;border-radius:999px;min-width:1.35rem;height:1.35rem;display:inline-flex;align-items:center;justify-content:center;font-size:.76rem;font-weight:800;padding:0 .3rem}

/* ---------- Card links & add buttons ---------- */
.card a.card-img{display:block}
.card a.card-img img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#f1ead9}
.card h3 a{text-decoration:none}
.card h3 a:hover{color:#b4552d}
button.buy{border:0;cursor:pointer;font-family:inherit;font-size:.92rem}
button.buy:hover{background:#b4552d}

/* ---------- Product page ---------- */
.pdp-section{padding-top:2rem}
.back-row{max-width:1240px;margin:0 auto 1.2rem}
.back-link{text-decoration:none;font-weight:700;font-size:.9rem}
.back-link:hover{color:#b4552d}
.pdp{display:grid;grid-template-columns:1fr 1fr;gap:clamp(1.5rem,4vw,3.5rem);max-width:1240px;margin:0 auto;align-items:start}
.pdp-media img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;border:1px solid #e3d8bf;background:#f1ead9;border-radius:12px}
.pdp-info{min-width:0}
.pdp-info h1{font-size:clamp(1.8rem,4vw,2.7rem);line-height:1.1;margin:.5rem 0 .6rem}
.pdp-price{font-size:1.5rem;font-weight:800;margin:0 0 1rem;color:#2f5d3a}
.pdp-about{color:#4c463c;line-height:1.6;font-size:1.02rem;margin:0 0 1.2rem}
.pdp-details{list-style:none;margin:0 0 1.4rem;padding:0;border-top:1px solid #e7ddc9}
.pdp-details li{display:flex;gap:1rem;padding:.6rem 0;border-bottom:1px solid #e7ddc9;font-size:.94rem;line-height:1.45}
.pdp-details span{flex:0 0 6.5rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;font-size:.72rem;color:#b4552d;padding-top:.15rem}
.pdp-buy{display:flex;gap:.7rem;align-items:stretch;flex-wrap:wrap}
.qty{display:inline-flex;align-items:stretch;border:1.5px solid #2f5d3a;border-radius:8px;overflow:hidden}
.qty-btn{background:#fffdf8;border:0;width:2.4rem;font-size:1.1rem;font-weight:700;cursor:pointer;font-family:inherit}
.qty-btn:hover{background:#2f5d3a;color:#fff}
.qty-input{width:3rem;border:0;border-left:1px solid #ddd3ba;border-right:1px solid #ddd3ba;text-align:center;font-family:inherit;font-size:1rem;font-weight:700;background:#fffdf8}
.qty-val{min-width:2.2rem;display:inline-flex;align-items:center;justify-content:center;font-weight:700}
.pdp-add{background:#2f5d3a;color:#fff;padding:.8rem 1.6rem;font-size:1rem}
.pdp-note{color:#9a8f78;font-size:.86rem;margin:.8rem 0 0}

/* ---------- Cart drawer ---------- */
.cart-overlay{position:fixed;inset:0;background:rgba(38,32,20,.45);z-index:60}
.cart-drawer{position:fixed;top:0;right:0;height:100dvh;width:min(430px,94vw);background:#fffdf8;z-index:61;display:flex;flex-direction:column;box-shadow:-12px 0 32px rgba(0,0,0,.18)}
.cart-overlay[hidden],.cart-drawer[hidden]{display:none}
.cart-head{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.2rem;border-bottom:1px solid #e7ddc9}
.cart-head h2{margin:0;font-size:1.4rem;color:#2f5d3a}
.cart-close{background:none;border:0;font-size:1.8rem;line-height:1;cursor:pointer;padding:.2rem .4rem}
.cart-items{flex:1;overflow-y:auto;padding:1rem 1.2rem;display:flex;flex-direction:column;gap:1rem}
.cart-empty{color:#6b6252;line-height:1.55;text-align:center;margin:2rem 0}
.cart-item{display:flex;gap:.8rem;align-items:flex-start}
.cart-item img{width:64px;height:64px;object-fit:cover;border:1px solid #e7ddc9;background:#f1ead9;flex:0 0 auto;border-radius:6px}
.cart-item-main{flex:1;min-width:0}
.cart-item-name{margin:0 0 .15rem;font-weight:700;font-size:.92rem;line-height:1.3}
.cart-item-price{margin:0 0 .45rem;color:#6b6252;font-size:.85rem}
.cart-item .qty{border-color:#cfc3a5}
.cart-item .qty-btn{width:1.9rem;font-size:1rem}
.cart-remove{background:none;border:0;color:#b4552d;font-weight:700;font-size:.8rem;cursor:pointer;margin-left:.6rem;padding:0;font-family:inherit;text-decoration:underline}
.cart-item-line{font-weight:800;white-space:nowrap}
.cart-foot{border-top:1px solid #e7ddc9;padding:1rem 1.2rem 1.2rem}
.cart-totals>div{display:flex;justify-content:space-between;margin-bottom:.35rem;font-size:.95rem}
.cart-ship-note{color:#9a8f78;font-size:.82rem;margin:.3rem 0 0}
.pay-box{border-top:2px solid #2f5d3a;margin-top:.9rem;padding-top:.9rem}
.pay-box h3{font-family:"Inter",sans-serif;font-size:1.05rem;margin:0 0 .35rem}
.pay-box p{color:#6b6252;font-size:.88rem;line-height:1.5;margin:0 0 .8rem}
.pay-btn{display:block;text-align:center;width:100%;border:0;cursor:pointer;font-family:inherit}
.pay-error{color:#b02a1e !important;font-weight:600}

/* ---------- Toast ---------- */
.cart-toast{position:fixed;left:50%;bottom:1.2rem;transform:translate(-50%,1rem);background:#2f5d3a;color:#fff;padding:.8rem 1.2rem;font-size:.9rem;font-weight:600;z-index:62;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;max-width:92vw;text-align:center;cursor:pointer;border-radius:10px}
.cart-toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}

@media (max-width:900px){
  .pdp{grid-template-columns:1fr}
  .cart-btn{padding:.45rem .7rem;font-size:.82rem}
}

/* ---------- Sort controls (catalog sections; added 2026-12-05) ---------- */
.sort-bar{display:flex;justify-content:flex-end;align-items:center;margin:0 auto 1rem}
.sort-label{font-size:.8rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#b4552d;margin-right:.55rem}
.sort-select{font-family:inherit;font-size:.9rem;font-weight:600;color:#26221c;background:#fffdf8;border:1.5px solid #2f5d3a;border-radius:8px;padding:.5rem .7rem;cursor:pointer;max-width:100%}
.sort-select:hover{border-color:#b4552d}
.sort-select:focus-visible{outline:2px solid #b4552d;outline-offset:2px}
@media (max-width:520px){.sort-bar{justify-content:flex-start}}
