/* ================================================
   BRÛLÉ Specialty Coffee — app.css
   Bootstrap 5 + кастомная дизайн-система
   ================================================ */

/* ── Переменные ─────────────────────────────── */
:root {
  --accent:        #6f4e37;
  --accent-hover:  #5a3e2b;
  --accent-light:  #8b6347;
  --accent-bg:     #f5ede6;
  --accent-border: #d4b59a;

  --body-bg:       #ffffff;
  --card-bg:       #ffffff;
  --section-bg:    #f8f5f2;

  --text-primary:  #1a1008;
  --text-secondary:#5a4a3a;
  --text-muted:    #9a8878;

  --navbar-bg:     #1a0f00;
  --footer-bg:     #120a00;

  --border-color:  #e8e0d8;
  --shadow-sm:     0 1px 4px rgba(111,78,55,.08);
  --shadow-md:     0 4px 16px rgba(111,78,55,.12);
  --shadow-lg:     0 8px 32px rgba(111,78,55,.16);

  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;

  /* Bootstrap overrides */
  --bs-primary:          #6f4e37;
  --bs-primary-rgb:      111, 78, 55;
  --bs-link-color:       #6f4e37;
  --bs-link-hover-color: #5a3e2b;
  --bs-border-color:     #e8e0d8;
  --bs-body-font-family: var(--font-body);
  --bs-body-bg:          #ffffff;
  --bs-body-color:       #1a1008;
}

/* ── Base ───────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-primary);
  background: var(--body-bg);
}

/* Отступ снизу на мобильном для bottom nav */
@media (max-width: 991.98px) {
  body { padding-bottom: 66px; }
}

/* ── Typography ─────────────────────────────── */
h1, h2, h3, .font-display {
  font-family: var(--font-display);
  font-weight: 300;
}

.section-tag {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

/* ── Navbar ─────────────────────────────────── */
.navbar-main {
  background: var(--navbar-bg) !important;
  padding: .75rem 0;
}

.navbar-main .navbar-brand {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 300;
  letter-spacing: .04em;
  color: #f5ead8 !important;
}

.navbar-main .navbar-brand .dot {
  color: var(--accent-light);
}

.navbar-main .nav-link {
  color: rgba(245,234,216,.75) !important;
  font-size: .82rem;
  letter-spacing: .04em;
  padding: .4rem .75rem !important;
  transition: color .2s;
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
  color: #f5ead8 !important;
}

.navbar-main .nav-link.active {
  position: relative;
}

.navbar-main .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: .75rem; right: .75rem;
  height: 1px;
  background: var(--accent-light);
}

.navbar-toggler {
  border: 1px solid rgba(245,234,216,.2) !important;
  padding: .3rem .5rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28245,234,216,.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Lang switcher */
.lang-switcher .dropdown-toggle {
  background: transparent;
  border: 1px solid rgba(245,234,216,.25);
  color: rgba(245,234,216,.8);
  font-size: .72rem;
  letter-spacing: .1em;
  padding: .3rem .65rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
}

.lang-switcher .dropdown-toggle:hover {
  border-color: rgba(245,234,216,.5);
  color: #f5ead8;
}

.lang-switcher .dropdown-menu {
  min-width: 80px;
  background: #2a1800;
  border: 1px solid rgba(245,234,216,.1);
  border-radius: var(--radius-md);
  padding: .4rem;
}

.lang-switcher .dropdown-item {
  color: rgba(245,234,216,.7);
  font-size: .78rem;
  letter-spacing: .08em;
  border-radius: var(--radius-sm);
  padding: .35rem .7rem;
}

.lang-switcher .dropdown-item:hover {
  background: rgba(245,234,216,.1);
  color: #f5ead8;
}

/* Icon buttons in navbar */
.navbar-icon-btn {
  background: transparent;
  border: none;
  color: rgba(245,234,216,.7);
  padding: .4rem .5rem;
  border-radius: var(--radius-sm);
  transition: color .2s;
  display: inline-flex;
  align-items: center;
}

.navbar-icon-btn:hover { color: #f5ead8; }

/* Cart badge */
.cart-badge {
  background: var(--accent);
  color: #fff;
  font-size: .55rem;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ── Mobile bottom nav ──────────────────────── */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border-color);
  z-index: 1040;
  padding: .35rem 0 .5rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}

.mobile-bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: .2rem .5rem;
  color: #9a8878;
  text-decoration: none;
  font-size: .58rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color .2s;
  border: none;
  background: none;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
  color: var(--accent);
}

/* ── Buttons ─────────────────────────────────── */
.btn-accent,
.btn-outline-accent,
.hero-section .btn-outline-light {
  font-family: var(--font-body) !important;
  font-size: .88rem !important;
  font-weight: 400 !important;
  letter-spacing: .04em !important;
  border-radius: var(--radius-md) !important;
  padding: .7rem 1.6rem !important;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transition: background .2s, transform .15s, box-shadow .2s;
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-accent {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-size: .85rem;
  letter-spacing: .04em;
  border-radius: var(--radius-md);
  padding: .65rem 1.5rem;
  transition: all .2s;
}

.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Product card ───────────────────────────── */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  height: 100%;
}

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

.product-card .card-img-wrap {
  overflow: hidden;
  background: #faf7f4;
  aspect-ratio: 1 / 1;
}

.product-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.product-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.product-card .card-body {
  padding: 1rem 1.1rem 1.1rem;
}

.product-card .card-origin {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .25rem;
}

.product-card .card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: .35rem;
  line-height: 1.25;
}

.product-card .card-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: .75rem;
}

.product-card .card-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: .8rem;
}

.note-chip {
  font-size: .65rem;
  padding: 2px 9px;
  border-radius: 12px;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  letter-spacing: .03em;
}

.product-card .card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--border-color);
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-primary);
}

.product-price .price-per {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 300;
}

.product-price .price-old {
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-family: var(--font-body);
}

/* Badge */
.product-badge {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 10px;
}

.badge-new  { background: #e8f5e9; color: #2e7d32; }
.badge-hot  { background: #fff3e0; color: #e65100; }
.badge-sale { background: #fce4ec; color: #c62828; }

/* ── Category card ──────────────────────────── */
.category-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  background: var(--card-bg);
}

.category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.category-card .cat-img {
  height: 160px;
  overflow: hidden;
  background: #faf7f4;
}

.category-card .cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

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

.category-card .cat-body {
  padding: .9rem 1rem;
}

.category-card .cat-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: .15rem;
}

.category-card .cat-count {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── Hero section ───────────────────────────── */
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--navbar-bg);
  overflow: hidden;
}

.hero-section .hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: .35;
}

.hero-section .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(26,15,0,.85) 0%,
    rgba(26,15,0,.6) 50%,
    rgba(26,15,0,.3) 100%
  );
}

.hero-section .hero-content {
  position: relative;
  z-index: 2;
  color: #f5ead8;
}

.hero-eyebrow {
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent-light);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: #f5ead8;
  margin-bottom: 1.25rem;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-light);
}

.hero-desc {
  font-size: 1rem;
  color: rgba(245,234,216,.72);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 2rem;
}

/* ── Stats strip ────────────────────────────── */
.stats-strip {
  background: var(--accent);
  padding: 1.25rem 0;
}

.stats-strip .stat-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: #fff;
  line-height: 1;
}

.stats-strip .stat-label {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  margin-top: 3px;
}

/* ── Origin section ─────────────────────────── */
.origin-section {
  background: var(--section-bg);
}

/* ── Subscribe section ──────────────────────── */
.subscribe-section {
  background: var(--navbar-bg);
  color: #f5ead8;
}

/* ── Footer ─────────────────────────────────── */
footer {
  background: var(--footer-bg);
}

/* ── Forms ──────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(111,78,55,.15);
}

/* ── Utilities ──────────────────────────────── */
.text-accent   { color: var(--accent) !important; }
.bg-accent     { background: var(--accent) !important; }
.border-accent { border-color: var(--accent) !important; }
.bg-section    { background: var(--section-bg) !important; }

.divider-accent {
  border: none;
  height: 1px;
  background: var(--border-color);
}

/* ── Search modal ───────────────────────────── */
#searchModal .modal-content {
  border-radius: var(--radius-xl);
  border: none;
}

/* ── Roast dots ─────────────────────────────── */
.roast-dots { display: flex; gap: 4px; align-items: center; }
.roast-dot  {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-color);
}
.roast-dot.filled { background: var(--accent); }

/* ── Animations ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ── Hero secondary button fix ──────────────── */
.hero-section .btn-outline-light {
  border-color: rgba(245,234,216,.45) !important;
  color: #f5ead8 !important;
  background: transparent !important;
}
.hero-section .btn-outline-light:hover,
.hero-section .btn-outline-light:focus,
.hero-section .btn-outline-light:active {
  background: rgba(245,234,216,.12) !important;
  border-color: rgba(245,234,216,.7) !important;
  color: #f5ead8 !important;
  box-shadow: none !important;
}
/* Fix: fade-up inside tab-pane */
.tab-pane .fade-up {
  opacity: 1 !important;
  transform: none !important;
}

/* Mobile tab pills — one row */
@media (max-width: 767px) {
  .nav-link-tab {
    font-size: .72rem !important;
    padding: .4rem .5rem !important;
    justify-content: center;
  }
  .nav-link-tab svg { display: none; }
}

/* Fix mobile overflow */
body { overflow-x: hidden; }
.step-item { padding: .6rem 0; }
.step-label { font-size: .62rem; }
.step-line { width: 20px; margin: 0 .25rem; }
@media (max-width: 576px) {
  .step-label { display: none; }
  .step-line { width: 16px; }
}

/* Steps bar fix mobile */
.step-item {
  display: flex;
  align-items: center;
  padding: .75rem 0;
  white-space: nowrap;
}
.step-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.step-label {
  margin-left: .4rem;
  margin-right: 0;
}
.step-line {
  width: 24px;
  margin: 0 .3rem;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .step-label { display: none; }
  .step-line  { width: 14px; margin: 0 .2rem; }
  .step-num   { width: 24px; height: 24px; font-size: .7rem; }
}
