/* ============================================================================
   baranect — Page Layouts
   ========================================================================== */

main { display: block; }
.section { padding-block: var(--sp-16); }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto var(--sp-10); }
.section-head .eyebrow { display: block; margin-bottom: var(--sp-3); }
.section-head p { color: var(--muted); margin-top: var(--sp-3); font-size: var(--text-lg); }

/* ── Staggered reveal on load / scroll ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ── HERO ── */
.hero { position: relative; overflow: hidden; padding-block: var(--sp-16); background:
    radial-gradient(80% 120% at 85% -10%, var(--honey-200), transparent 55%),
    radial-gradient(70% 90% at 5% 110%, var(--honey-100), transparent 50%); }
.hero__inner { display: grid; grid-template-columns: 1fr; gap: var(--sp-10); align-items: center; }
.hero__content { max-width: 56ch; }
.hero h1 { margin-block: var(--sp-4) var(--sp-5); }
.hero h1 em { font-style: italic; color: var(--honey-700); }
.hero__lead { font-size: var(--text-lg); color: var(--brown-700); margin-bottom: var(--sp-8); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero__trust { display: flex; flex-wrap: wrap; gap: var(--sp-5); margin-top: var(--sp-8); color: var(--brown-700); font-size: var(--text-sm); font-weight: 600; }
.hero__trust span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero__trust svg { width: 18px; height: 18px; color: var(--honey-600); }

.hero__media { position: relative; }
.hero__art { position: relative; aspect-ratio: 4/5; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg);
  background: radial-gradient(120% 120% at 30% 10%, var(--honey-300), var(--honey-600) 70%, var(--honey-800)); }
.hero__art img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.hero__float { position: absolute; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.hero__float--tl { top: var(--sp-5); left: calc(var(--sp-5) * -1); animation: float 5s ease-in-out infinite; }
.hero__float--br { bottom: var(--sp-6); right: calc(var(--sp-5) * -1); animation: float 6s ease-in-out infinite reverse; }
.hero__float .num { font-family: var(--font-display); font-size: var(--text-xl); color: var(--honey-700); }
.hero__float small { color: var(--muted); font-size: var(--text-xs); display: block; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; }
  .hero { padding-block: var(--sp-24); }
}

/* ── Trust strip ── */
.trust-strip { background: var(--paper); border-block: 1px solid var(--line-2); }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); padding-block: var(--sp-10); }
.trust-item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.trust-item__icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--honey-100); color: var(--honey-700); }
.trust-item__icon svg { width: 24px; height: 24px; }
.trust-item h4 { font-family: var(--font-body); font-weight: 800; font-size: var(--text-base); margin-bottom: 2px; }
.trust-item p { font-size: var(--text-sm); color: var(--muted); }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Category chips row ── */
.cat-rail { display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-2); scrollbar-width: none; }
.cat-rail::-webkit-scrollbar { display: none; }
.cat-card { flex-shrink: 0; width: 160px; border-radius: var(--r-lg); overflow: hidden; position: relative; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); transition: transform var(--t) var(--ease), box-shadow var(--t); }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; }
.cat-card__overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: var(--sp-3); background: linear-gradient(to top, rgba(42,29,16,0.7), transparent 65%); }
.cat-card__overlay span { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); }

/* ── Product grid ── */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
@media (min-width: 640px) { .product-grid { gap: var(--sp-5); } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Listing layout ── */
.listing { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
.listing__head { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.listing__toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; }
.filter-pills { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: var(--sp-3); margin-left: auto; }
.result-count { color: var(--muted); font-size: var(--text-sm); }
.search-inline { position: relative; }
.search-inline svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search-inline .input { padding-left: 2.6rem; min-width: 220px; }

/* ── Product detail (PDP) ── */
.pdp { display: grid; grid-template-columns: 1fr; gap: var(--sp-8); }
.gallery { display: flex; flex-direction: column; gap: var(--sp-3); }
.gallery__main { position: relative; aspect-ratio: 1/1; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, var(--paper-2), var(--honey-100)); box-shadow: var(--shadow-md); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.gallery__thumb { width: 72px; height: 72px; border-radius: var(--r-md); overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--honey-100); transition: border-color var(--t-fast); }
.gallery__thumb.is-active { border-color: var(--honey-600); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.pdp__info .badge { margin-bottom: var(--sp-3); }
.pdp__title { margin-bottom: var(--sp-3); }
.pdp__rating { margin-bottom: var(--sp-4); }
.pdp__price { margin-bottom: var(--sp-5); }
.pdp__price .price__now { font-size: var(--text-3xl); }
.pdp__short { color: var(--brown-700); font-size: var(--text-lg); line-height: var(--leading-normal); margin-bottom: var(--sp-6); }
.option-group { margin-bottom: var(--sp-6); }
.option-group__label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-3); }
.option-group__label .label { margin: 0; }
.size-options { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.size-opt { padding: 0.7rem 1.1rem; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--paper); font-weight: 700; font-size: var(--text-sm); cursor: pointer; transition: all var(--t-fast); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px; }
.size-opt small { font-weight: 600; color: var(--muted); font-size: var(--text-xs); }
.size-opt:hover:not(:disabled) { border-color: var(--honey-400); }
.size-opt.is-active { border-color: var(--honey-600); background: var(--honey-50); box-shadow: 0 0 0 3px rgba(224,160,60,0.14); }
.size-opt:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.pdp__buy { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-6); flex-wrap: wrap; }
.pdp__buy .btn-primary { flex: 1; min-width: 200px; }
.stock-line { font-size: var(--text-sm); font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem; }
.stock-line.in { color: var(--success); }
.stock-line.low { color: var(--honey-800); }
.stock-line.out { color: var(--danger); }
.pdp__meta { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-5); border-top: 1px solid var(--line-2); }
.pdp__meta a { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: var(--text-sm); }
.pdp__meta svg { width: 18px; height: 18px; }

@media (min-width: 900px) { .pdp { grid-template-columns: 1fr 1fr; gap: var(--sp-12); } .gallery { position: sticky; top: calc(var(--sp-8) + 72px); align-self: start; } }

/* ── Rich text (description) ── */
.rich { color: var(--text); line-height: var(--leading-normal); }
.rich h2, .rich h3, .rich h4 { margin: var(--sp-6) 0 var(--sp-3); }
.rich p { margin-bottom: var(--sp-4); }
.rich ul, .rich ol { margin: 0 0 var(--sp-4) 1.25rem; }
.rich ul { list-style: disc; }
.rich ol { list-style: decimal; }
.rich li { margin-bottom: var(--sp-2); }
.rich a { text-decoration: underline; text-underline-offset: 2px; }
.rich blockquote { border-left: 3px solid var(--honey-400); padding-left: var(--sp-4); color: var(--brown-700); font-style: italic; margin: var(--sp-4) 0; }

/* ── Tabs / detail sections ── */
.detail-tabs { display: flex; gap: var(--sp-2); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.tab-btn { padding: 0.75rem 0.25rem; margin-right: var(--sp-5); font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t-fast), border-color var(--t-fast); }
.tab-btn.is-active { color: var(--honey-800); border-color: var(--honey-600); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade-in var(--t) var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Reviews ── */
.review { padding: var(--sp-5) 0; border-bottom: 1px solid var(--line-2); }
.review__head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.review__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--honey-200); color: var(--honey-800); display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); }
.review__name { font-weight: 800; }
.review__meta { font-size: var(--text-xs); color: var(--muted); }
.review__reply { margin-top: var(--sp-3); margin-left: var(--sp-6); padding: var(--sp-3) var(--sp-4); background: var(--honey-50); border-radius: var(--r-md); font-size: var(--text-sm); }
.verified-tag { color: var(--success); font-size: var(--text-xs); font-weight: 800; display: inline-flex; align-items: center; gap: 0.3rem; }

/* ── Cart ── */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-8); }
.cart-item { display: grid; grid-template-columns: 84px 1fr; gap: var(--sp-4); padding: var(--sp-5) 0; border-bottom: 1px solid var(--line-2); }
.cart-item__img { width: 84px; height: 84px; border-radius: var(--r-md); object-fit: cover; background: var(--honey-100); }
.cart-item__main { display: flex; flex-direction: column; gap: var(--sp-2); }
.cart-item__top { display: flex; justify-content: space-between; gap: var(--sp-3); }
.cart-item__name { font-family: var(--font-display); font-size: var(--text-lg); color: var(--ink); }
.cart-item__size { font-size: var(--text-sm); color: var(--muted); }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: auto; }
.link-danger { color: var(--danger); font-weight: 700; font-size: var(--text-sm); }
.link-danger:hover { color: #8C1D17; }

.summary { position: sticky; top: calc(72px + var(--sp-5)); }
.summary__row { display: flex; justify-content: space-between; padding: var(--sp-2) 0; font-size: var(--text-sm); }
.summary__row.total { border-top: 1px solid var(--line); margin-top: var(--sp-2); padding-top: var(--sp-4); font-size: var(--text-lg); font-weight: 800; color: var(--ink); }
.summary__row .price__now { font-size: var(--text-xl); }
.coupon-row { display: flex; gap: var(--sp-2); margin: var(--sp-4) 0; }
.coupon-tag { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--success-bg); color: var(--success); font-weight: 700; font-size: var(--text-sm); padding: 0.35rem 0.7rem; border-radius: var(--r-pill); }
.free-ship-note { color: var(--honey-800); font-size: var(--text-sm); font-weight: 700; background: var(--honey-50); padding: var(--sp-3); border-radius: var(--r-md); margin-bottom: var(--sp-4); display: flex; align-items: center; gap: 0.5rem; }

@media (min-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1.6fr 1fr; gap: var(--sp-12); align-items: start; }
}

/* ── Checkout ── */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-8); }
.checkout-section { margin-bottom: var(--sp-8); }
.checkout-section h3 { margin-bottom: var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.checkout-section h3 .step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brown-800); color: var(--honey-100); display: grid; place-items: center; font-size: var(--text-sm); font-family: var(--font-body); font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 560px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.pay-method { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-4); border: 1.5px solid var(--honey-500); background: var(--honey-50); border-radius: var(--r-md); }
.pay-method__icon { width: 42px; height: 42px; border-radius: var(--r-md); background: var(--honey-100); color: var(--honey-700); display: grid; place-items: center; }
.mini-items { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.mini-item { display: flex; gap: var(--sp-3); align-items: center; font-size: var(--text-sm); }
.mini-item img { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--honey-100); }
.mini-item__qty { margin-left: auto; font-weight: 700; }

/* ── Confirmation ── */
.confirm-hero { text-align: center; padding-block: var(--sp-12) var(--sp-8); }
.confirm-check { width: 84px; height: 84px; margin: 0 auto var(--sp-5); border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; animation: pop var(--t-slow) var(--ease); }
.confirm-check svg { width: 44px; height: 44px; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.order-id-badge { display: inline-block; font-family: var(--font-display); font-size: var(--text-2xl); color: var(--honey-800); background: var(--honey-50); padding: 0.4rem 1.2rem; border-radius: var(--r-md); border: 1px dashed var(--honey-300); margin-top: var(--sp-3); }

/* ── Status timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; margin: var(--sp-4) 0; }
.timeline__step { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-3); position: relative; padding-bottom: var(--sp-5); }
.timeline__step::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: -4px; width: 2px; background: var(--line); }
.timeline__step:last-child::before { display: none; }
.timeline__dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); display: grid; place-items: center; z-index: 1; }
.timeline__step.done .timeline__dot { background: var(--honey-600); border-color: var(--honey-600); color: #fff; }
.timeline__step.done::before { background: var(--honey-400); }
.timeline__label { font-weight: 700; font-size: var(--text-sm); }
.timeline__time { font-size: var(--text-xs); color: var(--muted); }

/* ── Account ── */
.account-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-8); }
.account-nav { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.account-nav button { padding: 0.7rem 1.1rem; border-radius: var(--r-md); font-weight: 700; font-size: var(--text-sm); color: var(--brown-700); border: 1.5px solid var(--line); background: var(--paper); }
.account-nav button.is-active { background: var(--brown-800); color: var(--honey-100); border-color: var(--brown-800); }
.order-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; padding: var(--sp-4); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--paper); margin-bottom: var(--sp-3); }
.order-row__id { font-family: var(--font-display); font-weight: 600; }
.status-chip { font-size: var(--text-xs); font-weight: 800; padding: 0.3rem 0.7rem; border-radius: var(--r-pill); text-transform: capitalize; }
.status-chip.pending, .status-chip.confirmed { background: var(--info-bg); color: var(--honey-800); }
.status-chip.processing, .status-chip.shipped, .status-chip.out_for_delivery { background: #E6EEF6; color: #2A5A8C; }
.status-chip.delivered { background: var(--success-bg); color: var(--success); }
.status-chip.cancelled, .status-chip.returned, .status-chip.refunded { background: #EFE7DA; color: var(--muted); }
@media (min-width: 860px) { .account-layout { grid-template-columns: 230px 1fr; gap: var(--sp-10); } .account-nav { flex-direction: column; position: sticky; top: calc(72px + var(--sp-5)); } }

/* ── Auth (login) ── */
.auth-wrap { max-width: 440px; margin: var(--sp-16) auto; }
.auth-card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: var(--sp-10) var(--sp-8); }
.auth-card .brand { justify-content: center; margin-bottom: var(--sp-6); }
.auth-card h1 { font-size: var(--text-2xl); text-align: center; margin-bottom: var(--sp-2); }
.auth-card p.sub { text-align: center; color: var(--muted); margin-bottom: var(--sp-8); }
.auth-step { animation: fade-in var(--t) var(--ease); }
.resend-row { text-align: center; margin-top: var(--sp-5); font-size: var(--text-sm); color: var(--muted); }

/* ── Policy / legal ── */
.legal { max-width: var(--container-narrow); margin-inline: auto; }
.legal h1 { margin-bottom: var(--sp-6); }
.legal .rich h2 { font-size: var(--text-2xl); }

/* ── Page header band ── */
.page-band { background: var(--paper); border-bottom: 1px solid var(--line-2); padding-block: var(--sp-8); }
.page-band h1 { font-size: var(--text-3xl); }
.page-band p { color: var(--muted); margin-top: var(--sp-2); }
