/* Bagecha.in - Custom Styles */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
.font-display { font-family: 'Playfair Display', Georgia, serif; }

h1, h2, h3, .heading { font-family: 'Playfair Display', Georgia, serif; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f5f1e8; }
::-webkit-scrollbar-thumb { background: #8abf69; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #1f5f3b; }

/* ── Selection ── */
::selection { background: #8abf69; color: #fff; }

/* ── Brand Colors ── */
:root {
  --color-forest:    #1f5f3b;
  --color-green:     #8abf69;
  --color-beige:     #f5f1e8;
  --color-terra:     #c96c4a;
  --color-dark:      #1a1a1a;
  --color-gray:      #6b7280;
  --shadow-soft:     0 4px 24px rgba(31,95,59,0.08);
  --shadow-card:     0 2px 16px rgba(0,0,0,0.06);
  --radius-card:     1rem;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--color-forest); color: #fff;
  padding: 0.75rem 1.75rem; border-radius: 0.75rem;
  font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: none; cursor: pointer; text-decoration: none;
}
.btn-primary:hover { background: #174d2f; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(31,95,59,0.25); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: transparent; color: var(--color-forest);
  padding: 0.75rem 1.75rem; border-radius: 0.75rem;
  font-weight: 600; font-size: 0.9375rem;
  border: 2px solid var(--color-forest);
  transition: all 0.2s; cursor: pointer; text-decoration: none;
}
.btn-secondary:hover { background: var(--color-forest); color: #fff; }

.btn-terra {
  background: var(--color-terra); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.75rem; border-radius: 0.75rem;
  font-weight: 600; border: none; cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-terra:hover { background: #b05c3a; transform: translateY(-1px); }

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }

/* ── Product Card ── */
.product-card { position: relative; }
.product-card .overlay-actions { opacity: 0; transition: opacity 0.25s; }
.product-card:hover .overlay-actions { opacity: 1; }
.product-card .card-img { transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94); }
.product-card:hover .card-img { transform: scale(1.04); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-sale { background: #fee2e2; color: #dc2626; }
.badge-new { background: #d1fae5; color: #065f46; }
.badge-bestseller { background: #fef3c7; color: #92400e; }
.badge-out { background: #f3f4f6; color: #6b7280; }

/* ── Section Titles ── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600; color: var(--color-dark); line-height: 1.25;
}
.section-subtitle {
  color: var(--color-gray); font-size: 1rem; margin-top: 0.5rem;
}

/* ── Hero ── */
.hero-gradient {
  background: linear-gradient(135deg, #e8f5e2 0%, #f5f1e8 50%, #fef9f4 100%);
}

/* ── Category Grid ── */
.category-chip {
  background: var(--color-beige);
  border-radius: 1rem; padding: 1.25rem;
  text-align: center; transition: all 0.25s;
  text-decoration: none; display: block;
}
.category-chip:hover { background: var(--color-forest); color: #fff; transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.category-chip:hover .category-icon { filter: brightness(10); }

/* ── Forms ── */
.form-input {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid #e5e7eb; border-radius: 0.75rem;
  font-size: 0.9375rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none; background: #fff;
}
.form-input:focus { border-color: var(--color-green); box-shadow: 0 0 0 3px rgba(138,191,105,0.15); }
.form-input::placeholder { color: #9ca3af; }

.form-label { font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 0.375rem; display: block; }

.form-error { font-size: 0.8125rem; color: #dc2626; margin-top: 0.25rem; }

/* ── Qty Stepper ── */
.qty-stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid #e5e7eb; border-radius: 0.75rem; overflow: hidden;
}
.qty-stepper button {
  width: 2.5rem; height: 2.5rem; border: none; background: #f9fafb;
  font-size: 1.1rem; cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.qty-stepper button:hover { background: #f0fdf4; }
.qty-stepper input {
  width: 3.5rem; text-align: center; border: none; outline: none;
  font-size: 1rem; font-weight: 600; font-family: inherit;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-inner-spin-button,
.qty-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Rating Stars ── */
.stars { color: #fbbf24; letter-spacing: 1px; }
.stars-empty { color: #d1d5db; }

/* ── Toast ── */
#bagecha-toast { opacity: 0; }

/* ── Tab ── */
.tab-btn { padding: 0.75rem 1.5rem; font-weight: 600; font-size: 0.9375rem; border-bottom: 2.5px solid transparent; color: #6b7280; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { color: var(--color-forest); border-bottom-color: var(--color-forest); }
.tab-btn:hover:not(.active) { color: #374151; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Cart ── */
.cart-item { border-bottom: 1px solid #f3f4f6; padding-bottom: 1.25rem; margin-bottom: 1.25rem; }
.cart-item:last-child { border-bottom: none; margin-bottom: 0; }

/* ── Breadcrumb ── */
.breadcrumb-item + .breadcrumb-item::before { content: '/'; margin: 0 0.5rem; color: #d1d5db; }

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 0.5rem;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Sticky Bottom Nav (Mobile) ── */
.mobile-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: #fff; border-top: 1px solid #f0f0f0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.6rem 0.25rem; gap: 0.2rem; color: #9ca3af;
  font-size: 0.65rem; font-weight: 500; text-decoration: none;
  transition: color 0.15s;
}
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--color-forest); }
.mobile-nav-item svg { width: 1.375rem; height: 1.375rem; }

/* ── Admin Sidebar ── */
.admin-sidebar { width: 16rem; min-height: 100vh; background: var(--color-forest); }
.admin-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.25rem; color: rgba(255,255,255,0.75);
  font-size: 0.875rem; font-weight: 500; text-decoration: none;
  border-radius: 0.625rem; margin: 0.125rem 0.5rem;
  transition: all 0.15s;
}
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-nav-item svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }

/* ── Stat Card ── */
.stat-card { background: #fff; border-radius: 0.875rem; padding: 1.5rem; box-shadow: var(--shadow-card); }
.stat-card .stat-icon {
  width: 3rem; height: 3rem; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; color: var(--color-dark); }
.stat-card .stat-label { font-size: 0.875rem; color: var(--color-gray); margin-top: 0.25rem; }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 0.75rem 1rem; background: #f9fafb; text-align: left; font-size: 0.8125rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e5e7eb; }
.data-table td { padding: 0.875rem 1rem; font-size: 0.9375rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* ── Order Status ── */
.status-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.status-pending    { background: #fef3c7; color: #92400e; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-shipped    { background: #ede9fe; color: #5b21b6; }
.status-delivered  { background: #d1fae5; color: #065f46; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }

/* ── Blog Card ── */
.blog-card img { transition: transform 0.4s; }
.blog-card:hover img { transform: scale(1.04); }

/* ── Progress Bar ── */
.progress-bar { height: 6px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--color-green); border-radius: 999px; transition: width 0.6s cubic-bezier(0.25,0.46,0.45,0.94); }

/* ── WhatsApp Button ── */
.whatsapp-btn {
  position: fixed; bottom: 5.5rem; right: 1.25rem; z-index: 40;
  width: 3.25rem; height: 3.25rem; background: #25d366;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.whatsapp-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,0.5); }

@media (min-width: 768px) {
  .whatsapp-btn { bottom: 1.5rem; }
  .mobile-bottom-nav { display: none; }
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fade-up { animation: fadeInUp 0.5s ease both; }
.animate-fade    { animation: fadeIn  0.4s ease both; }

/* ── Utility ── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aspect-square { aspect-ratio: 1/1; }
.aspect-3-4    { aspect-ratio: 3/4; }

/* ── Divider ── */
.divider { height: 1px; background: linear-gradient(to right, transparent, #e5e7eb, transparent); margin: 2rem 0; }

/* ── Print ── */
@media print {
  .no-print { display: none !important; }
  body { font-size: 12pt; }
}
