:root {
  --bg: #0a0a0a;
  --surface: #1a1a1a;
  --accent: #ff2e96;
  --accent-glow: #ff90c9;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --shadow-inner: inset 8px 8px 16px rgba(0, 0, 0, 0.6),
    inset -8px -8px 16px rgba(255, 255, 255, 0.05);
  --shadow-outer: 10px 10px 25px rgba(0, 0, 0, 0.7),
    -8px -8px 20px rgba(255, 255, 255, 0.03);
  --transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Vazirmatn", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 46, 150, 0.2);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 46, 150, 0.5);
} /* Desktop Nav */
.desktop-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.search-container {
  position: relative;
  cursor: default;
  display: flex;
  align-items: center; /* make container wide enough for animation */
  min-width: 48px;
}
.search-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--shadow-inner);
  box-shadow: var(--shadow-inner);
  display: grid;
  place-items: center;
  transition: var(--transition);
  cursor: pointer; /* ensure pointer */
  z-index: 3; /* sit above input so icon is always clickable */
}
.search-wrapper:hover {
  color: var(--accent);
}
#desktop-search {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 48px;
  padding: 0 1.5rem;
  background: var(--surface);
  border: none;
  border-radius: 50px;
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-inner);
  opacity: 0;
  outline: none;
  z-index: 2;
  direction: rtl;
}
#desktop-search::placeholder {
  color: var(--text-muted);
}
#desktop-search.active {
  width: 340px;
  opacity: 1; /* keep magnifier visible by adding extra right padding */
  padding: 0 3.5rem 0 1.5rem;
}
.search-icon {
  font-size: 1.3rem;
  color: var(--text);
  pointer-events: none;
  transition: var(--transition);
}
.search-wrapper:hover .search-icon {
  color: var(--accent);
}
.nav-icons {
  display: flex;
  gap: 1.5rem;
  font-size: 1.3rem;
}
.nav-icons i {
  position: relative;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--shadow-inner);
  box-shadow: var(--shadow-inner);
  transition: var(--transition);
}
.nav-icons i:hover {
  color: var(--accent);
}
.cart-count {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--accent);
  color: var(--bg);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
} /* Mobile Header – ONLY ONE LOGO, CORRECT ORDER */
.mobile-header {
  display: none;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  direction: ltr;
  gap: 1rem;
  padding-inline: 0.5rem;
}
.mobile-header .logo {
  position: static; /* no absolute centering any more */
  transform: none;
  font-size: 1.8rem;
  margin-inline-start: auto; /* push to the visual right (respects dir=rtl) */
}
.mobile-left {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.mobile-left i {
  font-size: 1.6rem;
  cursor: pointer;
  position: relative;
  align-self: baseline;
}
.mobile-cart {
  position: relative; /* ensure cart-count absolute positioning works */
  display: inline-block;
}
.mobile-cart .cart-count {
  top: -8px;
  left: -8px;
  position: absolute;
  background: var(--accent);
  color: var(--bg);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  z-index: 5;
} /* Mobile Sidebar */
#mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 320px;
  height: 100vh;
  background: var(--surface);
  z-index: 2000;
  transition: left 0.4s ease;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-outer);
  overflow-y: auto;
}
#mobile-menu.open {
  left: 0;
}
.menu-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 1.8rem;
  cursor: pointer;
}
.menu-search {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border: none;
  border-radius: 50px;
  color: var(--text);
  margin: 4rem 0 2rem;
  box-shadow: var(--shadow-inner);
  font-size: 1.1rem;
}
.categories-tree {
  max-height: 60vh;
  overflow-y: auto;
}
.cat-parent {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
.cat-parent > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}
.cat-children {
  padding-right: 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.cat-children.open {
  max-height: 2000px;
}
.cat-children a {
  display: block;
  padding: 0.7rem 0;
  color: var(--text-muted);
}
.cat-children a:hover {
  color: var(--accent);
}
.menu-bottom {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  padding: 0 2rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  font-size: 1.8rem;
}
.menu-bottom a {
  color: var(--text-muted);
}
.menu-bottom a:hover {
  color: var(--accent);
} /* Hero – 100vh */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(255, 46, 150, 0.15),
    rgba(0, 0, 0, 0.85)
  );
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding-inline: 10%; /* KEEP hero content from sticking to left/right on desktop; respects dir */
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 80%,
    rgba(255, 46, 150, 0.25),
    transparent 60%
  );
  animation: glow 6s ease-in-out infinite alternate;
}
@keyframes glow {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 0.8;
  }
}
.hero-content {
  max-width: 520px;
  padding: 3rem;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 46, 150, 0.3);
  border-radius: 20px 0 0 20px;
  box-shadow: var(--shadow-outer);
  animation: heroFade 1.2s ease-out forwards;
  opacity: 0;
  transform: translateX(60px);
}
@keyframes heroFade {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.hero h1 {
  font-size: 3.6rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--accent), var(--text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}
.cta-btn {
  background: var(--shadow-inner);
  color: var(--text);
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-inner);
  transition: var(--transition);
}
.cta-btn:hover {
  box-shadow: var(--shadow-outer);
  color: var(--accent);
} /* Products */

.products-section {
  padding: 6rem 2rem 8rem;
  width: 100% !important;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 4rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 0.5rem 1rem;
  background: #ff0040;
  color: white;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(255, 0, 64, 0.5);
  direction: ltr;
}

/* Move product-info slightly up on desktop so the title is partially visible (~10px) */

.price-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.current-price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
}
.old-price {
  font-size: 1.2rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.add-to-cart {
  background: var(--shadow-inner);
  color: var(--text);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  margin-top: 1rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}
.add-to-cart:hover {
  box-shadow: var(--shadow-outer);
  color: var(--accent);
}
.see-more {
  display: block;
  width: 260px;
  margin: 4rem auto 0;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.see-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 46, 150, 0.5);
}
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-header {
    display: flex;
  } /* hero mobile: add top padding so content doesn't go under header */
  .hero {
    padding-inline: 1.5rem; /* avoid flush edges on small screens */
  }
  .hero-content {
    border-radius: 20px;
    max-width: 90%;
  }
  .logo-desc {
    display: none !important;
  }
}
@media (min-width: 769px) {
  .mobile-header,
  #mobile-menu,
  .overlay {
    display: none;
  }
}
.floating-actions {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 100;
}
.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(255, 46, 150, 0.4);
  transition: var(--transition);
}
.floating-btn:hover {
  transform: scale(1.1);
}
footer {
  background: var(--surface);
  padding: 3rem 2rem 1rem;
  text-align: center;
  border-top: 1px solid rgba(255, 46, 150, 0.2);
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  font-size: 1.5rem;
}
.social-links i {
  color: var(--text-muted);
  transition: var(--transition);
}
.social-links i:hover {
  color: var(--accent);
  transform: translateY(-3px);
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1500;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
} /* Color Variants – همیشه دیده می‌شن در دسکتاپ، هاور در موبایل */
.color-variants {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  opacity: 0.9;
}
.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.color-dot:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(255, 46, 150, 0.4);
}
.color-dot.active {
  box-shadow: 0 0 0 3px rgba(255, 46, 150, 0.7),
    0 0 15px rgba(255, 46, 150, 0.5);
  transform: scale(1.15);
}
.color-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.3s;
}
.color-dot:hover::after {
  opacity: 1;
}
@media (max-width: 768px) {
  .color-variants {
    justify-content: center;
    margin-top: 0.5rem;
  }
  .color-dot {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 768px) {
  .product-info {
    padding: 1rem 0.8rem 0.8rem !important;
  }
  .product-info h3 {
    font-size: 0.95rem !important;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .current-price {
    font-size: 1.3rem !important;
    font-weight: 700;
  }
  .old-price {
    font-size: 1rem !important;
  }
  .color-variants {
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.6rem;
  }
  .color-dot {
    width: 20px !important;
    height: 20px !important;
  }
  .add-to-cart {
    padding: 0.6rem 0.8rem !important;
    font-size: 0.88rem !important;
    margin-top: 0.8rem;
  }
  .badge {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
    top: 10px !important;
    left: 10px !important;
  }
}
.categories-section {
  padding: 5rem 2rem;
  background: var(--bg);
}
.categories-section .container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.categories-section .section-title {
  font-size: 2.8rem;
  margin-bottom: 3rem;
}

.categories-section {
  padding: 5.5rem 2rem;
  background: var(--bg);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
}

/* Big landscape tile */
.category-tile {
  position: relative;
  display: block;
  border-radius: 22px;
  overflow: hidden;
  min-height: 220px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.04);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-inner);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 768px) {
  .category-tile {
    min-height: 190px;
  }
}

/* Overlay for readability */
.category-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 10, 10, 0.88) 0%,
    rgba(10, 10, 10, 0.45) 55%,
    rgba(10, 10, 10, 0.15) 100%
  );
}

/* Content */
.category-tile__content {
  position: relative;
  z-index: 2;
  padding: 1.4rem 1.4rem;
  max-width: 75%;
}

.category-tile__title {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.2px;
  margin-bottom: 0.45rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.category-tile__sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

/* Arrow pill */
.category-tile__arrow {
  position: absolute;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 46, 150, 0.25);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}

/* Hover effects */
.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-outer);
}

.category-tile:hover .category-tile__arrow {
  transform: scale(1.08);
  background: rgba(255, 46, 150, 0.18);
}

/* CTA under categories */
.categories-cta {
  display: block;
  width: 280px;
  margin: 3rem auto 0;
  padding: 1rem 1.8rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.categories-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 46, 150, 0.45);
}

/* Search suggestions (desktop + mobile) */

.search-suggestions {
  background: rgba(16, 16, 16, 0.98);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  padding: 0.25rem 0;
  max-height: 320px;
  overflow-y: auto;
  z-index: 110;
  display: none;
}

/* Desktop position: under header search */
.site-header .search-suggestions {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 90vw);
}

/* Mobile sidebar position: just flows below input */
#mobile-menu .search-suggestions {
  position: static;
  transform: none;
  width: 100%;
  box-shadow: none;
  margin-top: 0.5rem;
}

.search-suggestions.open {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
  direction: rtl;
}

.search-suggestion-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-suggestion-thumb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.search-suggestion-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.search-suggestion-name {
  font-size: 0.9rem;
}

.search-suggestion-category {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Mobile categories tree small tweak */
#mobile-categories-tree .category-children {
  margin-right: 1rem;
  border-right: 1px dashed rgba(255, 255, 255, 0.08);
  padding-right: 0.7rem;
}

/* Mobile categories tree container */
#mobile-categories-tree,
.categories-tree {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  max-height: calc(100vh - 220px); /* prevent overflowing below screen */
  overflow-y: auto;
  padding-inline-end: 12px; /* space so scrollbar doesn't sit on top of icons */
}

/* nice skinny scrollbar */
#mobile-categories-tree::-webkit-scrollbar {
  width: 4px;
}
#mobile-categories-tree::-webkit-scrollbar-track {
  background: transparent;
}
#mobile-categories-tree::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* each node */
.cat-node {
  margin-bottom: 0.15rem;
}

/* header row – nav-like item */
.category-node-header {
  display: flex;
  flex-direction: row-reverse; /* RTL: icon on the left, text on the right */
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.16s ease;
}

.category-node-header:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-2px);
}

.category-node-header .cat-title {
  font-size: 0.85rem;
}

/* chevron icon */
.category-node-header .toggle-children {
  font-size: 0.75rem;
  color: #ccc;
  transition: transform 0.2s ease, color 0.2s ease;
}

.category-node-header .toggle-children.open {
  transform: rotate(180deg);
  color: #fff;
}

/* children list – animated expand/collapse */
.category-children {
  list-style: none;
  margin: 0.15rem 0 0.15rem 0;
  padding: 0 0.85rem 0 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-right: 1px dashed rgba(255, 255, 255, 0.12);
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.category-children.open {
  max-height: 600px; /* enough for a few levels */
  opacity: 1;
}

.menu-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
}

.menu-search-wrapper .menu-search::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

/* the magnifier inside the input */
.menu-search-wrapper > i.fa-search {
  position: absolute;
  left: 0.9rem; /* for RTL, right side is correct */
  top: 50%;
  transform: translateY(50%);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none; /* click still focuses input */
}

/* ===== Products Page Layout ===== */

.products-page {
  padding: 2rem 0 3rem;
}

.products-layout {
  display: grid;
  grid-template-columns: clamp(240px, 22vw, 320px) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

/* Filters panel (desktop) */
.filters-panel {
  background: #111;
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Filters header (mainly for mobile, but styled for all) */
.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.75rem;
}

.filters-header span {
  font-weight: 600;
  font-size: 1.05rem;
}

#filters-toggle-icon {
  transition: transform 0.25s ease;
}

/* Collapsible body */
.filters-body {
  margin-top: 0.75rem;
}

/* Basic filter blocks */
.filter-block {
  margin-bottom: 1.25rem;
}

.filter-label {
  display: block;
  font-size: 0.9rem;
  color: #bbb;
  margin-bottom: 0.35rem;
}

.filter-input,
.filter-select {
  width: 100%;
  background: #181818;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.55rem 0.9rem;
  color: #f5f5f5;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-input::placeholder {
  color: #666;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--accent, #ff2e96);
  background: #151515;
}

/* Category checkboxes */
.filter-categories {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.filter-check:hover {
  background: rgba(255, 255, 255, 0.04);
}

.filter-check input[type="checkbox"] {
  accent-color: var(--accent, #ff2e96);
}

.filter-check span {
  flex: 1;
}

.filter-hint {
  display: block;
  font-size: 0.75rem;
  color: #777;
  margin-top: 0.25rem;
}

/* Products section */
.products-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.products-title {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.products-subtitle {
  font-size: 0.9rem;
  color: #aaa;
}

/* Pagination */
.pagination-wrapper {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.pager-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111;
  color: #f5f5f5;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.pager-btn:hover:not(:disabled) {
  background: var(--accent, #ff2e96);
  transform: translateY(-1px);
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pager-info {
  font-size: 0.85rem;
  color: #aaa;
}

/* Mobile layout */
@media (max-width: 768px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .filters-panel {
    position: static;
    max-height: none;
    margin-top: 1rem;
  }

  .products-section {
    padding-top: 1rem !important;
  }

  /* Start collapsed on mobile */
  .filters-panel.collapsed #filters-body {
    display: none;
  }

  .filters-panel.collapsed #filters-toggle-icon {
    transform: rotate(0deg);
  }

  .products-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Hierarchical category tree in filters */
.filter-categories {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.filter-cat-node {
  margin: 0.1rem 0;
}

.filter-cat-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.filter-cat-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.filter-cat-toggle {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #aaa;
}

.filter-cat-toggle.empty {
  opacity: 0;
  pointer-events: none;
}

.filter-cat-checkbox {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-cat-children {
  margin-right: 1.6rem;
  margin-top: 0.1rem;
  padding-right: 0.4rem;
  border-right: 1px dashed rgba(255, 255, 255, 0.08);
  display: none;
}

.filter-cat-node.open > .filter-cat-children {
  display: block;
}

@media (max-width: 768px) {
  .products-page {
    padding-top: 4.5rem; /* adjust if your header height is different */
  }
}

/* Hide filters chevron icon on desktop */
#filters-toggle-icon {
  display: none;
}

@media (max-width: 768px) {
  #filters-toggle-icon {
    display: inline-flex;
    transform: rotate(180deg);
  }
}

/* ---------- Single product page layout ---------- */

.product-page {
  padding: 7rem 1rem 3rem 1rem; /* clears fixed header */
  background: var(--bg, #0b0b10);
  color: var(--text, #f2f2f6);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem;
  align-items: start;
}

#product-code {
  display: none;
}

@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ---- Shared surface ---- */
.product-gallery,
.product-info-main,
.product-description {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.1rem;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

/* ---- Gallery ---- */
.product-gallery {
  padding: 1.1rem;
}

.product-main-image {
  border-radius: 0.95rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

.product-main-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

@media (max-width: 600px) {
  .product-main-image img {
    height: 360px;
  }
}

.product-thumbs {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.product-thumb {
  width: 88px;
  aspect-ratio: 3 / 5;
  height: auto;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 105, 180, 0.55);
  box-shadow: 0 8px 18px rgba(255, 105, 180, 0.1);
}

.product-thumb.active {
  border-color: rgba(255, 105, 180, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.15);
}

/* ---- Info column ---- */
.product-info-main {
  padding: 1.35rem 1.35rem 1.6rem;
}

.product-header-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.product-title-wrap h1 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  letter-spacing: -0.2px;
  color: rgba(255, 255, 255, 0.95);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.product-meta-pill {
  font-size: 0.78rem;
  padding: 0.16rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.2);
}

.product-badge {
  min-width: 70px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.95),
    rgba(255, 105, 180, 0.65)
  );
  color: #0b0b10;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(255, 105, 180, 0.18);
}

/* ---- Rating ---- */
.product-rating-row {
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.rating-stars i {
  color: rgba(255, 190, 80, 0.95);
  font-size: 0.92rem;
}

.rating-text {
  font-size: 0.82rem;
}

/* ---- Price ---- */
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.product-price-main {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.product-price-old {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
}

/* ---- Variants ---- */
.product-variants {
  margin-top: 0.2rem;
  margin-bottom: 1.2rem;
}

.variant-group {
  margin-bottom: 0.95rem;
}

.variant-label {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Colors */
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  outline: none;
  background-clip: padding-box;
  transition: transform 0.12s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
  position: relative;
}

.color-swatch:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 105, 180, 0.55);
  box-shadow: 0 10px 20px rgba(255, 105, 180, 0.1);
}

.color-swatch.selected {
  border-color: rgba(255, 105, 180, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.12);
}

.color-swatch.selected::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.35);
  mix-blend-mode: soft-light;
}

/* Sizes */
.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.size-chip {
  min-width: 52px;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.size-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 105, 180, 0.55);
}

.size-chip.selected {
  background: rgba(255, 105, 180, 0.22);
  border-color: rgba(255, 105, 180, 0.85);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(255, 105, 180, 0.1);
}

.size-empty {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Stock & qty */
.stock-row {
  font-size: 0.82rem;
  margin: 0.2rem 0 0.65rem;
  color: rgba(255, 255, 255, 0.72);
}

.stock-available {
  color: rgba(120, 255, 175, 0.9);
}

.stock-out {
  color: rgba(255, 130, 130, 0.9);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
}

.qty-input {
  width: 86px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.92);
  padding: 0.28rem 0.7rem;
  text-align: center;
  outline: none;
}

.qty-input:focus {
  border-color: rgba(255, 105, 180, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.12);
}

/* Actions */
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
}

.primary-btn,
.ghost-btn {
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}

.primary-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.95),
    rgba(255, 105, 180, 0.7)
  );
  color: #0b0b10;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(255, 105, 180, 0.18);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(255, 105, 180, 0.22);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ghost-btn {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 105, 180, 0.55);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.product-small-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.58);
}

/* Description */
.product-description {
  margin: 1rem 0;
  padding: 1.35rem;
}

.product-description h2 {
  font-size: 1.05rem;
  margin: 0 0 0.8rem;
  color: rgba(255, 255, 255, 0.92);
}

.product-description p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.9;
}

/* =========================
   CART PAGE (dark + pink)
========================= */

.cart-page {
  min-height: calc(100vh - 140px);
  padding: 7rem 1rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.cart-title {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.3px;
}

.cart-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cart-clear {
  border: 1px solid rgba(255, 105, 180, 0.35);
  background: rgba(255, 105, 180, 0.08);
  color: var(--text, #f3f3f3);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border 0.12s ease;
}
.cart-clear:hover {
  background: rgba(255, 105, 180, 0.14);
  transform: translateY(-1px);
}

.cart-loading {
  color: var(--text-muted, #b7b7b7);
  padding: 1.25rem 0.25rem;
  text-align: center;
}

.cart-empty {
  border: 1px solid rgba(255, 105, 180, 0.18);
  background: rgba(20, 20, 25, 0.65);
  border-radius: 18px;
  padding: 2rem 1.25rem;
  text-align: center;
}
.cart-empty-icon {
  font-size: 2.2rem;
  opacity: 0.9;
  margin-bottom: 0.8rem;
  color: rgba(255, 105, 180, 0.9);
}
.cart-empty-text {
  color: var(--text, #f3f3f3);
  margin-bottom: 1rem;
}
.cart-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 14px;
  padding: 0.75rem 1.1rem;
  background: rgba(255, 105, 180, 0.18);
  border: 1px solid rgba(255, 105, 180, 0.4);
  color: var(--text, #f3f3f3);
  text-decoration: none;
}
.cart-empty-btn:hover {
  background: rgba(255, 105, 180, 0.24);
}

.hidden {
  display: none !important;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cart-item {
  position: relative;
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 1rem;

  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 18, 22, 0.82);

  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.cart-item-media {
  width: 118px;
  height: 118px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 1px solid rgba(255, 255, 255, 0.06); /* RTL: separator */
}

.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-main {
  padding: 0.95rem 1rem 0.95rem 1rem; /* real consistent padding */
  display: flex;
  flex-direction: column;
  min-width: 0; /* prevents weird overflow on long names */
}

.cart-item-top {
  display: block; /* remove spacing weirdness */
  padding-left: 2.4rem; /* reserve space so name doesn't go under delete */
}

.cart-item-name {
  color: var(--text, #f3f3f3);
  font-weight: 800;
  line-height: 1.35;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-remove {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;

  width: 36px;
  height: 36px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.82);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}

.cart-item-remove:hover {
  color: rgba(255, 105, 180, 0.98);
  background: rgba(255, 105, 180, 0.12);
  border-color: rgba(255, 105, 180, 0.28);
  transform: translateY(-1px);
}

.cart-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-item-variant {
  color: var(--text-muted, #b7b7b7);
  font-size: 0.92rem;
}

.cart-item-variant {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-muted, #b7b7b7);
}

/* color dot */
.cart-item-variant::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--variant-color, transparent);
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* fallback when no color exists */
.cart-item-variant[data-color=""]::before {
  display: none;
}

.cart-item-link {
  color: rgba(255, 105, 180, 0.95);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}
.cart-item-link:hover {
  text-decoration: underline;
}

.cart-item-bottom {
  display: flex;
  align-items: center; /* was end */
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto; /* pushes bottom row down nicely */
  padding-top: 0.7rem;
}

.cart-item-price .unit {
  color: var(--text-muted, #b7b7b7);
  font-size: 0.92rem;
}
.cart-item-price .sub {
  margin-top: 0.25rem;
  color: var(--text, #f3f3f3);
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 105, 180, 0.22);
  background: rgba(255, 105, 180, 0.08);
  border-radius: 14px;
  padding: 0.35rem;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text, #f3f3f3);
  background: rgba(255, 255, 255, 0.06);
}
.qty-btn:hover {
  background: rgba(255, 105, 180, 0.18);
}

.qty-input {
  width: 54px;
  height: 34px;
  border: 0;
  outline: none;
  border-radius: 12px;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text, #f3f3f3);
}

/* Summary */
.cart-summary .summary-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 105, 180, 0.18);
  background: rgba(18, 18, 22, 0.78);
  padding: 1.15rem;
  position: sticky;
  top: 1.2rem;
}

.summary-title {
  color: var(--text, #f3f3f3);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  color: var(--text, #f3f3f3);
}

.summary-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.8rem 0;
}

.summary-cta {
  width: 100%;
  display: flex; /* IMPORTANT */
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  appearance: none; /* IMPORTANT */
  -webkit-appearance: none;
  font: inherit; /* IMPORTANT */
  line-height: 1.2; /* IMPORTANT */

  border: 0;
  cursor: pointer;
  border-radius: 14px; /* match secondary */
  padding: 0.9rem 1rem;

  color: var(--text, #f3f3f3);
  background: rgba(255, 105, 180, 0.22);
  border: 1px solid rgba(255, 105, 180, 0.45);

  transition: transform 0.12s ease, background 0.12s ease;
}

.summary-cta:hover {
  background: rgba(255, 105, 180, 0.28);
  transform: translateY(-1px);
}

.summary-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  margin-top: 0.8rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;

  font-size: 0.95rem; /* subtle de-emphasis */
  opacity: 0.92; /* subtle de-emphasis */

  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;

  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}

.summary-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.summary-hint {
  margin-top: 0.8rem;
  color: var(--text-muted, #b7b7b7);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 980px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .cart-item {
    grid-template-columns: 118px 1fr;
  }
  .cart-item-media {
    width: 96px;
    height: 96px;
  }
  .cart-item-main {
    padding: 0.8rem 0.8rem 0.85rem 0;
  }
}

/* button success state */
#add-to-cart-main.added {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 105, 180, 0.35),
    0 12px 30px rgba(255, 105, 180, 0.18);
}

/* badge pop animation */
.cart-badge-pop {
  animation: cartPop 0.45s ease;
}
@keyframes cartPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 15, 18, 0.92);
  border: 1px solid rgba(255, 105, 180, 0.35);
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.toast.show {
  animation: toastInOut 2.2s ease forwards;
}

@keyframes toastInOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
  12% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
}

/* =========================
   Checkout Page (dark + pink)
   ========================= */

.checkout-page {
  padding: 7rem 1rem 3rem 1rem;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.2rem;
  padding: 1.25rem 0 2rem;
}

@media (max-width: 980px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-summary .summary-card {
    position: static;
  }
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.checkout-title {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.3px;
}

.checkout-back {
  color: rgba(255, 105, 180, 0.95);
  text-decoration: none;
  border: 1px solid rgba(255, 105, 180, 0.25);
  background: rgba(255, 105, 180, 0.08);
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.12s ease, background 0.12s ease, border 0.12s ease;
}
.checkout-back:hover {
  background: rgba(255, 105, 180, 0.14);
  transform: translateY(-1px);
}

.checkout-loading {
  color: var(--text-muted, #b7b7b7);
  padding: 1.25rem 0.25rem;
  text-align: center;
}

.checkout-error {
  border: 1px solid rgba(255, 105, 180, 0.25);
  background: rgba(255, 105, 180, 0.08);
  color: var(--text, #f3f3f3);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.checkout-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 105, 180, 0.18);
  background: rgba(18, 18, 22, 0.78);
  padding: 1.15rem;
}

.checkout-card-title {
  color: var(--text, #f3f3f3);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  color: var(--text, #f3f3f3);
  margin-bottom: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text, #f3f3f3);
  padding: 0.8rem 0.9rem;
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(255, 105, 180, 0.35);
  background: rgba(0, 0, 0, 0.3);
}

.field-hint {
  margin-top: 0.4rem;
  color: var(--text-muted, #b7b7b7);
  font-size: 0.85rem;
  line-height: 1.5;
}

.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pay-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.pay-radio input {
  display: none;
}

.pay-pill {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f3f3f3);
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}

.pay-radio input:checked + .pay-pill {
  border-color: rgba(255, 105, 180, 0.45);
  background: rgba(255, 105, 180, 0.16);
  transform: translateY(-1px);
}

.checkout-actions {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.checkout-cta {
  width: 100%;
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  color: var(--text, #f3f3f3);
  background: rgba(255, 105, 180, 0.22);
  border: 1px solid rgba(255, 105, 180, 0.45);
  transition: transform 0.12s ease, background 0.12s ease;
}
.checkout-cta:hover {
  background: rgba(255, 105, 180, 0.28);
  transform: translateY(-1px);
}
.checkout-cta:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.checkout-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}
.checkout-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.checkout-note {
  margin-top: 0.85rem;
  color: var(--text-muted, #b7b7b7);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Right mini list */
.checkout-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mini-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.mini-media {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
.mini-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-name {
  color: var(--text, #f3f3f3);
  font-weight: 700;
  line-height: 1.35;
  font-size: 0.95rem;
}

.mini-meta {
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted, #b7b7b7);
  font-size: 0.85rem;
}

.mini-more,
.mini-empty {
  color: var(--text-muted, #b7b7b7);
  font-size: 0.9rem;
  padding: 0.4rem 0.2rem 0;
}

/* ===== User Orders ===== */
.order-page {
  padding-top: 7rem;
  padding-bottom: 2rem;
  margin: 0 1rem;
}

.orders-layout {
  padding-top: 7rem;
  padding-bottom: 2rem;
  margin: 0 1rem;
}
.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.orders-title {
  margin: 0;
  font-size: 1.55rem;
}
.orders-back {
  color: rgba(255, 105, 180, 0.95);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.orders-back:hover {
  text-decoration: underline;
}

.orders-loading {
  color: var(--text-muted, #b7b7b7);
  padding: 1.25rem 0;
  text-align: center;
}
.orders-error {
  border: 1px solid rgba(255, 105, 180, 0.22);
  background: rgba(255, 105, 180, 0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin: 0.75rem 0;
}
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.order-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(18, 18, 22, 0.78);
  padding: 1rem;
}
.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.order-id {
  font-weight: 800;
  color: var(--text, #f3f3f3);
}
.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.7rem;
  color: var(--text-muted, #b7b7b7);
  font-size: 0.95rem;
}
.order-meta i {
  opacity: 0.9;
  margin-left: 0.25rem;
}

.order-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: flex-end;
}
.order-link {
  color: rgba(255, 105, 180, 0.95);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.order-link:hover {
  text-decoration: underline;
}

.order-status {
  font-size: 0.86rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f3f3f3);
  white-space: nowrap;
}
.order-status.st-paid {
  border-color: rgba(46, 204, 113, 0.35);
  background: rgba(46, 204, 113, 0.12);
}
.order-status.st-pending {
  border-color: rgba(241, 196, 15, 0.35);
  background: rgba(241, 196, 15, 0.1);
}
.order-status.st-cancelled,
.order-status.st-failed {
  border-color: rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.1);
}
.order-status.st-processing {
  border-color: rgba(52, 152, 219, 0.35);
  background: rgba(52, 152, 219, 0.1);
}
.order-status.st-delivered,
.order-status.st-completed {
  border-color: rgba(155, 89, 182, 0.35);
  background: rgba(155, 89, 182, 0.1);
}

.orders-empty {
  border: 1px solid rgba(255, 105, 180, 0.18);
  background: rgba(20, 20, 25, 0.65);
  border-radius: 18px;
  padding: 2rem 1.25rem;
  text-align: center;
}
.orders-empty-icon {
  font-size: 2.2rem;
  color: rgba(255, 105, 180, 0.9);
  margin-bottom: 0.7rem;
}
.orders-empty-text {
  margin-bottom: 1rem;
}

/* ===== Order Details ===== */
.order-details-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(18, 18, 22, 0.78);
  padding: 1.1rem;
}
.order-header {
  margin-bottom: 3rem;
}

.order-details-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.order-details-meta {
  color: var(--text-muted, #b7b7b7);
  line-height: 1.7;
}

.order-cancel-btn {
  border: 1px solid rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.1);
  color: var(--text, #f3f3f3);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
}
.order-cancel-btn:hover {
  background: rgba(231, 76, 60, 0.14);
  transform: translateY(-1px);
}

.order-ship {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.ship-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text, #f3f3f3);
}
.ship-row span:first-child {
  color: var(--text-muted, #b7b7b7);
}

.order-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.order-item-row {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 0.85rem;
}
.oi-name {
  font-weight: 800;
  color: var(--text, #f3f3f3);
}
.oi-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
}
.oi-qty {
  color: var(--text-muted, #b7b7b7);
}
.oi-price {
  margin-top: 0.55rem;
  color: var(--text, #f3f3f3);
}
.order-total-row {
  display: flex;
  justify-content: space-between;
  color: var(--text, #f3f3f3);
  font-weight: 800;
}

/* ===== User Area ===== */
.user-layout {
  padding: 7rem 1rem 6rem 1rem;
}
.user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.user-title {
  margin: 0;
  font-size: 1.55rem;
}
.user-back {
  color: rgba(255, 105, 180, 0.95);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.user-back:hover {
  text-decoration: underline;
}

.user-loading {
  color: var(--text-muted, #b7b7b7);
  padding: 1.25rem 0;
  text-align: center;
}
.user-error {
  border: 1px solid rgba(255, 105, 180, 0.22);
  background: rgba(255, 105, 180, 0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin: 0.75rem 0;
}

.user-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(18, 18, 22, 0.78);
  padding: 1.1rem;
}
.user-card-title {
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text, #f3f3f3);
}

.user-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.user-phone {
  font-weight: 900;
  color: var(--text, #f3f3f3);
}
.user-email {
  color: var(--text-muted, #b7b7b7);
  margin-top: 0.25rem;
}

.user-logout {
  border: 1px solid rgba(255, 105, 180, 0.35);
  background: rgba(255, 105, 180, 0.08);
  color: var(--text, #f3f3f3);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
}
.user-logout:hover {
  background: rgba(255, 105, 180, 0.14);
  transform: translateY(-1px);
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.user-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 0.9rem;
  color: var(--text, #f3f3f3);
}
.user-action:hover {
  border-color: rgba(255, 105, 180, 0.25);
  background: rgba(255, 105, 180, 0.06);
  transform: translateY(-1px);
}
.ua-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 105, 180, 0.1);
  border: 1px solid rgba(255, 105, 180, 0.22);
  flex: 0 0 42px;
}
.ua-main {
  flex: 1;
}
.ua-title {
  font-weight: 900;
}
.ua-sub {
  color: var(--text-muted, #b7b7b7);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}
.ua-arrow {
  opacity: 0.8;
}

/* wishlist */

.wishlist-page {
  margin: 7rem 1rem 5rem 1rem;
}

/* final refinements */

/* =========================
   New Footer (Enamad-ready)
========================= */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.site-footer .footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.2rem;
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 0.9fr;
  gap: 1.5rem;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.footer-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.15s ease;
}
.footer-social a:hover {
  transform: translateY(-2px);
}

.footer-line {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.footer-line i {
  margin-top: 0.2rem;
  opacity: 0.85;
}

.footer-link {
  text-decoration: none;
  color: inherit;
}

.enamad-box {
  min-height: 120px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.9rem 1.2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .site-footer .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PRODUCTS — ONE unified grid + card for ALL pages
   Image ratio: 3:5 (portrait)
========================================================= */

/* Grid (used in index + products page) */
.products-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

/* Force a nice layout on very wide screens (optional) */
@media (min-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    padding: 0 0.8rem;
  }
}

/* IMPORTANT: make sure grid can stretch */
.products-grid {
  width: 100%;
}

/* Default (tablet-ish) */
.products-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Desktop */
@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Large desktop */
@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.products-layout > * {
  min-width: 0;
}

/* =========================
   PRODUCT CARD — FINAL OVERRIDE
   Image ratio: 4:5 (portrait)
   Goal: BIG image, compact info
========================= */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-inner);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-outer);
}

/* ✅ Image becomes the main content */
.product-card > img {
  width: 100% !important;
  aspect-ratio: 4 / 5 !important;
  height: auto !important;
  object-fit: cover !important;
  display: block !important;
}

/* ✅ Kill old overlay behavior completely */
.product-card .product-info {
  position: static !important;
  transform: none !important;
  background: none !important;

  padding: 0.75rem 0.9rem 0.9rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.4rem !important;
}

/* Title: compact */
.product-card .product-info h3 {
  margin: 0 !important;
  font-size: 0.98rem !important;
  line-height: 1.3 !important;

  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important; /* desktop: 1 line */
}

/* Price row: tighter */
.product-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.product-card .current-price {
  font-size: 1.08rem !important;
  font-weight: 800 !important;
  color: var(--accent) !important;
}

.product-card .old-price {
  font-size: 0.88rem !important;
  color: var(--text-muted) !important;
  text-decoration: line-through !important;
  opacity: 0.75;
}

/* Color dots: keep but prevent them from inflating height */
.product-card .color-variants {
  margin-top: 0.1rem !important;
  gap: 0.45rem !important;
  max-height: 30px;
}

/* Button: smaller so it doesn't dominate */
.product-card .add-to-cart {
  margin-top: 0.35rem !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.9rem !important;
  border-radius: 999px !important;
}

/* ✅ Mobile tuning: still clean, slightly more info room */
@media (max-width: 768px) {
  .product-card .product-info {
    padding: 0.65rem 0.7rem 0.75rem !important;
    gap: 0.35rem !important;
  }

  .product-card .product-info h3 {
    font-size: 0.92rem !important;
    -webkit-line-clamp: 2 !important; /* mobile: 2 lines */
  }

  .product-card .current-price {
    font-size: 1.02rem !important;
  }

  .product-card .old-price {
    font-size: 0.85rem !important;
  }

  .product-card .add-to-cart {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.86rem !important;
  }
}

/* ================================
   SINGLE PRODUCT — GALLERY FIX
   Goal: portrait, no crop, fit in viewport
   Mobile priority
================================ */

/* Make the gallery behave nicely */
.product-gallery {
  padding: 1.1rem;
}

/* Main image frame */
.product-main-image {
  /* keep your nice frame */
  border-radius: 0.95rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);

  /* NEW: controlled height */
  display: grid;
  place-items: center;

  /* Mobile-first sizing */
  aspect-ratio: 4 / 5; /* portrait frame */
  max-height: min(72vh, 560px); /* don’t exceed viewport */
}

/* Main image itself */
.product-main-image img {
  object-fit: contain !important; /* ✅ NO CROPPING */
  display: block;
  background: rgba(0, 0, 0, 0.15); /* subtle behind transparent edges */
}

/* Remove the old hard height that causes crop */
@media (max-width: 600px) {
  .product-main-image img {
    height: 100% !important; /* override your 360px */
  }
}

/* Desktop: keep gallery visible without scrolling */
@media (min-width: 901px) {
  .product-layout {
    align-items: start;
  }

  .product-gallery {
    position: sticky;
    top: 96px; /* header space */
    align-self: start;
  }

  .product-main-image {
    max-height: calc(100vh - 250px) !important; /* header + padding */
    aspect-ratio: 4 / 5; /* portrait stays consistent */
  }
}

/* Thumbnails: keep them cropped (looks better) */
.product-thumb img {
  object-fit: cover;
}

/* =========================
   Product Cards (Grid + Card)
   ========================= */

.products-section {
  padding: 7rem 0 3rem; /* header clearance + nicer spacing */
}

.products-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 3 cols */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 2 cols (mobile/tablet) */
@media (max-width: 820px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

/* 1 col (very small phones) */
@media (max-width: 420px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Card shell */
.product-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 46, 150, 0.25);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
}

/* Media area keeps ratio and prevents "tall tower" feeling by capping width behavior via grid */
.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5; /* YOUR REQUIRED RATIO */
  background: rgba(0, 0, 0, 0.22);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Subtle gradient for readability if we place anything on media later */
.product-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
  opacity: 0.55;
}

/* Compact info (this is what fixes huge text section on mobile) */
.product-info {
  padding: 0.9rem 0.95rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
}

/* Title clamp */
.product-info h3 {
  font-size: 0.98rem;
  line-height: 1.35;
  margin: 0;
  font-weight: 800;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Price + cart row */
.product-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.product-price {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.product-price .current-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
}

.product-price .old-price {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
}

/* Small add button (instead of a giant full-width button on mobile) */
.add-to-cart {
  width: auto;
  margin-top: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Keep variants compact */
.color-variants {
  margin-top: 0.15rem;
  gap: 0.45rem;
}

/* Smaller dots so they don't inflate card height */
.color-dot {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* Badge stays fine */
.badge {
  z-index: 5;
}

/* Mobile tightening */
@media (max-width: 820px) {
  .product-info {
    padding: 0.75rem 0.75rem 0.85rem;
    gap: 0.45rem;
  }

  .product-info h3 {
    font-size: 0.92rem;
  }

  .product-price .current-price {
    font-size: 1.05rem;
  }

  .add-to-cart {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }
}
