:root {
  --brand-teal: #205c5a;
  --brand-teal-dark: #163f3d;
  --brand-teal-light: #6e9594;
  --brand-teal-soft: #e4ecea;
  --brand-cream: #f3ebdf;
  --brand-cream-soft: #f9f5ef;
  --brand-ink: #22312f;
  --brand-ink-muted: #5c6f6c;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: var(--brand-cream);
  color: var(--brand-ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .btn, .hero-title, .product-card-name {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
}

a {
  color: var(--brand-teal);
}

a:hover {
  color: var(--brand-teal-dark);
}

.btn {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.15s ease, box-shadow 0.2s ease;
  font-weight: 600;
  border-radius: 8px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn-dark, .btn-dark:hover, .btn-dark:focus, .btn-dark:active {
  background-color: var(--brand-teal);
  border-color: var(--brand-teal);
  color: #fff;
}

.btn-dark:hover {
  background-color: var(--brand-teal-dark);
  border-color: var(--brand-teal-dark);
  box-shadow: 0 6px 16px rgba(32, 92, 90, 0.25);
}

.btn-outline-dark {
  color: var(--brand-teal);
  border-color: var(--brand-teal);
}

.btn-outline-dark:hover, .btn-outline-dark:focus, .btn-outline-dark:active {
  background-color: var(--brand-teal);
  border-color: var(--brand-teal);
  color: #fff;
}

.bg-dark, .text-bg-dark {
  background-color: var(--brand-teal) !important;
}

.text-bg-dark {
  color: #fff !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(32, 92, 90, 0.45);
  border-color: var(--brand-teal);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Navbar */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: var(--brand-cream-soft) !important;
  border-bottom: none !important;
  box-shadow: 0 1px 0 rgba(32, 92, 90, 0.12);
}

.site-navbar .nav-link {
  color: var(--brand-ink);
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-navbar .nav-link:hover {
  color: var(--brand-teal);
}

.site-navbar .navbar-brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-teal);
  font-size: 1.15rem;
}

.footer-site {
  margin-top: 3rem;
  background-color: var(--brand-teal);
  color: rgba(255, 255, 255, 0.85);
  border-top: none !important;
}

.footer-site strong {
  color: #fff;
}

.footer-site a.text-muted {
  color: rgba(255, 255, 255, 0.75) !important;
  transition: color 0.15s ease;
}

.footer-site a.text-muted:hover {
  color: #fff !important;
}

/* Auth pages */
.auth-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  max-width: 380px;
  width: 100%;
  border: none;
  border-radius: 12px;
}

/* Hero */
.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 4.5rem 1rem 3.5rem;
  background: radial-gradient(ellipse at top, var(--brand-teal-soft) 0%, transparent 70%);
  border-radius: 16px;
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
}

.hero-section::before {
  top: -70px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: var(--brand-teal-soft);
  filter: blur(10px);
}

.hero-section::after {
  bottom: -90px;
  left: -50px;
  width: 220px;
  height: 220px;
  background: var(--brand-cream-soft);
  filter: blur(18px);
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--brand-teal-dark);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--brand-ink-muted);
  max-width: 540px;
  margin: 0 auto 1rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (min-width: 576px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(32, 92, 90, 0.14);
}

.product-card-image {
  aspect-ratio: 1 / 1;
  background-color: var(--brand-cream-soft);
  overflow: hidden;
}

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

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

.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--brand-cream) 0%, var(--brand-teal-soft) 100%);
  color: var(--brand-teal-dark);
  font-weight: 700;
}

.product-card-body {
  padding: 0.75rem 0.25rem 0;
}

.product-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-teal-light);
  font-weight: 600;
}

.product-card-name {
  font-weight: 600;
  margin: 0.15rem 0;
}

.product-card-price {
  color: var(--brand-ink-muted);
}

/* Category filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-filters .btn {
  border-radius: 999px;
}

/* Product gallery */
.product-gallery-main {
  aspect-ratio: 1 / 1;
  background-color: var(--brand-cream-soft);
  border-radius: 12px;
  overflow: hidden;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-placeholder {
  border-radius: 12px;
}

.product-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-gallery-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.product-gallery-thumb:hover {
  border-color: var(--brand-teal);
}

/* Cart */
.product-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background-color: var(--brand-cream-soft);
}

.empty-cart-icon {
  width: 64px;
  height: 64px;
  color: var(--brand-teal-light);
}

/* Scroll reveal (progressive enhancement — see the `js` class added by an inline
   script in <head>; without JS, content is just visible, never hidden) */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    transition: none;
  }
}

/* Quantity stepper */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--brand-teal);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.qty-stepper .qty-btn {
  background: var(--brand-cream-soft);
  border: none;
  color: var(--brand-teal);
  font-size: 1.1rem;
  line-height: 1;
  width: 36px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.qty-stepper .qty-btn:hover {
  background-color: var(--brand-teal-soft);
}

.qty-stepper .qty-input {
  width: 48px;
  border: none;
  border-left: 1px solid var(--brand-teal);
  border-right: 1px solid var(--brand-teal);
  text-align: center;
  -moz-appearance: textfield;
}

.qty-stepper .qty-input::-webkit-outer-spin-button,
.qty-stepper .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-stepper-sm .qty-btn {
  width: 30px;
  font-size: 1rem;
}

.qty-stepper-sm .qty-input {
  width: 40px;
}

/* Gallery crossfade */
#mainProductImage {
  transition: opacity 0.15s ease;
}

#mainProductImage.is-fading {
  opacity: 0;
}

/* Made-to-order pill */
.made-to-order-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--brand-teal-soft);
  color: var(--brand-teal-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.made-to-order-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background-color: var(--brand-teal);
}

/* Featured products carousel */
.featured-carousel .carousel-item {
  padding: 0.5rem 3rem;
}

.featured-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.featured-slide-image {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--brand-cream-soft);
  box-shadow: 0 16px 32px rgba(32, 92, 90, 0.14);
}

.featured-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-slide-caption {
  margin-top: 1rem;
}

.featured-carousel .carousel-control-prev,
.featured-carousel .carousel-control-next {
  width: 2.5rem;
}

.featured-carousel .carousel-control-prev-icon,
.featured-carousel .carousel-control-next-icon {
  background-color: var(--brand-teal);
  border-radius: 50%;
  padding: 1.1rem;
  background-size: 50%;
}

.featured-carousel .carousel-indicators [data-bs-target] {
  background-color: var(--brand-teal-light);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.featured-carousel .carousel-indicators .active {
  background-color: var(--brand-teal);
}

@media (max-width: 576px) {
  .featured-carousel .carousel-item {
    padding: 0.5rem 2.5rem;
  }
}

/* Toasts */
.toast-success {
  background-color: var(--brand-teal);
}

.toast-warning {
  background-color: #8a5a2b;
}

.toast-success .toast-body,
.toast-warning .toast-body {
  color: #fff;
}
