/* 원두 목록 전용. 색·글꼴·높이 변수는 styles.css 의 것만 쓴다. */
.beans-shop .bean-shop-shell { padding-top: 20px; }

/* 장바구니 줄 — 컴퓨터: 헤더 아래 sticky 한 줄 */
.bean-cart-bar { position: sticky; top: var(--header-h); z-index: 15; border-bottom: 1px solid var(--line); background: rgba(244, 241, 234, .94); backdrop-filter: blur(10px); font-size: 14px; }
.bean-cart-bar-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; width: min(100%, 1440px); margin: 0 auto; padding: 8px clamp(22px, 4.5vw, 64px); }
.bean-cart-bar b { font-weight: 500; font-variant-numeric: tabular-nums; }
.bean-cart-bar-ship { color: var(--ink-2); }
.bean-cart-bar-ship:not(:empty)::before { content: "· "; }
.bean-cart-bar-actions { display: flex; align-items: center; gap: 16px; }
.bean-cart-bar-lookup { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.bean-cart-bar-go { min-height: 44px; padding: 0 18px; }
.bean-cart-bar[data-count="0"] .bean-cart-bar-go { background: transparent; color: var(--ink); }
.bean-cart-bar-notice { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }   /* [r1 ①] 안내 한 줄 + 닫기 */
#cart-notice { flex: 1 1 auto; margin: 0; font-size: 13px; color: var(--ink-2); }
.bean-cart-bar-close { flex: 0 0 auto; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.bean-cart-bar-close:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.bean-cart-bar.is-bump .bean-cart-bar-inner { animation: bean-bump .4s ease-out 1; }
@keyframes bean-bump { 0% { background: var(--paper-2); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .bean-cart-bar.is-bump .bean-cart-bar-inner { animation: none; } }

/* 머리·배송 한 줄 */
.bean-heading { margin-bottom: 12px; }
.bean-heading .section-kicker { margin-bottom: 8px; }
.bean-heading p:not(.section-kicker) { font-size: 15px; line-height: 1.7; }
.bean-ship-strip { display: block; margin: 0 0 24px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; line-height: 1.6; word-break: keep-all; }   /* flex 로 하면 글 토막 사이 gap 이 겹쳐 보여 block 흐름 · keep-all 은 '제주' 가 '제/주' 로 갈라지던 것(375 실측) 방지 */
.bean-ship-strip a { margin-left: 10px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.bean-ship-lookup { display: none; align-items: center; min-height: 44px; font-size: inherit; text-decoration: underline; }

/* 맛 지도 — 읽기 순서는 목록, 위치는 막대 위의 %(니카라과 56 = 재호 11-12 · 나머지 = 재호에게 보인 시안 값 · 막대 색은 그 시안 그대로) */
.bean-taste-map { margin-top: 28px; margin-bottom: 28px; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-2); color: var(--ink); word-break: keep-all; }
.bean-taste-map h2 { margin: 0 0 6px; font-size: 14px; font-weight: 500; line-height: 1.4; }
.bean-taste-intro { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.bean-taste-scale { position: relative; height: 140px; margin-top: 12px; }
.bean-taste-track { position: absolute; top: 53px; left: 0; right: 0; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #6B4E35, #C9B48A 50%, #E9A23B); }
.bean-taste-ends { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 1.5; }
.bean-taste-points { position: relative; height: 100%; margin: 0; padding: 0; list-style: none; }
.bean-taste-points li { position: absolute; top: 42px; left: var(--taste-position); }
.bean-taste-points a { position: absolute; left: -14px; width: 28px; height: 28px; border-radius: 50%; color: var(--ink); }
.bean-taste-dot { position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper); }
.bean-taste-label { position: absolute; left: 50%; bottom: calc(100% + 8px); padding: 3px 4px; border-radius: 2px; font-size: clamp(12px, 1.2vw, 14px); line-height: 1.5; white-space: nowrap; transform: translateX(-50%); }
.bean-taste-points li:nth-child(even) .bean-taste-label { top: calc(100% + 8px); bottom: auto; }
/* 좁은 폭에서도 같은 줄의 긴 이름이 만나지 않게, 끝과 엘살바도르는 안쪽 정렬. */
.bean-taste-points li:first-child .bean-taste-label { transform: translateX(-20%); }
.bean-taste-points li:nth-child(2) .bean-taste-label,
.bean-taste-points li:nth-child(3) .bean-taste-label { transform: translateX(-100%); }
.bean-taste-points li:last-child .bean-taste-label { transform: translateX(-80%); }
.bean-taste-points a:focus-visible,
.bean-taste-points a:focus-visible .bean-taste-label { outline: 2px solid var(--ink); outline-offset: 3px; }

/* 격자·카드 */
.bean-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px 28px; }
.bean-card { position: relative; display: grid; grid-template-areas: "visual" "head" "buy"; gap: 0; min-width: 0; }
.bean-card > * { min-width: 0; }
.bean-head { grid-area: head; }
.bean-visual { grid-area: visual; position: relative; display: grid; align-content: end; aspect-ratio: 5 / 2; margin: 0 0 16px; padding: 14px 16px; overflow: hidden; border-radius: 4px; background: var(--paper-2); color: var(--ink); }
.bean-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bean-card[data-photo] .bean-visual > :not(img) { display: none; }   /* [r1 ⑦] 사진은 article 의 data-photo 로 켠다 */
.bean-card[data-photo] .bean-mark { display: none; }
.bean-mark { position: absolute; top: 14px; left: 16px; display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); }   /* 컴퓨터: 시각 칸 왼쪽 위(카드 기준 절대 위치) */
.bean-card[data-tone="hwasa"] .bean-mark { background: transparent; border: 2px solid var(--ink); }
.bean-card[data-tone="coldbrew"] .bean-mark { width: 26px; height: 14px; border-radius: 0; background: repeating-linear-gradient(180deg, var(--ink) 0 2px, transparent 2px 6px); }
.bean-card[data-tone="single"] .bean-mark { width: 18px; height: 18px; border-radius: 0; background: transparent; border: 2px solid var(--ink); transform: rotate(45deg); }
.bean-visual-notes { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(20px, 2vw, 26px); line-height: 1.25; overflow-wrap: anywhere; }
.bean-kind { margin: 0 0 4px; color: var(--ink-3); font-size: 12px; letter-spacing: .04em; }
.bean-name { margin: 0 0 8px; font-family: var(--font-sans); font-size: clamp(24px, 2vw, 28px); font-style: normal; font-weight: 500; line-height: 1.25; }
.bean-taste { margin: 0 0 4px; color: var(--ink-2); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.bean-taste strong { color: var(--ink); font-weight: 500; }
.bean-origin { margin: 0 0 14px; color: var(--ink-3); font-size: 13px; line-height: 1.6; }
.bean-buy { grid-area: buy; }

/* 정적 가격표: JS 가 선택 단추를 그리면 숨김(무JS·시험용으론 남음) */
.bean-prices { margin: 0; }
.bean-prices div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bean-prices dt, .bean-note dt { color: var(--ink); font-family: var(--font-sans); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }   /* styles.css:339 전역 dt(11px·대문자·자간)를 되돌림 */
.bean-prices dd, .bean-note dd { font-family: var(--font-meta); font-size: 15px; font-variant-numeric: tabular-nums; }
.bean-picker[data-enhanced="1"] + .bean-prices { display: none; }

/* 선택 단추(라디오) */
.bean-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; padding: 0; border: 0; min-width: 0; }
.bean-size { position: relative; min-width: 0; }
.bean-size input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.bean-size label { display: grid; gap: 1px; min-height: 52px; padding: 8px 4px; border: 1px solid var(--line-2); border-radius: 2px; text-align: center; line-height: 1.3; cursor: pointer; }
.bean-size input:checked + label { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.bean-size input:focus-visible + label { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
.bean-size-g { font-size: 14px; font-weight: 500; }
.bean-size-tag { font-size: 11px; color: var(--ink-3); }
.bean-size-won { font-family: var(--font-meta); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bean-size input:checked + label :is(.bean-size-tag, .bean-size-won) { color: var(--paper); }

/* 가격·분쇄·옵션 */
.bean-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; }
.bean-price b { font-family: var(--font-meta); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bean-price-unit, .bean-price-vat { color: var(--ink-3); font-size: 13px; }
.bean-grind { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.bean-grind select, .bean-qty input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line-2); border-radius: 2px; padding: 8px 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
.bean-grind select:disabled { color: var(--ink-3); background: var(--paper-2); }
.bean-grind-note { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; }
.bean-option { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.bean-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

/* 수량·담기 */
.bean-add-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: stretch; margin-top: 6px; }
.bean-qty { display: grid; grid-template-columns: 44px 56px 44px; }
.bean-qty button { min-height: 44px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; }
.bean-qty button:first-child { border-radius: 2px 0 0 2px; border-right: 0; }
.bean-qty button:last-child { border-radius: 0 2px 2px 0; border-left: 0; }
.bean-qty input { border-radius: 0; text-align: center; -moz-appearance: textfield; }
.bean-qty input::-webkit-outer-spin-button, .bean-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bean-add { min-height: 48px; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: var(--paper); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.bean-added { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.bean-added:empty { display: none; }
.bean-added a, .bean-blocked a { text-decoration: underline; text-underline-offset: 3px; }
.bean-blocked { margin: 0; font-size: 14px; color: var(--ink-2); }
.bean-picker :is(button, input, select, a):focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

/* 안내 줄·사진 */
.bean-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px 40px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line-2); }
.bean-note-title { margin: 0 0 12px; font-size: 20px; font-weight: 500; line-height: 1.3; }
.bean-note dl div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.bean-note-text { margin: 12px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.bean-note .button-text { margin-top: 14px; }
.bean-photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; }

/* 휴대폰 */
@media (max-width: 860px) {
  .bean-cart-bar-lookup { display: none; }
  /* 눌림 영역은 44px로 두고 기존 배송 줄의 세로 여백을 함께 쓴다. */
  .bean-ship-lookup { display: inline-flex; margin-block: -12px; vertical-align: middle; }
  .beans-shop .bean-shop-shell { padding-top: 20px; padding-bottom: 40px; }
  .bean-cart-bar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 31; border-top: 1px solid var(--line-2); border-bottom: 0; box-shadow: 0 -10px 28px rgba(20, 20, 20, .06); }
  .bean-cart-bar-inner { min-height: calc(var(--quick-actions-h) + env(safe-area-inset-bottom)); padding: 6px 22px calc(6px + env(safe-area-inset-bottom)); gap: 4px 12px; }
  .bean-cart-bar[data-shown="0"] { display: none; }                               /* [r1 ①] shown = 수량>0 || 안내문 */
  body[data-cart-docked="1"] .quick-actions { display: none; }                      /* docked 는 shown 과 같은 값 → 겹침 0 */
  body[data-cart-docked="1"] { padding-bottom: var(--cart-bar-h, calc(var(--quick-actions-h) + env(safe-area-inset-bottom))); }   /* [r1 ⑤] 띠 실제 높이만큼 */
  body[data-cart-docked="1"] .menu-scroll-top { bottom: calc(var(--cart-bar-h, calc(var(--quick-actions-h) + env(safe-area-inset-bottom))) + 16px); }
  .bean-cart-bar-text { display: block; font-size: 13px; line-height: 1.35; }
  .bean-cart-bar-ship { display: block; font-size: 12px; }          /* 둘째 줄: 배송비 안내 */
  .bean-cart-bar-ship:not(:empty)::before { content: ""; }
  .bean-cart-bar-go { padding: 0 16px; font-size: 14px; }
}
@media (max-width: 600px) {
  .bean-heading .section-kicker { display: none; }
  .bean-heading { gap: 10px; margin-bottom: 14px; }
  .bean-ship-strip { margin-bottom: 22px; }
  .bean-ship-more { display: none; }
  .bean-grid { gap: 28px; }
  .bean-visual { display: none; }                                     /* 글 폭을 다 쓴다(§2-2) */
  .bean-card[data-photo] .bean-visual { display: grid; aspect-ratio: 3 / 2; margin: 0 0 14px; }   /* 사진이 오면 휴대폰에서도 */
  .bean-mark { position: static; display: inline-block; vertical-align: -1px; width: 12px; height: 12px; margin-right: 8px; }   /* '블렌드' 글 앞 표식 */
  .bean-card[data-tone="coldbrew"] .bean-mark { width: 16px; height: 8px; background: repeating-linear-gradient(180deg, var(--ink) 0 1.5px, transparent 1.5px 4px); }
  .bean-card[data-tone="single"] .bean-mark { width: 10px; height: 10px; margin-right: 10px; }
  .bean-origin { margin-bottom: 12px; }
  .bean-sizes label { min-height: 50px; }
  .bean-grind select, .bean-qty input { font-size: 16px; }   /* iOS 자동 확대 방지 */
  .bean-notes { margin-top: 44px; }
}
