/* =========================================================
   Design Tokens — single source of truth
   ========================================================= */
:root {
  --c-bg:           #f7f7f7;
  --c-surface:      #ffffff;
  --c-text:         #1f2937;
  --c-text-soft:    #6b7280;
  --c-text-faint:   #9ca3af;
  --c-border:       #e5e7eb;
  --c-border-strong:#d1d5db;
  --c-dark:         #111827;
  --c-dark-soft:    #1f2937;
  --c-accent:       #ef4444;
  --c-success:      #10b981;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --sh-1: 0 1px 2px rgba(17,24,39,.04);
  --sh-2: 0 4px 12px rgba(17,24,39,.06);
  --sh-3: 0 10px 30px rgba(17,24,39,.08);
  --sh-4: 0 20px 45px rgba(17,24,39,.12);

  --ease: cubic-bezier(.2,.7,.2,1);
  --dur:  .25s;
}

/* =========================================================
   Base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--c-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: var(--c-dark);
  color: #fff;
  padding: clamp(60px, 8vw, 100px) 0;
  overflow: hidden;
  isolation: isolate;
}

/* Soft radial glow for depth */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle at center,
    rgba(255,255,255,.08), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.hero h1,
.hero .display-5 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: .75rem;
}

.hero p.lead {
  color: rgba(255,255,255,.75);
  max-width: 60ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.hero .btn {
  border-radius: 999px;
  padding: .75rem 1.5rem;
  font-weight: 600;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
}

/* =========================================================
   Product Card
   ========================================================= */
.product-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-3);
  border-color: transparent;
}

.product-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.product-card:hover img {
  transform: scale(1.05);
}

/* Inner content spacing */
.product-card .card-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
}

.product-card .card-title,
.product-card h5,
.product-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-text {
  color: var(--c-text-soft);
  font-size: .875rem;
}

/* =========================================================
   Pricing
   ========================================================= */
.price-old {
  text-decoration: line-through;
  color: var(--c-text-faint);
  font-size: .9rem;
}

.price-new,
.product-card .fw-bold {
  color: var(--c-accent);
  font-weight: 700;
  font-size: 1.1rem;
}

/* =========================================================
   Product Gallery (detail page)
   ========================================================= */
.gallery-main {
  width: 100%;
  height: 480px;
  object-fit: contain;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1rem;
  transition: box-shadow var(--dur) var(--ease);
}
.gallery-main:hover { box-shadow: var(--sh-2); }

.thumb {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.thumb:hover {
  transform: translateY(-2px);
  border-color: var(--c-dark);
}
.thumb.is-active,
.thumb.active {
  border-color: var(--c-dark);
  box-shadow: 0 0 0 2px rgba(17,24,39,.15);
}

/* =========================================================
   Admin Stat Cards
   ========================================================= */
.admin-stat {
  background: var(--c-surface);
  padding: 20px 22px;
  border-radius: var(--r-md);
  border-left: 4px solid var(--c-dark-soft);
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.admin-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.admin-stat h3,
.admin-stat .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}
.admin-stat p,
.admin-stat .stat-label {
  color: var(--c-text-soft);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 .35rem;
}

/* =========================================================
   Slider (full-bleed carousel)
   ========================================================= */
.slider-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  filter: brightness(.72) saturate(1.05);
  transition: transform 8s var(--ease);
}
.carousel-item.active .slider-img {
  transform: scale(1.05); /* subtle Ken Burns */
}

/* Optional: carousel caption polish */
.carousel-caption {
  bottom: 20%;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.carousel-caption h2 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.carousel-indicators [data-bs-target] {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  border: 0;
  transition: background var(--dur) var(--ease),
              width var(--dur) var(--ease);
}
.carousel-indicators .active {
  background: #fff;
  width: 44px;
}

/* =========================================================
   Utilities
   ========================================================= */
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
  .hero          { padding: 55px 0; }
  .slider-img    { height: 360px; }
  .gallery-main  { height: 320px; padding: .5rem; }
  .product-card img { height: 200px; }
  .carousel-caption { bottom: 12%; }
  .carousel-caption h2 { font-size: 1.5rem; }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}