/* ── Base ──────────────────────────────────────────────────────── */
[x-cloak] { display: none !important; }
* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
}

/* ── ADMIN BODY overrides (dark theme kept for admin) ─────────── */
.admin-body {
  background-color: #0a0a0a !important;
  color: #ffffff !important;
}

/* ── Navigation (frontend light) ──────────────────────────────── */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.6rem;
  color: #1a1a1a;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.15s;
}
.nav-link:hover,
.nav-link.active {
  color: #DA3F3F;
}

/* Dropdown */
.dropdown-menu {
  display: none;
  max-height: 70vh;
  overflow-y: auto;
}
.group:hover .dropdown-menu {
  display: block;
}
.dropdown-item {
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  color: #333333;
  letter-spacing: 0.03em;
  transition: color 0.15s, background 0.15s;
}
.dropdown-item:hover {
  color: #DA3F3F;
  background: #f5f5f5;
}

/* ── Buttons (frontend) ───────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  background: #DA3F3F;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0.25rem;
  transition: background 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
}
.btn-primary:hover {
  background: #c03535;
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  background: transparent;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0.25rem;
  border: 1.5px solid #cccccc;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.btn-secondary:hover {
  border-color: #DA3F3F;
  color: #DA3F3F;
}

.btn-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  background: #e0e0e0;
  color: #999999;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0.25rem;
  border: none;
  cursor: not-allowed;
  width: 100%;
}

/* ── Product card ─────────────────────────────────────────────── */
.product-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 0.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.product-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  border-color: #DA3F3F;
}
.product-card-img {
  aspect-ratio: 1/1;
  background: #f9f9f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .product-card-img img {
  transform: scale(1.04);
}
.product-card-body {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}
.product-card-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: #DA3F3F;
}
.product-card-btn {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  background: #DA3F3F;
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0.2rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: auto;
}
.product-card-btn:hover { background: #c03535; }

/* ── Variation buttons (product page) ────────────────────────── */
.variation-btn {
  padding: 0.45rem 1.1rem;
  border: 1.5px solid #cccccc;
  border-radius: 0.25rem;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 2.75rem;
  text-align: center;
}
.variation-btn:hover {
  border-color: #DA3F3F;
  color: #DA3F3F;
}
.variation-btn.variation-btn-active,
.variation-btn-active {
  border: 2px solid #DA3F3F !important;
  background: #DA3F3F !important;
  color: #ffffff !important;
  font-weight: 700;
}

/* ── Category pills ───────────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 0.35rem 0.875rem;
  border: 1px solid #dddddd;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #666666;
  transition: border-color 0.15s, color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pill:hover, .pill-active {
  border-color: #DA3F3F;
  color: #DA3F3F;
}

/* ── Section title ────────────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}
.section-title::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: #DA3F3F;
  margin: 0.5rem auto 0;
}
.section-title.text-left::after {
  margin-left: 0;
}

/* ── Forms (frontend light) ───────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555555;
  margin-bottom: 0.375rem;
}
.form-input {
  display: block;
  width: 100%;
  padding: 0.6rem 0.875rem;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 0.375rem;
  color: #1a1a1a;
  font-size: 0.875rem;
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus { border-color: #DA3F3F; }
.form-input::placeholder { color: #aaaaaa; }

/* ── Admin dark overrides for form-input ─────────────────────── */
.admin-body .form-input {
  background: #141414 !important;
  border-color: #2a2a2a !important;
  color: #ffffff !important;
}
.admin-body .form-input:focus { border-color: #DA3F3F !important; }
.admin-body .form-input::placeholder { color: #505050 !important; }
.admin-body .form-label { color: #a0a0a0 !important; }
.admin-body .btn-primary { width: auto; }
.admin-body .btn-secondary { color: #a0a0a0; border-color: #3a3a3a; background: transparent; }
.admin-body .btn-secondary:hover { color: #DA3F3F; border-color: #DA3F3F; }

/* ── Product description HTML ─────────────────────────────────── */
.product-description p { margin-bottom: 0.75rem; color: #444; }
.product-description ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.75rem; }
.product-description li { margin-bottom: 0.25rem; color: #444; }

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #cccccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #DA3F3F; }

.admin-body::-webkit-scrollbar-track { background: #0a0a0a; }
.admin-body::-webkit-scrollbar-thumb { background: #2a2a2a; }

/* ── line-clamp ───────────────────────────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Admin-specific (unchanged) ───────────────────────────────── */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #a0a0a0;
  font-size: 0.8125rem;
  transition: color 0.15s, background 0.15s;
}
.sidebar-link:hover { color: #ffffff; background: rgba(255,255,255,0.05); }
.sidebar-active { color: #ffffff !important; background: rgba(218,63,63,0.15) !important; }

.admin-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.admin-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #707070;
  border-bottom: 1px solid #2a2a2a;
}
.admin-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #1c1c1c;
  color: #a0a0a0;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-green  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.badge-gray   { background: rgba(113,113,122,0.15); color: #a1a1aa; }
.badge-yellow { background: rgba(234,179,8,0.15);   color: #facc15; }
.badge-red    { background: rgba(239,68,68,0.15);   color: #f87171; }

.text-muted { color: #707070; }

/* ── Product column (flex-wrap grid, centers last-row items) ──── */
.product-col {
  flex: 0 0 calc(50% - 0.5rem);
  max-width: 280px;
  min-width: 150px;
}
.product-col .product-card { height: 100%; }
@media (min-width: 640px) {
  .product-col { flex-basis: calc(33.333% - 0.667rem); }
}
@media (min-width: 1024px) {
  .product-col { flex-basis: calc(25% - 0.75rem); }
}
@media (min-width: 1280px) {
  .product-col { flex-basis: calc(20% - 0.8rem); }
}

/* ── Newsletter modal ─────────────────────────────────────────── */
.newsletter-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}
.newsletter-modal.open { display: flex; }
