/* =====================================================================
   Riaura Jewellery — Global Stylesheet
   Theme: demi-fine luxury (blush + rose gold)
   ===================================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --bg: #FDF0EE;            /* soft blush background           */
  --bg-soft: #FFF7F5;       /* slightly lighter blush          */
  --surface: #FFFFFF;       /* card / panel surface            */
  --primary: #C4856A;       /* rose gold accent                */
  --primary-hover: #B07060; /* deeper rose gold                */
  --text: #7A4F42;          /* warm dark rose                  */
  --text-soft: #A57C70;     /* muted rose                      */
  --border: #EBD7D1;        /* subtle pinkish border           */
  --danger: #C0392B;
  --success: #6E9F76;

  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 14px rgba(196, 133, 106, 0.10);
  --shadow-md: 0 10px 30px rgba(196, 133, 106, 0.15);

  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Lato', system-ui, -apple-system, sans-serif;

  --max-width: 1200px;
}

/* ---------- RESET / BASE ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.4em;
  letter-spacing: 0.5px;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.4rem; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #962F22; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-block { width: 100%; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* =====================================================================
   NAVBAR
   ===================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 240, 238, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}
.navbar.is-scrolled {
  box-shadow: 0 4px 20px rgba(196, 133, 106, 0.10);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 2rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}
.brand-logo--lg { height: 130px; }
.brand-logo--md { height: 56px; }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

.cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  transition: background 0.2s ease;
}
.cart-toggle:hover { background: rgba(196, 133, 106, 0.12); }
.cart-icon { font-size: 1.2rem; }

.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-badge.is-visible { transform: scale(1); }

/* mobile menu hamburger (simple reveal) */
.nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text);
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  text-align: center;
  padding: 7rem 1.5rem 6rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}
.hero h1 {
  margin-bottom: 1rem;
  line-height: 1.05;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-soft);
  max-width: 540px;
  margin: 0 auto 2rem;
}

/* =====================================================================
   SHOP / CONTROLS
   ===================================================================== */
.section-head {
  text-align: center;
  margin-bottom: 3rem;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.shop-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* ---------- SEARCH BAR ---------- */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.5rem 0.15rem 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 133, 106, 0.15);
}
.search-bar-icon {
  font-size: 0.95rem;
  margin-right: 0.5rem;
  opacity: 0.55;
  pointer-events: none;
}
.search-bar-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0.7rem 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  min-width: 0;
}
.search-bar-input::placeholder { color: var(--text-soft); }
/* Hide the native ❌ on type=search */
.search-bar-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-bar-clear {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.search-bar-clear:hover {
  background: var(--bg);
  color: var(--text);
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-tab {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.sort-select {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--primary); }

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

.product-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-soft);
}
.product-info {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.category-pill {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-soft);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}
.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}
.product-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stock-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(122, 79, 66, 0.9);
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  z-index: 2;
}

/* Low-stock variant — bright urgency pill */
.stock-badge--low {
  background: #C0392B;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: none;
  letter-spacing: 0.3px;
  font-size: 0.72rem;
  max-width: calc(100% - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: stock-low-pulse 1.6s ease-in-out infinite;
}
.stock-badge--low::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}
@keyframes stock-low-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(192, 57, 43, 0); }
}

/* Urgency line on the product detail page */
.detail-urgency {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #FDECE9;
  color: #C0392B;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  margin: 0.5rem 0 1rem;
  border: 1px solid rgba(192, 57, 43, 0.18);
}
.detail-urgency-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #C0392B;
  animation: stock-low-pulse 1.4s ease-in-out infinite;
}

/* ---------- SKELETON LOADER ---------- */
.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.skeleton {
  background: linear-gradient(90deg, #F5E1DB 0%, #FBEFEB 50%, #F5E1DB 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
.skeleton-img { aspect-ratio: 1 / 1; border-radius: 0; }
.skeleton-line {
  height: 14px;
  margin: 0.6rem 1.25rem;
}
.skeleton-line.short { width: 50%; }
.skeleton-line.title { height: 22px; margin-top: 1.25rem; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-soft);
}
.empty-state h3 { color: var(--text); }

/* =====================================================================
   CART SIDEBAR
   ===================================================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(122, 79, 66, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 90;
}
.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--surface);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
}
.cart-sidebar.is-open { transform: translateX(0); }

.cart-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 {
  margin: 0;
  font-size: 1.5rem;
}
.cart-close {
  font-size: 1.5rem;
  color: var(--text);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease;
}
.cart-close:hover { background: var(--bg); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-soft);
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: var(--text);
}
.cart-item-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.qty-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty-btn {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text);
  transition: background 0.2s ease;
}
.qty-btn:hover { background: var(--bg); }
.qty-value {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.cart-item-remove {
  margin-left: auto;
  color: var(--text-soft);
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
}
.cart-item-remove:hover { color: var(--danger); }

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.cart-subtotal-amount {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.4rem;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  background: var(--text);
  color: #FBEDE7;
  padding: 3rem 0 2rem;
  text-align: center;
}
.footer .brand { color: #FBEDE7; }
.footer p { margin: 0.5rem 0; font-size: 0.95rem; }
.footer .tagline { color: #E5C9C0; font-style: italic; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 1rem;
  list-style: none;
  padding: 0;
}
.footer-links a {
  color: #FBEDE7;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  font-size: 0.8rem;
  color: #D9B5AB;
  margin-top: 1rem;
}

/* =====================================================================
   ABOUT / CONTACT (light static sections on index.html)
   ===================================================================== */
.about, .contact {
  background: var(--bg-soft);
}
.about .container, .contact .container { max-width: 760px; text-align: center; }
.about p, .contact p { font-size: 1.05rem; color: var(--text-soft); }

/* =====================================================================
   TOAST
   ===================================================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 200;
}
.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =====================================================================
   ADMIN  (admin.html + admin-login.html)
   ===================================================================== */

/* ---- Admin login page ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, #FAE0D9 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, #F8D5CB 0%, transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.auth-card .brand {
  display: block;
  font-size: 2.3rem;
  margin-bottom: 0.25rem;
}
.auth-card .auth-sub {
  color: var(--text-soft);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.auth-card form { text-align: left; }

/* ---- Form fields (shared with admin) ---- */
.field {
  margin-bottom: 1.1rem;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
  letter-spacing: 0.3px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 133, 106, 0.15);
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}
.checkbox-field input { width: auto; }
.checkbox-field label { margin: 0; }

.form-error {
  background: #FCE9E5;
  color: var(--danger);
  border: 1px solid #F5C6BB;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}
.form-error.is-visible { display: block; }

/* ---- Admin layout ---- */
.admin-header {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}
.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header .brand { font-size: 1.7rem; }

.admin-main {
  padding: 2.5rem 0 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.stat-label {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}
.stat-value {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 2.3rem;
  color: var(--primary);
  font-weight: 500;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.admin-panel {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.admin-panel h3 { margin-bottom: 1.25rem; }

.image-preview {
  margin-top: 0.5rem;
  width: 100%;
  max-height: 180px;
  border-radius: 10px;
  object-fit: cover;
  display: none;
  border: 1px solid var(--border);
}
.image-preview.is-visible { display: block; }

/* ---- Admin product table ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}
thead tr {
  background: var(--bg);
  text-align: left;
}
th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 700;
}
tbody tr:hover { background: var(--bg-soft); }
tbody tr.is-editing:hover { background: transparent; }

/* ---------- INLINE EDIT FORM (admin product table) ---------- */
.edit-cell {
  padding: 1.25rem !important;
  background: var(--bg-soft);
}
.edit-form {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  align-items: start;
}
.edit-form-thumb {
  text-align: center;
}
.edit-form-thumb .table-img {
  width: 110px;
  height: 110px;
  margin: 0 auto 0.5rem;
}
.edit-form-thumb small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-soft);
  line-height: 1.35;
}
.edit-form-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.edit-form-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr auto;
  gap: 0.85rem;
  align-items: end;
}
.edit-form-fields .field { margin: 0; }
.edit-form-fields .field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}
.edit-form-fields .field--stock {
  min-width: 70px;
}
.edit-form-fields textarea.cell-input {
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
}
.edit-form-fields .field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.edit-form-fields .field-label-row label {
  margin-bottom: 0;
}
.edit-form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .edit-form {
    grid-template-columns: 1fr;
  }
  .edit-form-thumb {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
  }
  .edit-form-thumb .table-img {
    width: 64px; height: 64px; margin: 0;
  }
  .edit-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .edit-form-grid .field:first-child { grid-column: 1 / -1; }
}

.table-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-soft);
}

/* in-table inline inputs (for editing) */
.cell-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0; height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #DDC4BC;
  border-radius: 999px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Larger variant for prominent toggles (e.g. coming-soon mode) */
.toggle-switch--lg { width: 60px; height: 32px; }
.toggle-switch--lg .toggle-slider::before {
  height: 26px; width: 26px;
  left: 3px; top: 3px;
}
.toggle-switch--lg input:checked + .toggle-slider::before {
  transform: translateX(28px);
}

/* ---------- ANNOUNCEMENT BAR (customer-facing top bar) ---------- */
.announcement-bar {
  background: #1f1a18;
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 0.55rem 1rem;
  position: relative;
  z-index: 60;
  font-family: var(--font-body);
  min-height: 36px;
}
.announcement-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  max-width: 100%;
}
.announcement-text {
  font-weight: 600;
  letter-spacing: 0.4px;
}
.announcement-divider {
  opacity: 0.4;
  font-weight: 300;
}
.announcement-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.announcement-timer-label {
  opacity: 0.75;
  font-weight: 400;
}
.announcement-countdown {
  background: #C0392B;
  color: #fff;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  animation: announcement-pulse 1s ease-in-out infinite;
}
@keyframes announcement-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(192, 57, 43, 0); }
}
.announcement-dots {
  display: inline-flex;
  gap: 0.25rem;
  margin-right: 0.35rem;
}
.announcement-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.3s ease, transform 0.3s ease;
}
.announcement-dot.is-active {
  background: var(--primary);
  transform: scale(1.3);
}
.announcement-bar.is-fading .announcement-inner {
  animation: announcement-fade 0.45s ease both;
}
@keyframes announcement-fade {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .announcement-bar {
    font-size: 0.74rem;
    padding: 0.5rem 0.75rem;
  }
  .announcement-countdown { font-size: 0.72rem; padding: 0.15rem 0.45rem; }
}

/* ---------- OFFERS PANEL (admin) ---------- */
.offer-form {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.offer-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.offer-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.offer-form-actions .checkbox-field { margin-right: auto; }

.offer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.offer-empty {
  list-style: none;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.9rem;
  padding: 1.5rem;
  background: var(--bg-soft);
  border-radius: var(--radius-card);
  border: 1px dashed var(--border);
}
.offer-li {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 0.85rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.offer-li.is-active {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(196, 133, 106, 0.12);
}
.offer-li-info {
  flex: 1;
  min-width: 0;
}
.offer-li-text {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.offer-li-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}
.offer-li-dates { font-size: 0.78rem; }
.offer-li-actions {
  display: flex;
  gap: 0.4rem;
}

.offer-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.offer-badge--live      { background: #E6F0E8; color: var(--success); }
.offer-badge--scheduled { background: #FFF1E5; color: #B07060; }
.offer-badge--expired   { background: #F3E5E2; color: #997566; }
.offer-badge--off       { background: #EDEDED; color: #777; }

@media (max-width: 640px) {
  .offer-form-row { grid-template-columns: 1fr; }
  .offer-li {
    flex-wrap: wrap;
  }
  .offer-li-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- ADMIN: stock cell (toggle + count pill) ---------- */
.stock-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.stock-count-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ---------- ADMIN: low-stock threshold panel ---------- */
#lowStockPanel { margin-bottom: 1.5rem; }
.low-stock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.low-stock-form {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* ---------- COMING SOON PANEL ---------- */
.coming-soon-panel {
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--success);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.coming-soon-panel.is-on {
  border-left-color: var(--primary);
  background: linear-gradient(90deg, #FFF7F3 0%, var(--surface) 60%);
}
.coming-soon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.coming-soon-sub {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin: 0.35rem 0 0;
  max-width: 560px;
}
.coming-soon-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-soft);
  flex-wrap: wrap;
}
.coming-soon-status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(196, 133, 106, 0.12);
}
.coming-soon-status strong { color: var(--text); }
.coming-soon-preview {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 600;
}

.row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  min-width: 180px;
}
.row-actions .btn { width: 100%; }

.seed-banner {
  background: #FFF3EE;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-card);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =====================================================================
   STARS (display + input)
   ===================================================================== */
.stars {
  position: relative;
  display: inline-block;
  font-family: serif; /* tighter star glyphs */
  letter-spacing: 2px;
  line-height: 1;
  color: #DDC4BC; /* fallback */
}
.stars--sm { font-size: 0.95rem; }
.stars--md { font-size: 1.1rem; }
.stars--lg { font-size: 1.4rem; }

.stars-bg {
  color: #E8CFC5;
}
.stars-fg {
  position: absolute;
  top: 0; left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--primary);
  width: 0;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  min-height: 22px;
}
.card-rating--empty {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-soft);
}
.rating-text { font-weight: 600; color: var(--text); }

/* clickable star input (review form) */
.stars-input {
  display: inline-flex;
  gap: 0.25rem;
}
.star-btn {
  font-size: 1.8rem;
  line-height: 1;
  color: #E8CFC5;
  transition: color 0.15s ease, transform 0.15s ease;
  padding: 0.2rem 0.1rem;
}
.star-btn:hover { transform: scale(1.1); }
.star-btn.is-filled { color: var(--primary); }

/* =====================================================================
   PRODUCT DETAIL PAGE
   ===================================================================== */
.detail-section { padding: 2.5rem 0 4rem; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current {
  color: var(--text);
  font-weight: 600;
  text-transform: capitalize;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.detail-image-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow-md);
}
.detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-info .category-pill { margin-bottom: 1rem; }
.detail-name {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
.detail-rating {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.detail-rating--empty .rating-link {
  font-style: italic;
}
.rating-link {
  color: var(--text-soft);
  text-decoration: underline;
  font-size: 0.85rem;
}
.rating-link:hover { color: var(--primary); }

.detail-price {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 2rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.detail-desc {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
  line-height: 1.7;
}
.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.detail-actions .btn { min-width: 180px; }

/* product card link wrappers */
.product-card-link { display: block; cursor: pointer; }
.product-name a { color: inherit; }
.product-name a:hover { color: var(--primary); }

/* The whole card is clickable (except buttons / carousel controls). */
.product-card { cursor: pointer; }

/* =====================================================================
   IMAGE CAROUSEL  (used on home page product cards + product detail)
   ===================================================================== */
.carousel {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  width: 100%;
}
.carousel--card {
  aspect-ratio: 1 / 1;
}
.carousel--detail {
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}
.carousel-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
  display: block;
}
.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Detail-page carousel keeps a square frame */
.carousel--detail { aspect-ratio: 1 / 1; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 133, 106, 0.2);
  box-shadow: 0 4px 14px rgba(122, 79, 66, 0.15);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
  z-index: 3;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
}
.carousel-arrow:hover {
  background: #fff;
  color: var(--primary);
}
.carousel-arrow--prev { left: 8px; }
.carousel-arrow--next { right: 8px; }
.carousel:hover .carousel-arrow,
.carousel:focus-within .carousel-arrow {
  opacity: 1;
}
.carousel--detail .carousel-arrow {
  width: 44px;
  height: 44px;
  font-size: 1.9rem;
  opacity: 0.85;
}
.carousel--detail .carousel-arrow:hover { opacity: 1; }

.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3;
}
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(122, 79, 66, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot:hover { background: rgba(122, 79, 66, 0.6); }
.carousel-dot.is-active {
  background: var(--primary);
  transform: scale(1.25);
}

/* Touch devices: keep arrows visible at lower opacity so users see them */
@media (hover: none) {
  .carousel-arrow { opacity: 0.75; }
}

/* =====================================================================
   REVIEWS SECTION
   ===================================================================== */
.reviews-section {
  padding: 4rem 0;
  background: var(--bg-soft);
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.reviews-summary--empty {
  text-align: center;
  display: block;
  color: var(--text-soft);
}
.reviews-summary-avg {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 3.5rem;
  font-weight: 500;
  color: var(--primary);
  line-height: 1;
}
.reviews-summary-meta {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 0.4rem;
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  gap: 1rem;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
}
.review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.reviewer-name {
  font-weight: 700;
  color: var(--text);
}
.review-date {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 0.15rem;
}
.review-comment {
  margin: 0.5rem 0 0;
  color: var(--text);
  line-height: 1.6;
}

.review-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 640px;
}
.review-form-wrap h3 { margin-bottom: 1.25rem; }

/* =====================================================================
   SIMILAR PRODUCTS
   ===================================================================== */
.similar-section { padding: 4rem 0; }

.similar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.similar-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}
.similar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.similar-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-soft);
}
.similar-info {
  padding: 0.85rem 1rem 1.1rem;
}
.similar-info h4 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
  color: var(--text);
}
.similar-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

/* =====================================================================
   ADMIN — IMAGE MANAGER  (multi-image field with AI generation)
   ===================================================================== */
.image-manager {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.image-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.image-row.is-primary {
  border-color: var(--primary);
  background: #FFF7F4;
}
.image-row-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--border);
}
.image-row-thumb-empty {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 1.4rem;
}
.image-row-input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  min-width: 0;
}
.image-row-input:focus { border-color: var(--primary); }
.image-row-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.icon-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-soft);
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
}
.icon-btn:hover { background: rgba(196,133,106,0.15); color: var(--primary); }
.icon-btn.icon-btn--danger:hover { background: #FCE9E5; color: var(--danger); }
.icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.primary-tag {
  font-size: 0.65rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  background: rgba(196,133,106,0.15);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-pill);
  margin-left: 0.4rem;
}

.image-manager-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}

/* =====================================================================
   REVIEW PHOTOS  (customer & admin)
   ===================================================================== */

.review-photo-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-start;
}
.review-photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.review-photo-preview {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.review-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.review-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.review-photo-remove:hover { background: var(--danger, #C44747); }
.review-photo-hint {
  width: 100%;
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-soft);
  font-style: italic;
}

/* photos shown on rendered review cards (shop-side) */
.review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.review-photo {
  width: 80px;
  height: 80px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.review-photo:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}
.review-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* admin review modal photos */
.admin-review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.75rem;
}
.admin-review-photo {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.admin-review-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================================================================
   LIGHTBOX  (full-screen image viewer for review photos)
   ===================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }

/* small text-only buttons used inline near labels */
.btn-link {
  background: none;
  border: none;
  padding: 0.25rem 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s ease;
}
.btn-link:hover { color: var(--primary-hover); }
.btn-link[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-link--ai {
  background: linear-gradient(95deg, #C4856A 0%, #D9A491 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.btn-link--ai:hover {
  background: linear-gradient(95deg, #B07060 0%, #C4856A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* row above a textarea/input: "Description    ✨ Generate with AI" */
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.field-label-row label { margin-bottom: 0; }

/* Spinner used while AI is working */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
  margin-right: 0.4rem;
}
.spinner--inline {
  border-color: rgba(196,133,106,0.3);
  border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   PRODUCT DETAIL — IMAGE GALLERY (main + thumb strip)
   ===================================================================== */
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.thumb-strip {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.thumb:hover { transform: translateY(-2px); }
.thumb.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196,133,106,0.18);
}

/* =====================================================================
   ADMIN — REVIEW MODAL  (per-product review moderation)
   ===================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(122, 79, 66, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 90;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 92%;
  max-width: 720px;
  max-height: 85vh;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: 0 25px 70px rgba(122, 79, 66, 0.25);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -48%) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  display: flex;
  flex-direction: column;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.modal-sub {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.5rem;
}

/* Each review card inside the modal */
.admin-review {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}
.admin-review.is-editing {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 133, 106, 0.12);
}
.admin-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.admin-review-stars {
  font-family: serif;
  letter-spacing: 2px;
  color: var(--primary);
  font-size: 1.05rem;
}
.admin-review-comment {
  margin: 0.4rem 0 0.9rem;
  color: var(--text);
  line-height: 1.55;
  font-size: 0.95rem;
}
.admin-review-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Reviews button count badge in the product table */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  line-height: 1;
}

/* =====================================================================
   DISCOUNTED PRICE DISPLAY  (used on cards, detail, cart)
   ===================================================================== */
.price-original {
  text-decoration: line-through;
  color: var(--text-soft);
  font-size: 0.85em;
  font-weight: 500;
  margin-right: 0.4rem;
}
.price-final {
  color: var(--primary);
  font-weight: 700;
}
.price-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  margin-left: 0.5rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--radius-pill);
  vertical-align: 2px;
}
.price-saving {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6E9F76;
  font-style: italic;
  margin-top: 0.15rem;
}

/* =====================================================================
   ADMIN — DISCOUNTS PANEL
   ===================================================================== */
#discountsPanel h3 { margin-bottom: 0.25rem; }

.discount-block {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border);
}
.discount-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.discount-block-head {
  margin-bottom: 0.85rem;
}
.discount-block-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  margin: 0 0 0.15rem;
  color: var(--text);
}
.discount-block-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.discount-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.discount-cat-label {
  text-transform: capitalize;
  font-weight: 600;
  min-width: 90px;
  color: var(--text);
}
.discount-status {
  margin: 0.5rem 0 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}
.discount-status--active {
  color: var(--text);
  background: rgba(196,133,106,0.12);
  border-radius: 8px;
}

.discount-category-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.discount-product-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.discount-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.discount-empty {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-style: italic;
  padding: 0.4rem 0;
}
.discount-li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.discount-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.discount-li-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.discount-li-info strong {
  font-size: 0.95rem;
  color: var(--text);
}
.discount-li-meta {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 0.1rem;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; gap: 2rem; }
  .similar-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-summary { padding: 1.25rem 1.5rem; gap: 1.25rem; }
  .reviews-summary-avg { font-size: 2.5rem; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1rem;
    border-top: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 40;
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-toggle { display: block; }

  .product-grid { grid-template-columns: 1fr; }
  .shop-controls { flex-direction: column; align-items: stretch; }
  .filter-tabs { justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 3.5rem 0; }
  .hero { padding: 4rem 1.5rem; }
  .similar-grid { grid-template-columns: 1fr 1fr; }
  .detail-actions .btn { min-width: 0; flex: 1; }
  .modal { width: 96%; max-height: 90vh; }
  .modal-body { padding: 1rem 1.1rem 1.1rem; }
}
