/* ==============================================
   theBetterBean Common CSS - (주)비저블엑스
   MakeShop Skin - 공통 스타일
   Design Tokens + Reset + Base + Layout +
   Components + Animations + Responsive
   ============================================== */


/* ══════════════════════════════════════
   1. DESIGN TOKENS (CSS Custom Properties)
   ══════════════════════════════════════ */

:root {
  /* ── Colors: Background ── */
  --color-bg-primary: #FAF6ED;
  --color-bg-secondary: #FDFBF7;
  --color-bg-dark: #342D2C;
  --color-bg-overlay: rgba(52, 45, 44, 0.6);
  --color-bg-card: #FFFFFF;

  /* ── Colors: Text ── */
  --color-text-primary: #4C4341;
  --color-text-secondary: #7A706D;
  --color-text-tertiary: #A89E9B;
  --color-text-inverse: #FDFBF7;
  --color-text-accent: #C8652A;

  /* ── Colors: Accent & CTA ── */
  --color-accent: #C8652A;
  --color-accent-hover: #B5581F;
  --color-accent-light: rgba(200, 101, 42, 0.1);
  --color-accent-border: rgba(200, 101, 42, 0.3);

  /* ── Colors: Border & Divider ── */
  --color-border: #E8E2D8;
  --color-border-light: #F0ECE4;
  --color-divider: #E0D9CE;

  /* ── Colors: Origin (Single-Origin Coffee) ── */
  --color-origin-ethiopia: #D4A574;
  --color-origin-colombia: #8B6F47;
  --color-origin-brazil: #6B8F3C;
  --color-origin-guatemala: #C75B39;
  --color-origin-kenya: #A0522D;
  --color-origin-indonesia: #5C4033;

  /* ── Typography ── */
  --font-primary: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ── Font Sizes (fluid) ── */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-xl: clamp(1.15rem, 1rem + 0.75vw, 1.25rem);
  --text-2xl: clamp(1.4rem, 1.2rem + 1vw, 1.5rem);
  --text-3xl: clamp(1.7rem, 1.4rem + 1.5vw, 1.875rem);
  --text-4xl: clamp(2rem, 1.5rem + 2.5vw, 2.5rem);
  --text-5xl: clamp(2.5rem, 1.8rem + 3.5vw, 3.5rem);
  --text-hero: clamp(3rem, 2rem + 5vw, 5rem);

  /* ── Line Heights ── */
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* ── Letter Spacing ── */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;
  --tracking-widest: 0.15em;

  /* ── Spacing ── */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;
  --space-section: clamp(3rem, 2rem + 5vw, 8rem);
  --space-section-lg: clamp(4rem, 3rem + 5vw, 10rem);

  /* ── Layout ── */
  --container-max: 1440px;
  --container-content: 1200px;
  --container-narrow: 800px;
  --container-padding: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --grid-columns: 12;
  --grid-gap: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  /* ── Border Radius ── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(76, 67, 65, 0.06);
  --shadow-md: 0 4px 12px rgba(76, 67, 65, 0.08);
  --shadow-lg: 0 8px 24px rgba(76, 67, 65, 0.1);
  --shadow-xl: 0 12px 40px rgba(76, 67, 65, 0.12);
  --shadow-card: 0 2px 8px rgba(76, 67, 65, 0.05);
  --shadow-card-hover: 0 8px 24px rgba(76, 67, 65, 0.1);

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);

  /* ── Z-Index Scale ── */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* ── Header ── */
  --header-height: 72px;
  --header-height-scrolled: 60px;
}


/* ══════════════════════════════════════
   2. CSS RESET
   ══════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  text-rendering: optimizeSpeed;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
}

fieldset {
  border: none;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ══════════════════════════════════════
   3. BASE STYLES & TYPOGRAPHY
   ══════════════════════════════════════ */

body {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

/* ── Headings ── */
h1, .h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h2, .h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h3, .h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

h4, .h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

h5, .h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

h6, .h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

/* ── Body Text ── */
p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

/* ── Links ── */
a {
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* ── Labels & Captions ── */
.label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.caption {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: var(--leading-normal);
}

/* ── Section Titles ── */
.section-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-lg);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: var(--leading-relaxed);
}

/* ── Decorative Line ── */
.accent-line {
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
  margin-bottom: var(--space-xl);
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-accent);
  z-index: var(--z-toast);
  transition: width 50ms linear;
}

/* ── Selection ── */
::selection {
  background-color: var(--color-accent-light);
  color: var(--color-text-primary);
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Horizontal Rule ── */
hr {
  border: none;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-2xl) 0;
}

/* ── Price Display ── */
.price {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.price--original {
  text-decoration: line-through;
  color: var(--color-text-tertiary);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-sm);
}

.price--sale {
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}


/* ══════════════════════════════════════
   4. LAYOUT SYSTEM
   ══════════════════════════════════════ */

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--content { max-width: var(--container-content); }
.container--narrow  { max-width: var(--container-narrow); }

.container--full {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* ── 12-Column Grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gap);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ── Grid Spans ── */
.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* ── Section Spacing ── */
.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.section--lg {
  padding-top: var(--space-section-lg);
  padding-bottom: var(--space-section-lg);
}

.section--cream { background-color: var(--color-bg-primary); }
.section--white { background-color: var(--color-bg-secondary); }

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section--dark .section-title,
.section--dark h2,
.section--dark h3 {
  color: var(--color-text-inverse);
}

.section--dark p,
.section--dark .section-subtitle {
  color: rgba(253, 251, 247, 0.7);
}

/* ── Flex Utilities ── */
.flex     { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }

.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }

.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }
.gap-3xl { gap: var(--space-3xl); }

/* ── Text Alignment ── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ── Margin Utilities ── */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-md   { margin-top: var(--space-md); }
.mt-lg   { margin-top: var(--space-lg); }
.mt-xl   { margin-top: var(--space-xl); }
.mt-2xl  { margin-top: var(--space-2xl); }
.mb-md   { margin-bottom: var(--space-md); }
.mb-lg   { margin-bottom: var(--space-lg); }
.mb-xl   { margin-bottom: var(--space-xl); }
.mb-2xl  { margin-bottom: var(--space-2xl); }

/* ── Full Viewport Hero ── */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img,
.hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-bg-overlay);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-text-inverse);
  padding: var(--space-xl);
}

/* ── Split Layout (Product Detail) ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  align-items: start;
}

.split--60-40 { grid-template-columns: 3fr 2fr; }
.split--40-60 { grid-template-columns: 2fr 3fr; }

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

/* ── Sticky Sidebar ── */
.sticky-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

/* ── Page Layout with Header Offset ── */
.page-content {
  padding-top: var(--header-height);
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
}

.divider--accent {
  background-color: var(--color-accent);
  height: 2px;
  width: 40px;
}


/* ══════════════════════════════════════
   5. COMPONENTS
   ══════════════════════════════════════ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-align: center;
  border: 1.5px solid transparent;
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-text-inverse);
  border-color: var(--color-accent);
}

.btn--accent:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 101, 42, 0.3);
  color: var(--color-text-inverse);
}

.btn--accent:active { transform: translateY(0); }

.btn--outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-text-secondary);
  padding: var(--space-sm) var(--space-md);
}

.btn--ghost:hover {
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

.btn--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
  border-color: var(--color-bg-dark);
}

.btn--dark:hover {
  background-color: #1a1514;
  transform: translateY(-1px);
  color: var(--color-text-inverse);
}

.btn--white {
  background-color: var(--color-bg-card);
  color: var(--color-text-primary);
  border-color: var(--color-bg-card);
}

.btn--white:hover {
  background-color: var(--color-bg-secondary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  padding: 6px var(--space-md);
  font-size: var(--text-xs);
}

.btn--lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
}

.btn--full { width: 100%; }

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn--icon svg {
  width: 18px;
  height: 18px;
}

/* ── Product Cards ── */
.product-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.product-card__image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--color-bg-secondary);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__origin-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.product-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(76, 67, 65, 0.4);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover .product-card__overlay { opacity: 1; }

.product-card__quick-view {
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
  transform: translateY(8px);
  transition: transform var(--transition-base);
}

.product-card:hover .product-card__quick-view { transform: translateY(0); }

.product-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-card__origin {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.product-card__origin-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.product-card__name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__name a {
  color: inherit;
  transition: color var(--transition-fast);
}

.product-card__name a:hover { color: var(--color-accent); }

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.product-card__price-sell {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.product-card__price-original {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  text-decoration: line-through;
}

/* ── Category Cards ── */
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.category-card:hover { transform: translateY(-4px); }

.category-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.category-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.category-card:hover .category-card__bg img { transform: scale(1.05); }

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(52, 45, 44, 0.8) 0%, transparent 60%);
  z-index: 1;
}

.category-card__content {
  position: relative;
  z-index: 2;
  padding: var(--space-2xl);
  color: var(--color-text-inverse);
}

.category-card__label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

.category-card__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.category-card__desc {
  font-size: var(--text-sm);
  opacity: 0.8;
  margin-bottom: var(--space-lg);
  line-height: var(--leading-relaxed);
}

.category-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-inverse);
  transition: gap var(--transition-base);
}

.category-card__link:hover {
  gap: var(--space-md);
  color: var(--color-text-inverse);
}

.category-card__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
}

.category-card__link:hover svg { transform: translateX(4px); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 3px var(--space-sm);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

.badge--new  { background-color: var(--color-accent-light); color: var(--color-accent); }
.badge--best { background-color: rgba(107, 143, 60, 0.1); color: #6B8F3C; }
.badge--sale { background-color: rgba(199, 91, 57, 0.1); color: #C75B39; }

.badge--origin {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-light);
}

/* ── Origin Dots & Tags ── */
.origin-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  flex-shrink: 0;
}

.origin-dot--ethiopia   { background-color: var(--color-origin-ethiopia); }
.origin-dot--colombia   { background-color: var(--color-origin-colombia); }
.origin-dot--brazil     { background-color: var(--color-origin-brazil); }
.origin-dot--guatemala  { background-color: var(--color-origin-guatemala); }
.origin-dot--kenya      { background-color: var(--color-origin-kenya); }
.origin-dot--indonesia  { background-color: var(--color-origin-indonesia); }

.origin-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.origin-tag:hover,
.origin-tag--active {
  border-color: var(--color-accent-border);
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  background-color: transparent;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn:hover,
.filter-btn--active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

.filter-btn__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

/* ── Tabs ── */
.tabs {
  border-bottom: 1px solid var(--color-border);
}

.tabs__list {
  display: flex;
  gap: 0;
}

.tabs__btn {
  position: relative;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  background: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.tabs__btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: transparent;
  transition: background-color var(--transition-fast);
}

.tabs__btn:hover { color: var(--color-text-primary); }

.tabs__btn--active {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
}

.tabs__btn--active::after { background-color: var(--color-accent); }

.tabs__panel {
  display: none;
  padding: var(--space-2xl) 0;
}

.tabs__panel--active { display: block; }

/* ── Form Elements ── */
.form-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-input::placeholder { color: var(--color-text-tertiary); }

.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  padding-right: var(--space-2xl);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237A706D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-selector__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-secondary);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  font-size: var(--text-lg);
  line-height: 1;
}

.qty-selector__btn:hover {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

.qty-selector__input {
  width: 48px;
  height: 36px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.breadcrumb a {
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--color-accent); }

.breadcrumb__sep {
  font-size: 10px;
  opacity: 0.5;
}

.breadcrumb__current {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-2xl) 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

.pagination .active,
.pagination .current {
  background-color: var(--color-accent);
  color: var(--color-text-inverse);
  font-weight: var(--font-weight-semibold);
}

.pagination .prev,
.pagination .next {
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5xl) var(--space-xl);
  min-height: 400px;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-xl);
  opacity: 0.5;
}

.empty-state__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.empty-state__desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 400px;
  margin-bottom: var(--space-xl);
}

.empty-state__suggestions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2xl);
}

.empty-state__actions {
  display: flex;
  gap: var(--space-md);
}

/* ── Info Table ── */
.info-table {
  width: 100%;
  border-top: 2px solid var(--color-text-primary);
}

.info-table tr { border-bottom: 1px solid var(--color-border); }

.info-table th {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  text-align: left;
  width: 160px;
  vertical-align: top;
}

.info-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-sm);
  z-index: var(--z-toast);
  opacity: 0;
  transition: transform var(--transition-spring), opacity var(--transition-base);
  pointer-events: none;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast__action {
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  margin-left: var(--space-sm);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.toast__action:hover {
  opacity: 0.8;
  color: var(--color-accent);
}

/* ── Scroll Down Indicator ── */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.scroll-indicator__text {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  opacity: 0.6;
}

.scroll-indicator__arrow {
  width: 1px;
  height: 40px;
  position: relative;
  overflow: hidden;
}

.scroll-indicator__arrow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  animation: scrollArrow 2s ease-in-out infinite;
}

@keyframes scrollArrow {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}


/* ══════════════════════════════════════
   6. ANIMATIONS & TRANSITIONS
   ══════════════════════════════════════ */

/* ── Scroll Reveal ── */
.reveal-init {
  opacity: 0;
  will-change: opacity, transform;
}

[data-reveal="fade-up"].reveal-init,
[data-reveal].reveal-init {
  transform: translateY(30px);
}

[data-reveal="fade-up"].revealed,
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

[data-reveal="fade-in"].reveal-init { transform: none; }

[data-reveal="fade-in"].revealed {
  opacity: 1;
  transition: opacity 0.8s ease;
}

[data-reveal="fade-left"].reveal-init { transform: translateX(-30px); }

[data-reveal="fade-left"].revealed {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

[data-reveal="fade-right"].reveal-init { transform: translateX(30px); }

[data-reveal="fade-right"].revealed {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

[data-reveal="scale-up"].reveal-init { transform: scale(0.95); }

[data-reveal="scale-up"].revealed {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.6s ease,
              transform 0.6s var(--ease-out-expo);
}

[data-reveal="stagger"] [data-reveal-item] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out-expo),
              transform 0.5s var(--ease-out-expo);
}

[data-reveal="stagger"].revealed [data-reveal-item] {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hover Animations ── */
.hover-zoom { overflow: hidden; }
.hover-zoom img { transition: transform var(--transition-slow); }
.hover-zoom:hover img { transform: scale(1.05); }

.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-underline { position: relative; }

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--color-accent);
  transition: width var(--transition-base);
}

.hover-underline:hover::after { width: 100%; }

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-secondary) 0%,
    var(--color-border-light) 50%,
    var(--color-bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--circle { border-radius: var(--radius-full); }
.skeleton--text   { height: 14px; margin-bottom: var(--space-sm); }
.skeleton--title  { height: 24px; width: 60%; margin-bottom: var(--space-md); }
.skeleton--image  { aspect-ratio: 1 / 1; }

/* ── Cart Badge Animation ── */
@keyframes badgeBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  50%  { transform: scale(0.9); }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.cart-badge-bounce {
  animation: badgeBounce 0.5s var(--ease-out-expo);
}

/* ── Hero Animations ── */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__content > * {
  animation: heroFadeIn 1s var(--ease-out-expo) both;
}

.hero__content > *:nth-child(1) { animation-delay: 0.2s; }
.hero__content > *:nth-child(2) { animation-delay: 0.4s; }
.hero__content > *:nth-child(3) { animation-delay: 0.6s; }
.hero__content > *:nth-child(4) { animation-delay: 0.8s; }

/* ── Page Transitions ── */
@keyframes pageEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.page-content {
  animation: pageEnter 0.4s ease both;
}

/* ── Gallery Animations ── */
.gallery__main {
  overflow: hidden;
  cursor: crosshair;
}

.gallery__main--zooming .gallery__main-img {
  transition: transform 0.05s linear;
}

.gallery__thumb {
  opacity: 0.5;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.gallery__thumb:hover,
.gallery__thumb--active {
  opacity: 1;
  border-color: var(--color-accent);
}

/* ── Filter & Tab Animations ── */
.filter-btn { transition: all var(--transition-base); }
.filter-btn:active { transform: scale(0.96); }

.tabs__panel { animation: tabFadeIn 0.3s ease both; }

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll Progress ── */
.scroll-progress {
  transform-origin: left;
  transition: width 80ms linear;
}


/* ══════════════════════════════════════
   7. RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════ */

/* ── MAX 1440px — Large Desktop Cap ── */
@media (max-width: 1440px) {
  .footer__grid {
    gap: var(--space-2xl);
  }
}

/* ── MAX 1024px — Tablet Landscape ── */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }

  .split,
  .split--60-40,
  .split--40-60 {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .sticky-sidebar { position: static; }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .footer__brand { grid-column: span 2; }

  .footer__cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__cta-form {
    width: 100%;
    max-width: 400px;
  }

  .footer__cta-input {
    flex: 1;
    width: auto;
  }

  .category-showcase .grid--2 { gap: var(--space-lg); }
}

/* ── MAX 768px — Tablet Portrait / Mobile ── */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --header-height-scrolled: 56px;
  }

  .header__nav { display: none; }
  .header__burger { display: flex; }
  .header__dropdown { display: none; }

  .hero { min-height: 80vh; }
  .hero__content h1 { font-size: var(--text-4xl); }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }

  .section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .section--lg {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }

  .category-card { aspect-ratio: 3 / 4; }

  .filter-bar {
    padding: var(--space-md) 0;
    gap: var(--space-xs);
  }

  .tabs__list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs__list::-webkit-scrollbar { display: none; }

  .tabs__btn {
    padding: var(--space-md) var(--space-lg);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__brand { grid-column: span 1; }

  .footer__bottom-inner {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .header__search-input { font-size: var(--text-lg); }

  .product-card__body { padding: var(--space-md); }
  .product-card__name { font-size: var(--text-sm); }
  .product-card__price-sell { font-size: var(--text-base); }

  .gallery__thumbs { gap: var(--space-sm); }
  .gallery__thumb { width: 56px; height: 56px; }

  .breadcrumb {
    font-size: 11px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .origin-list { grid-template-columns: repeat(2, 1fr); }

  .info-table th {
    width: 120px;
    padding: var(--space-sm) var(--space-md);
  }

  .info-table td { padding: var(--space-sm) var(--space-md); }
}

/* ── MAX 480px — Small Mobile ── */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  .product-grid--single-mobile { grid-template-columns: 1fr; }

  .hero { min-height: 70vh; }
  .hero__content h1 { font-size: var(--text-3xl); }
  .hero__content p { font-size: var(--text-sm); }

  .category-card { aspect-ratio: 1 / 1; }
  .category-card__title { font-size: var(--text-2xl); }
  .category-card__content { padding: var(--space-lg); }

  .section-title { font-size: var(--text-3xl); }

  .btn--lg {
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--text-sm);
  }

  .footer__cta-form { flex-direction: column; }
  .footer__cta-input { width: 100%; }

  .header__mobile-auth { flex-direction: column; }
  .header__mobile-auth .btn { width: 100%; }

  .qty-selector__btn { width: 32px; height: 32px; }
  .qty-selector__input { width: 40px; height: 32px; }

  .product-actions { flex-direction: column; }
  .product-actions .btn { width: 100%; }

  .pagination { gap: 2px; }
  .pagination a,
  .pagination span {
    min-width: 32px;
    height: 32px;
    font-size: var(--text-xs);
  }

  .origin-list { grid-template-columns: 1fr; }

  .empty-state {
    padding: var(--space-3xl) var(--space-md);
    min-height: 300px;
  }

  .empty-state__actions {
    flex-direction: column;
    width: 100%;
  }

  .empty-state__actions .btn { width: 100%; }

  .toast {
    left: var(--space-md);
    right: var(--space-md);
    transform: translateX(0) translateY(100px);
  }

  .toast--visible { transform: translateX(0) translateY(0); }
}

/* ── Touch Device Optimizations ── */
@media (hover: none) {
  .product-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .product-card:hover .product-card__image img { transform: none; }
  .product-card__overlay { display: none; }
  .hover-zoom:hover img { transform: none; }
  .category-card:hover { transform: none; }
  .category-card:hover .category-card__bg img { transform: none; }
  .gallery__main { cursor: default; }
}

/* ── High Contrast / Accessibility ── */
@media (forced-colors: active) {
  .btn--accent,
  .btn--dark {
    border: 2px solid currentColor;
  }

  .origin-dot,
  .filter-btn__dot,
  .product-card__origin-dot,
  .product-card__origin-bar {
    forced-color-adjust: none;
  }
}

/* ── Print Styles ── */
@media print {
  .site-header,
  .site-footer,
  .scroll-progress,
  .footer__cta,
  .header__mobile-menu,
  .header__search-overlay,
  .toast,
  .filter-bar {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .page-content { padding-top: 0; }

  .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-init {
    opacity: 1;
    transform: none;
  }

  [data-reveal].revealed { transition-duration: 0.01ms; }
  .hover-zoom:hover img { transform: none; }
}
