/* Appily-One — specialty coffee roastery storefront */
:root {
  --roast: #3D2314;
  --roast-mid: #6F4E37;
  --black: #0A0A0A;
  --cream: #FAF7F2;
  --cream-2: #F3EDE4;
  --yellow: #F5C518;
  --yellow-pale: #FFF9E6;
  --line: rgba(61, 35, 20, 0.14);
  --muted: #8A7B6E;
  --white: #ffffff;
  --radius: 8px;
  --radius-lg: 20px;
  --radius-round: 999px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --shadow: 0 20px 50px rgba(10, 10, 10, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
body.appily-store {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--black);
  line-height: 1.65;
  min-height: 100%;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex: 1 0 auto; }

.roast-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--black) 0%, var(--roast) 35%, var(--yellow) 65%, var(--black) 100%);
}

/* Header — dark utility + centered brand */
.appily-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(10,10,10,.06);
}
.header-util {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; background: var(--black); color: var(--cream);
  width: 100%; max-width: none;
  padding-left: max(16px, calc((100% - 1160px) / 2 + 16px));
  padding-right: max(16px, calc((100% - 1160px) / 2 + 16px));
}
.util-tag { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }

.header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.brand-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--roast);
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-wordmark .dot { color: var(--yellow); }

.header-search {
  display: flex;
  flex-shrink: 0;
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-round);
  overflow: hidden;
  background: var(--cream);
}
.header-search input {
  flex: 1; border: 0; background: transparent;
  padding: 9px 14px; font: inherit; outline: none; font-size: .88rem;
  min-width: 0;
}
.header-search button {
  border: 0; background: var(--yellow); color: var(--black);
  padding: 9px 14px; cursor: pointer; font-size: .78rem; font-weight: 700;
  white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-util .action-link { font-size: .82rem; font-weight: 600; color: var(--cream); }
.cart-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--black);
  padding: 6px 12px; border-radius: var(--radius-round);
  font-size: .8rem; font-weight: 700;
}
.cart-badge {
  background: var(--black); color: var(--yellow);
  min-width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: .7rem;
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 8px; cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--roast); }

.appily-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}
.appily-nav a {
  padding: 7px 12px;
  border-radius: var(--radius-round);
  font-size: .78rem;
  font-weight: 600;
  color: var(--roast-mid);
  border: 1px solid transparent;
  white-space: nowrap;
}
.appily-nav a:hover { border-color: var(--line); background: var(--yellow-pale); color: var(--roast); }

/* Typography */
.eyebrow {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--yellow); font-weight: 700; margin: 0 0 10px;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 600; }
h1 em { font-style: italic; color: var(--yellow); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-round);
  font-weight: 600; font-size: .9rem; border: 2px solid transparent;
  cursor: pointer; transition: .2s;
}
.btn-primary { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.btn-primary:hover { background: #e6b310; }
.btn-outline { background: transparent; border-color: var(--cream); color: var(--cream); }
.panel .btn-outline,
.cart-add-more {
  border-color: var(--roast);
  color: var(--roast);
}
.panel .btn-outline:hover,
.cart-add-more:hover {
  background: var(--yellow-pale);
  border-color: var(--roast-mid);
}
.btn-soft { background: var(--cream-2); color: var(--roast); border-color: var(--line); }
.btn-dark { background: var(--black); color: var(--cream); }
.btn-sm { padding: 8px 16px; font-size: .82rem; }

/* Hero — dark roastery split */
.hero-roastery {
  padding: 0;
  background: var(--black);
  color: var(--cream);
}
.hero-roast-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; min-height: 480px;
}
.hero-roast-copy {
  padding: 56px 0 56px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-roast-copy h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin: 0 0 18px;
  color: var(--cream);
}
.hero-roast-copy .hero-lede { color: rgba(250,247,242,.75); max-width: 46ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.trust-badges {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 28px; flex-wrap: wrap;
}
.trust-badges strong { display: block; font-size: 1.35rem; color: var(--yellow); font-family: var(--font-display); }
.trust-badges span { font-size: .72rem; color: rgba(250,247,242,.6); text-transform: uppercase; letter-spacing: .1em; }

.hero-roast-visual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 40px 0 40px 24px; align-content: center;
}
.roast-tile {
  background: var(--roast); border-radius: 50%;
  overflow: hidden; aspect-ratio: 1;
  border: 3px solid var(--yellow);
  box-shadow: var(--shadow);
}
.roast-tile img { width: 100%; height: 100%; object-fit: cover; }
.roast-tile-1 { grid-row: span 2; border-radius: var(--radius-lg); aspect-ratio: auto; }
.roast-tile-1 img { aspect-ratio: 3/4; }

/* Sections */
.section { padding: 56px 0; }
.section-dark { background: var(--roast); color: var(--cream); }
.section-muted { background: var(--cream-2); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 1.85rem; }
.section-head p { margin: 0; color: var(--muted); }
.section-dark .section-head p { color: rgba(250,247,242,.7); }

.category-rail { padding: 36px 0; }
.rail-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.rail-chip {
  flex-shrink: 0; padding: 10px 20px; border-radius: var(--radius-round);
  background: var(--white); border: 1px solid var(--line);
  font-size: .85rem; font-weight: 600; color: var(--roast);
}
.rail-chip:hover { border-color: var(--yellow); background: var(--yellow-pale); }

/* Product grid — circular image frames */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  text-align: center;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product-img {
  position: relative; display: block;
  padding: 20px 20px 0;
}
.product-img img {
  aspect-ratio: 1; object-fit: cover; width: 100%;
  border-radius: 50%; border: 3px solid var(--cream-2);
  background: var(--cream-2);
}
.product-badge {
  position: absolute; top: 24px; right: 24px;
  background: var(--black); color: var(--yellow);
  font-size: .65rem; font-weight: 700; padding: 4px 10px;
  border-radius: var(--radius-round); text-transform: uppercase; letter-spacing: .06em;
}
.product-body { padding: 14px 16px 20px; }
.product-cat { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.product-body h3 { font-size: .95rem; margin: 6px 0; font-family: var(--font-body); font-weight: 600; }
.product-variant { font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.product-foot { display: flex; justify-content: center; align-items: center; gap: 12px; }
.price { font-weight: 700; color: var(--roast); font-size: 1.05rem; }

.product-grid-compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.product-tile {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden; text-align: center;
}
.product-tile-img { padding: 12px 12px 0; }
.product-tile-img img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 50%; }
.product-tile-info { padding: 10px; }
.product-tile-info h3 { font-size: .85rem; margin: 0 0 6px; font-family: var(--font-body); }

.promo-band {
  background: linear-gradient(135deg, var(--roast) 0%, var(--black) 100%);
  color: var(--cream); padding: 44px 0;
}
.promo-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.promo-inner h2 { margin: 0 0 8px; color: var(--cream); }
.promo-inner p { margin: 0; opacity: .8; }

/* Catalog */
.page-hero { padding: 40px 0 24px; background: var(--cream-2); }
.catalog-layout { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding-bottom: 56px; }
.filter-panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
  position: sticky; top: 140px; align-self: start;
}
.filter-panel h2 { font-size: .95rem; margin: 0 0 14px; }
.filter-nav { display: flex; flex-direction: column; gap: 2px; }
.filter-nav a {
  padding: 8px 12px; border-radius: var(--radius);
  font-size: .86rem; color: var(--muted);
}
.filter-nav a.active, .filter-nav a:hover { background: var(--yellow-pale); color: var(--roast); font-weight: 600; }
.result-meta { font-size: .88rem; color: var(--muted); margin: 0 0 16px; }

/* Product detail */
.product-hero { padding: 40px 0; }
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-gallery {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden; padding: 24px;
}
.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.product-info h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 8px 0 14px; }
.product-lede { color: var(--muted); margin-bottom: 20px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 24px; }
.spec-list div { padding: 10px 12px; background: var(--cream-2); border-radius: var(--radius); }
.spec-list dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.spec-list dd { margin: 4px 0 0; font-weight: 600; }
.buy-panel { padding: 22px; background: var(--black); color: var(--cream); border-radius: var(--radius-lg); }
.buy-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.price-lg { font-size: 1.6rem; color: var(--yellow); }
.buy-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.buy-form label { display: block; font-size: .82rem; margin-bottom: 4px; }
.buy-form select { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.fine-print { font-size: .78rem; opacity: .7; margin: 12px 0 0; }

/* Cart / checkout */
.dual { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.summary-box { position: sticky; top: 140px; }
.cart-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cart-table th, .cart-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.price-row { display: flex; justify-content: space-between; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 4px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); font: inherit;
}
.form-grid textarea { min-height: 90px; resize: vertical; }
.notice { padding: 14px 16px; border-radius: var(--radius); background: var(--cream-2); border: 1px solid var(--line); }
.notice.error { border-color: #e8b4b4; background: #fdf2f2; color: #922b21; }
.notice.success { border-color: #b8e0c8; background: #f0fdf4; }
.notice.warning { border-color: #f0d78c; background: var(--yellow-pale); }
.mini-copy { font-size: .85rem; color: var(--muted); margin: 0; }

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state p { margin: 0; font-size: 1.05rem; font-weight: 600; }
.empty-state .sub { margin-top: 8px; font-size: .92rem; font-weight: 400; color: var(--muted); }

.catalog-pagination { margin-top: 32px; }
.pagination-inner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pagination-btn, .pagination-num {
  padding: 8px 14px; border-radius: var(--radius-round);
  border: 1px solid var(--line); font-size: .88rem; font-weight: 600;
}
.pagination-num.is-active { background: var(--roast); color: var(--cream); border-color: var(--roast); }
.pagination-btn.is-disabled { opacity: .4; pointer-events: none; }

/* Footer */
.appily-footer {
  margin-top: auto;
  background: var(--black); color: var(--cream);
  padding: 48px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 28px; padding-bottom: 32px;
}
.footer-brand p { opacity: .75; font-size: .9rem; margin: 8px 0 0; }
.footer-legal { font-size: .78rem; opacity: .6; }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 12px; color: var(--yellow); }
.footer-col a, .footer-contact p { display: block; font-size: .88rem; opacity: .8; margin-bottom: 8px; }
.footer-col a:hover { opacity: 1; color: var(--yellow); }
.footer-base {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0; font-size: .82rem; opacity: .6;
}

.order-list { display: grid; gap: 12px; margin-top: 18px; }
.order-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white);
}

@media (max-width: 900px) {
  .header-main { flex-wrap: wrap; }
  .brand-center { order: 1; flex: 1; }
  .nav-toggle { display: flex; order: 0; }
  .header-search { order: 2; width: 100%; max-width: none; }
  .appily-nav {
    display: none;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-bottom: 12px;
  }
  .appily-nav.is-open { display: flex; }
  .appily-nav a { text-align: center; }
  .hero-roast-grid, .product-layout, .dual, .catalog-layout { grid-template-columns: 1fr; }
  .hero-roast-visual { padding: 0 0 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .trust-badges { gap: 16px; }
}
