/* ============================================================
   DIVA SHOP — Boutique Pink Theme (Phase 4)
   Storefront styles are scoped under body.store so the admin
   dashboard (which embeds its own CSS) is not affected.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #fefafb;
  --bg-soft: #f8eef2;
  --pink-100: #f7dce6;
  --pink-200: #f0c4d4;
  --pink-300: #e7a8c0;
  --rose-400: #e27da8;
  --rose-500: #d5548a;
  --rose-600: #be3e74;
  --rose-700: #9c2f5f;
  --plum-800: #5c2140;
  --plum-900: #3f1530;
  --ink: #4a2338;
  --muted: #8a4d68;
  --gold: #d4af37;
  --card: #ffffff;
  --line: #edd0dc;
  --focus-ring: rgba(213, 84, 138, 0.22);
  --shadow-soft: 0 8px 22px rgba(92, 33, 64, 0.1);
  --shadow-lift: 0 14px 32px rgba(92, 33, 64, 0.16);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-display: "El Messiri", "Tajawal", serif;
  --font-latin: "Playfair Display", "El Messiri", serif;
  --grad-rose: #d5548a;
  --grad-rose-hover: #be3e74;

  /* Legacy variable names still referenced by inline styles */
  --primary: #d5548a;
  --secondary: #be3e74;
  --accent: #d4af37;
  --light: #fefafb;
  --dark: #5c2140;
  --text: #4a2338;
  --gray: #8a4d68;
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  scrollbar-color: var(--rose-400) var(--bg-soft);
}

::selection {
  background: var(--pink-200);
  color: var(--plum-900);
}

.store :focus-visible {
  outline: 2px solid var(--rose-500);
  outline-offset: 3px;
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--light);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  caret-color: var(--rose-500);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Storefront page canvas ---------- */
body.store {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

body.store > header,
body.store > section,
body.store > footer {
  min-width: 0;
  max-width: 100%;
}

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

body.store section {
  flex: 0 0 auto;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
  font-size: 16px;
}

.loading-state i {
  color: var(--rose-500);
  margin-left: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--rose-500);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(92, 33, 64, 0.18);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.btn:hover {
  background: var(--rose-600);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(92, 33, 64, 0.22);
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: #fff;
  color: var(--rose-600);
  border: 1.5px solid var(--pink-200);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.25s ease;
}

.btn-ghost:hover {
  border-color: var(--rose-400);
  background: var(--bg-soft);
}

/* ============================================================
   HEADER
   ============================================================ */
.store header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.store .header-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  min-width: 0;
}

.store .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  justify-self: center;
}

.store .logo img {
  height: 56px;
  width: 56px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.store .logo h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: var(--font-latin);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--rose-500);
}

.store .logo h1::after {
  content: "";
  width: 68px;
  height: 12px;
  background: url("../assets/ornament-gold.png") center / contain no-repeat;
}

.store .logo h1 a {
  color: inherit;
}

.store .header-home,
.store .header-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--plum-800);
  text-decoration: none;
}

.store .header-home {
  justify-self: start;
}

.store .header-cart {
  justify-self: end;
}

.store .header-home:hover,
.store .header-cart:hover {
  color: var(--rose-600);
}

.store .header-home.active,
.store .header-cart.active {
  color: var(--rose-700);
}

.store nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.store nav ul li a.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-radius: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--plum-800);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.store nav ul li a.nav-link:hover {
  background: transparent;
  color: var(--rose-600);
}

.store nav ul li a.nav-link.active {
  background: transparent;
  color: var(--rose-700);
  box-shadow: none;
  border-bottom-color: var(--rose-500);
}

.store .cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--rose-500);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.store nav ul li a.nav-link:not(.active) .cart-badge {
  background: var(--rose-500);
  color: #fff;
}

.store nav ul li a.nav-link.active .cart-badge {
  background: var(--rose-500);
  color: #fff;
}

/* ============================================================
   HERO SLIDESHOW
   ============================================================ */
.slideshow-container {
  position: relative;
  width: 92%;
  max-width: 1200px;
  margin: 18px auto 0;
  height: min(72vh, 860px);
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--pink-100);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide::after {
  content: none;
}

.slide-content {
  position: absolute;
  bottom: 9%;
  right: 6%;
  max-width: 520px;
  text-align: right;
  z-index: 2;
}

.slide-content h2 {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 3px 18px rgba(63, 21, 48, 0.55);
}

.slide-content p {
  color: rgba(255, 240, 247, 0.95);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(63, 21, 48, 0.55);
}

.slide-content .btn {
  padding: 12px 32px;
}

/* Dots */
.slide-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  z-index: 3;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.35s ease;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.9);
}

.dot.active {
  width: 10px;
  height: 10px;
  background: var(--rose-500);
  box-shadow: 0 2px 8px rgba(63, 21, 48, 0.25);
}

.slide-arrow {
  display: none;
}

/* ============================================================
   FEATURE STRIP
   ============================================================ */
.feature-strip {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  width: 92%;
  max-width: 1200px;
  margin: 26px auto 4px;
  overflow: visible;
}

.feature-chip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border: 1px solid #e8d4dc;
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--plum-800);
  text-align: center;
  line-height: 1.3;
}

.feature-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.feature-chip i {
  color: var(--rose-500);
  font-size: 15px;
}

.feature-chip .fa-whatsapp {
  color: #25d366;
}

.feature-chip .fa-gem {
  color: var(--gold);
}

a.feature-chip {
  text-decoration: none;
  cursor: pointer;
  color: inherit;
}

a.feature-chip:hover {
  background: var(--bg-soft);
  border-color: var(--rose-400);
}

a.feature-chip:focus-visible {
  outline: 2px solid var(--rose-500);
  outline-offset: 3px;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.store .section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  margin: 44px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  color: var(--rose-500);
}

.store .section-title::before,
.store .section-title::after {
  content: "";
  width: 88px;
  height: 22px;
  flex: 0 0 auto;
  background: url("../assets/ornament-gold.png") center / contain no-repeat;
}

.store .section-title::before {
  transform: scaleX(-1);
}

.store .section-title.is-quiet::before,
.store .section-title.is-quiet::after {
  display: none;
}

.page-head {
  position: relative;
  padding-top: 18px;
}

.back-link {
  position: absolute;
  top: 22px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--rose-600);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(190, 62, 116, 0.08);
  transition: all 0.25s ease;
  z-index: 5;
}

.back-link:hover {
  background: var(--bg-soft);
  border-color: var(--pink-300);
}

.count-chip {
  display: block;
  width: fit-content;
  margin: -16px auto 18px;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--pink-100);
  color: var(--rose-700);
  font-size: 13px;
  font-weight: 700;
}

/* ============================================================
   PRODUCTS TOOLBAR (search / sort / price)
   ============================================================ */
.products-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px color-mix(in srgb, rgba(92, 33, 64, 0.08) 55%, transparent);
}

.products-toolbar[hidden] {
  display: none !important;
}

.toolbar-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}

.toolbar-search i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rose-600);
  font-size: 13.5px;
  pointer-events: none;
}

.toolbar-search input,
.toolbar-sort select,
.toolbar-price input {
  border: 1px solid color-mix(in srgb, var(--line) 85%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-soft) 70%, white);
  color: var(--ink);
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.toolbar-search input {
  width: 100%;
  padding: 10px 38px 10px 14px;
  font-size: 14.5px;
  font-weight: 400;
}

.toolbar-search input::placeholder,
.toolbar-price input::placeholder {
  color: var(--muted);
}

.toolbar-search input:focus,
.toolbar-sort select:focus,
.toolbar-price input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--rose-400) 65%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 70%, transparent);
  background: #fff;
}

.toolbar-sort,
.toolbar-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-sort label,
.toolbar-price-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--plum-800);
  white-space: nowrap;
}

.toolbar-sort select {
  min-width: 168px;
  padding: 9px 14px 9px 34px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-align: right;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a4d68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 13px;
}

.toolbar-price-sep {
  color: var(--muted);
  font-weight: 600;
}

.toolbar-price input {
  width: 92px;
  padding: 9px 12px;
  font-size: 14px;
  text-align: center;
}

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

.toolbar-price input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.toolbar-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--rose-600);
  border: 1px solid color-mix(in srgb, var(--pink-200) 75%, white);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.toolbar-clear:hover {
  border-color: var(--pink-200);
  background: color-mix(in srgb, var(--bg-soft) 60%, white);
  color: var(--rose-600);
}

.toolbar-clear[hidden] {
  display: none !important;
}

/* ============================================================
   CATEGORY CARDS (home — uniform blocks)
   ============================================================ */
.categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 64px;
}

.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transform-origin: center bottom;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
  animation: category-focus 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 0.09s);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
}

.category-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pink-100), var(--bg-soft));
}

.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.category-card:hover .category-img {
  transform: scale(1.07);
}

.category-card::after {
  content: none;
}

.category-name {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 12px 14px;
  border-radius: 0;
  background: linear-gradient(
    to top,
    rgba(46, 12, 32, 0.78) 0%,
    transparent 100%
  );
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}

.category-name i {
  display: none;
}

.category-card:hover .category-name {
  background: linear-gradient(
    to top,
    rgba(46, 12, 32, 0.86) 0%,
    transparent 100%
  );
  color: #fff;
}

/* ============================================================
   PRODUCTS — equal cards, one frame per category
   The grid looks at the photos in the category and picks one
   shared frame so every block is the same size:
   data-profile="tall"   → portrait (dresses...)  3:4
   data-profile="square" → compact (rings...)     1:1
   data-profile="wide"   → landscape              4:3
   ============================================================ */
.products {
  --card-min: 235px;
  --frame: 3 / 4;
  --grid-gap: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
  margin-bottom: 56px;
}

.products[data-profile="tall"] {
  --card-min: 250px;
  --frame: 3 / 4;
}

.products[data-profile="square"] {
  --card-min: 200px;
  --frame: 1 / 1;
}

.products[data-profile="wide"] {
  --card-min: 280px;
  --frame: 4 / 3;
}

.products.is-plain {
  display: block;
}

.product-card {
  display: flex;
  height: 100%;
  animation: rise 0.55s ease both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.card-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.product-card:hover .card-body {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
}

.product-media {
  position: relative;
  aspect-ratio: var(--frame);
  flex-shrink: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: linear-gradient(
    120deg,
    var(--pink-100) 0%,
    var(--bg-soft) 50%,
    var(--pink-100) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 150% 0;
  }
  to {
    background-position: -50% 0;
  }
}

.product-media.is-loaded {
  animation: none;
  background: var(--bg-soft);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 0.45s ease,
    transform 0.6s ease;
}

.product-img.is-hidden {
  opacity: 0;
}

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

.zoom-hint {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: var(--rose-600);
  font-size: 13px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  pointer-events: none;
}

.product-card:hover .zoom-hint {
  opacity: 1;
  transform: scale(1);
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 17px;
}

.product-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.35;
  color: var(--plum-800);
  margin-bottom: 4px;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.35em * 2);
}

.product-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 8px;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.55em * 2);
}

.product-price {
  color: var(--rose-600);
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 12px;
  text-align: right;
}

/* Quantity stepper */
.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  direction: ltr;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 11px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--rose-600);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(190, 62, 116, 0.14);
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  background: var(--grad-rose);
  color: #fff;
}

.quantity-display,
.quantity-input {
  font-weight: 800;
  width: 52px;
  text-align: center;
  color: var(--plum-800);
}

.quantity-input {
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 15px;
}

.quantity-input:focus {
  outline: none;
}

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

.quantity-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 11px 14px;
  border: none;
  border-radius: 12px;
  background: var(--rose-500);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(190, 62, 116, 0.25);
  transition: all 0.25s ease;
}

.add-to-cart:hover {
  background: var(--grad-rose-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(156, 47, 95, 0.3);
}

/* Empty / error states inside grids */
.grid-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
}

.grid-state .state-icon {
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pink-100);
  color: var(--rose-500);
  font-size: 42px;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.55);
}

.grid-state h4 {
  font-family: var(--font-display);
  color: var(--plum-800);
  font-size: 20px;
  margin-bottom: 6px;
}

.grid-state p {
  margin: 0 auto;
  max-width: 320px;
}

.grid-state .btn {
  margin-top: 18px;
}

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 26px;
  align-items: start;
  margin-bottom: 56px;
}

.cart-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
  animation: rise 0.4s ease both;
}

.cart-item-img {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  box-shadow: 0 4px 12px rgba(190, 62, 116, 0.16);
  transition: transform 0.3s ease;
}

.cart-item-img:hover {
  transform: scale(1.05);
}

.cart-item-details {
  flex: 1;
  text-align: right;
  min-width: 0;
}

.cart-item-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--plum-800);
  margin-bottom: 2px;
}

.cart-item-price {
  color: var(--rose-600);
  font-weight: 800;
  font-size: 15px;
}

.cart-item-line-total {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  flex: 0 0 auto;
}

.cart-item-quantity input {
  width: 46px;
  text-align: center;
  padding: 7px 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  font-weight: 800;
  color: var(--plum-800);
}

.cart-item-quantity input:focus {
  outline: none;
  border-color: var(--rose-400);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.remove-item {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #fdecef;
  color: #d3455b;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  margin-left: 4px;
}

.remove-item:hover {
  background: #d3455b;
  color: #fff;
}

/* Summary card */
.cart-summary {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px 22px 18px;
  text-align: right;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--plum-800);
  margin-bottom: 16px;
}

.panel-title i {
  color: var(--rose-500);
}

.shipping-region {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.shipping-region label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--plum-800);
}

.shipping-region select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background-color: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
  text-align: right;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23be3e74' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 15px;
  transition: all 0.25s ease;
}

.shipping-region select:focus {
  border-color: var(--rose-400);
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.shipping-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px dashed var(--line);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-total {
  font-weight: 800;
  font-size: 19px;
  color: var(--plum-800);
  padding-top: 14px;
}

.summary-total span:last-child {
  font-size: 24px;
  background: var(--grad-rose);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Checkout form */
.customer-info {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  text-align: right;
}

.store .form-group {
  margin-bottom: 15px;
  text-align: right;
}

.store .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--plum-800);
}

.store .form-group input,
.store .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--bg-soft);
  color: var(--ink);
  transition: all 0.25s ease;
  text-align: right;
  resize: vertical;
}

.store .form-group input:focus,
.store .form-group textarea:focus {
  border-color: var(--rose-400);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.confirm-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  background: var(--rose-500);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(190, 62, 116, 0.32);
  transition: all 0.25s ease;
}

.confirm-order:hover {
  background: var(--grad-rose-hover);
  transform: translateY(-2px);
}

.confirm-order:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Empty cart */
.empty-cart-message {
  text-align: center;
  padding: 40px 20px 56px;
}

.empty-cart-message .state-icon {
  width: 108px;
  height: 108px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pink-100);
  color: var(--rose-500);
  font-size: 42px;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.55);
}

.empty-cart-message h3 {
  font-family: var(--font-display);
  color: var(--plum-800);
  font-size: 22px;
  margin-bottom: 6px;
}

.empty-cart-message p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.store footer {
  margin-top: auto;
  background: var(--bg-soft);
  color: var(--plum-800);
  padding: 40px 0 22px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.footer-logo {
  font-family: var(--font-latin);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--rose-500);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
}

.footer-links a {
  padding: 6px 14px;
  border-radius: 999px;
  color: #8a3f63;
  font-size: 14px;
  transition: all 0.25s ease;
}

.footer-links a:hover {
  color: var(--rose-600);
  background: rgba(255, 255, 255, 0.75);
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 16px;
  color: var(--rose-600);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: var(--rose-500);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(92, 33, 64, 0.22);
}

.copyright {
  font-size: 13px;
  color: rgba(92, 33, 64, 0.6);
  border-top: 1px solid rgba(156, 47, 95, 0.14);
  padding-top: 18px;
  width: 100%;
}

/* ============================================================
   LIGHTBOX (product image modal)
   Toggled with style.display = "block" by existing JS.
   ============================================================ */
.product-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(46, 12, 32, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  max-width: min(92vw, 940px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: zoomIn 0.3s ease;
  pointer-events: none;
}

.modal-content > * {
  pointer-events: auto;
}

@keyframes zoomIn {
  from {
    transform: scale(0.86);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-image {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  background: #fff;
}

.modal-caption {
  text-align: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  padding: 8px 26px;
  border-radius: 999px;
  max-width: 90%;
}

.modal-close {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-close:hover {
  background: var(--grad-rose);
  transform: rotate(90deg);
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-root {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: max-content;
  max-width: 92vw;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--plum-900);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(63, 21, 48, 0.4);
  animation: toastIn 0.35s ease both;
  max-width: 92vw;
}

.toast i {
  color: var(--pink-300);
  font-size: 16px;
  flex: 0 0 auto;
}

.toast.warn i {
  color: #ffd166;
}

.toast.leaving {
  animation: toastOut 0.3s ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
}

/* ============================================================
   ORDER SUCCESS OVERLAY
   ============================================================ */
.order-success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(46, 12, 32, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease;
}

.order-success-overlay.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.order-success-card {
  background: #fff;
  border-radius: 26px;
  padding: 38px 34px 30px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: zoomIn 0.35s ease;
}

.success-check {
  width: 86px;
  height: 86px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--grad-rose);
  color: #fff;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(190, 62, 116, 0.4);
  animation: pop 0.45s ease 0.1s both;
}

@keyframes pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.order-success-card h3 {
  font-family: var(--font-display);
  color: var(--plum-800);
  font-size: 22px;
  margin-bottom: 6px;
}

.order-success-card p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 22px;
}

.order-success-card .btn {
  width: 100%;
  margin-bottom: 10px;
}

.order-success-card .btn-ghost {
  width: 100%;
}

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  left: auto;
  z-index: 9999;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease;
}

.wa-float::after {
  content: none;
}

@keyframes pulse {
  0% {
    transform: scale(0.85);
    opacity: 1;
  }
  70%,
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.wa-float:hover {
  transform: scale(1.1);
}

/* ============================================================
   SHARED ANIMATIONS
   ============================================================ */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes category-focus {
  from {
    opacity: 0;
    transform: scale(0.94);
    filter: blur(7px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-side {
    position: static;
  }
}

@media (max-width: 768px) {
  .store .header-content {
    padding: 10px 0;
  }

  .store .logo img {
    height: 48px;
    width: 48px;
  }

  .store .logo h1::after {
    width: 52px;
    height: 10px;
  }

  .store .logo h1 {
    font-size: 13px;
    letter-spacing: 2px;
  }

  .store .header-home,
  .store .header-cart {
    font-size: 13px;
  }

  .slideshow-container {
    height: min(54vh, 520px);
    min-height: 320px;
    border-radius: var(--radius-lg);
    margin-top: 12px;
  }

  .slide-content {
    right: 5%;
    left: 5%;
    bottom: 13%;
    text-align: center;
  }

  .slide-arrow {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .feature-strip {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 1fr);
    overflow: visible;
    justify-content: stretch;
    gap: 6px;
  }

  .feature-chip {
    flex: unset;
    flex-direction: column;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
    font-size: 10px;
    padding: 8px 4px 7px;
    gap: 3px;
  }

  .feature-chip i {
    font-size: 13px;
  }

  .feature-chip span {
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .store .section-title {
    margin: 38px 0 24px;
  }

  .categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .category-name {
    padding: 22px 10px 12px;
    font-size: 14px;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
    --grid-gap: 14px;
  }

  .product-info {
    padding: 11px 12px 13px;
  }

  .product-name {
    font-size: 14.5px;
  }

  .product-price {
    font-size: 16.5px;
  }

  .quantity-btn {
    width: 29px;
    height: 29px;
  }

  .add-to-cart {
    font-size: 13px;
    padding: 10px 8px;
  }

  .back-link {
    position: static;
    display: inline-flex;
    margin: 16px 0 -22px;
  }

  .products-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .toolbar-search {
    min-width: 0;
    flex: 1 1 auto;
  }

  .toolbar-sort,
  .toolbar-price {
    width: 100%;
  }

  .toolbar-sort select {
    flex: 1;
    min-width: 0;
  }

  .toolbar-price input {
    flex: 1;
    width: auto;
  }

  .toolbar-clear {
    width: 100%;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .cart-item-details {
    flex: 1 1 55%;
  }

  .cart-item-quantity {
    width: 100%;
    justify-content: flex-end;
  }

  .modal-close {
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .wa-float {
    width: 48px;
    height: 48px;
    font-size: 23px;
    bottom: 16px;
    right: 16px;
    left: auto;
  }
}

@media (max-width: 480px) {
  .store .header-content {
    gap: 8px;
  }

  .store .logo {
    gap: 2px;
  }

  .store .logo h1 {
    font-size: 12px;
    letter-spacing: 1.5px;
  }

  .store .logo img {
    height: 42px;
    width: 42px;
  }

  .store nav ul {
    gap: 4px;
  }

  .store nav ul li a.nav-link {
    padding: 7px 2px;
    font-size: 12.5px;
    gap: 5px;
  }

  .store .cart-badge {
    min-width: 18px;
    height: 18px;
    font-size: 11px;
  }
}

@media (max-width: 400px) {
  .store .logo h1 {
    font-size: 14px;
    letter-spacing: 1px;
  }

  .slideshow-container {
    min-height: 230px;
  }

  .products,
  .categories {
    gap: 10px;
  }

  .products {
    --grid-gap: 12px;
  }
}

@media (min-width: 769px) {
  .store header .header-content {
    padding: 10px 0;
  }

  .store header .logo {
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }

  .store header .logo img {
    height: 46px;
    width: 46px;
  }

  .store header .logo h1 {
    align-items: center;
    font-size: 16px;
    letter-spacing: 2.6px;
    gap: 4px;
  }

  .store header .logo h1::after {
    width: 60px;
    height: 10px;
  }

  .slideshow-container {
    height: min(42vw, 480px);
    min-height: 260px;
  }

  .slide img {
    object-fit: cover;
    object-position: center 40%;
  }

  .slideshow-container .loading-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
}

@media (min-width: 900px) {
  .categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .category-name {
    font-size: 15px;
    padding: 20px 10px 12px;
  }
}
