:root {
  --bg-color: #f7f3ec;
  --card-bg: rgba(255, 255, 255, 0.9);
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --accent-color: #c99a2e; /* Soft gold */
  --accent-hover: #b6851f;
  --success-color: #1f8f5f;
  --danger-color: #c2413f;
  --border-color: rgba(201, 154, 46, 0.2);
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: rgba(0, 0, 0, 0.08);
  --input-text: #1f2937;
  --muted-bg: rgba(201, 154, 46, 0.08);
  --font-family: "Outfit", sans-serif;
  --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.dark {
  --bg-color: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.9);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --accent-color: #c99a2e;
  --accent-hover: #b6851f;
  --success-color: #22c55e;
  --danger-color: #ef4444;
  --border-color: rgba(148, 163, 184, 0.18);
  --input-bg: #1e293b;
  --input-border: rgba(148, 163, 184, 0.25);
  --input-text: #f8fafc;
  --muted-bg: rgba(201, 154, 46, 0.15);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 10% 20%, rgba(201, 154, 46, 0.08), transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(201, 154, 46, 0.06), transparent 22%),
    radial-gradient(circle at 50% 90%, rgba(201, 154, 46, 0.04), transparent 30%);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Header */
.main-header {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(120deg, #d8b455, #c99a2e, #b37e1d);
  -webkit-background-clip: text;
  color: transparent;
}

.icon-btn {
  background: var(--muted-bg);
  color: var(--text-primary);
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: rgba(201, 154, 46, 0.18);
}

/* Explicit dark theme header/buttons to avoid fallback to light tones */
body.dark .main-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

body.dark .icon-btn {
  background: var(--muted-bg);
  color: var(--text-primary);
}

body.dark .icon-btn:hover {
  background: rgba(201, 154, 46, 0.18);
}

/* Layout */
#main-content {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 80vh;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.floating-wa {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(18, 140, 126, 0.35);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.floating-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(18, 140, 126, 0.45);
  filter: drop-shadow(0 0 6px rgba(37, 211, 102, 0.35));
}

.floating-wa:active {
  transform: translateY(0);
}

.floating-wa__icon {
  background: rgba(255, 255, 255, 0.18);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.admin-mode {
  background: var(--bg-color);
  color: var(--text-primary);
}

.admin-mode .main-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.admin-mode .icon-btn {
  background: var(--muted-bg);
  color: var(--text-primary);
}

.admin-mode .icon-btn:hover {
  background: rgba(201, 154, 46, 0.18);
}
/* Subtle shimmer and motion for interactive elements */
@media (prefers-reduced-motion: no-preference) {
  .product-card,
  .btn-primary,
  .floating-wa {
    will-change: transform, box-shadow;
  }

  .product-card {
    position: relative;
  }

  .product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      120deg,
      transparent 0%,
      rgba(201, 154, 46, 0.05) 50%,
      transparent 100%
    );
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
  }

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

/* Utilities */
.hidden {
  display: none !important;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s ease, box-shadow 0.2s ease;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 20px rgba(201, 154, 46, 0.18);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(201, 154, 46, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(201, 154, 46, 0.18);
}

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

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

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
}

.product-card:active {
  transform: scale(0.98);
}

.product-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: var(--muted-bg);
}

.product-info {
  padding: 0.75rem;
}

.product-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  color: var(--accent-color);
  font-weight: 700;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  border-radius: 1rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  background: rgba(0, 0, 0, 0.08);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
