/* Noomarket design system — Premium Tech-Modernism */
:root {
  --nm-bg: #f7f9fb;
  --nm-primary: #000000;
  --nm-lime: #ceee93;
  --nm-lime-dim: #b3d17a;
  --nm-secondary: #4d661c;
  --nm-error: #ba1a1a;
  --nm-surface: #ffffff;
  --nm-muted: #45464d;
  --nm-outline: #c6c6cd;
  --font-display: "Vazirmatn", Tahoma, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--nm-bg);
}

.glass-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.glass-nav {
  background: rgba(247, 249, 251, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}

.rating-input {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  direction: ltr;
}

.rating-star-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.15rem;
  cursor: pointer;
  line-height: 1;
  border-radius: 0.35rem;
  transition: transform 0.15s ease;
}

.rating-star-btn:hover {
  transform: scale(1.12);
}

.rating-star-btn .material-symbols-outlined {
  font-size: 1.75rem;
  color: #d1d5db;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  transition: color 0.15s ease, font-variation-settings 0.15s ease;
}

.rating-star-btn.is-on .material-symbols-outlined {
  color: #eab308;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.btn-lime {
  background: var(--nm-lime);
  color: #131f00;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-lime:hover { background: var(--nm-lime-dim); }
.btn-lime:active { transform: scale(0.98); }

.btn-dark {
  background: var(--nm-primary);
  color: #fff;
  font-weight: 600;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.btn-dark:hover { opacity: 0.9; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fade-up 0.6s ease forwards;
}
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.animate-pulse-soft { animation: pulse-soft 2.4s ease-in-out infinite; }

.hero-kenburns {
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.countdown-box {
  background: #ba1a1a;
  color: #fff;
  min-width: 2rem;
  border-radius: 0.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cart-toast-enter { transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.cart-toast-enter-start { opacity: 0; transform: translateY(-1.25rem) scale(0.96); }
.cart-toast-enter-end { opacity: 1; transform: translateY(0) scale(1); }
.cart-toast-leave { transition: all 0.25s ease-in; }
.cart-toast-leave-start { opacity: 1; transform: translateY(0); }
.cart-toast-leave-end { opacity: 0; transform: translateY(-0.75rem); }

@keyframes cart-count-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.cart-count-pop {
  animation: cart-count-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

[x-cloak] { display: none !important; }

.product-zoom-backdrop {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(206, 238, 147, 0.18), transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(190, 198, 224, 0.22), transparent 40%),
    rgba(247, 249, 251, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.product-zoom-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.75rem;
  box-shadow:
    0 24px 60px rgba(25, 28, 30, 0.12),
    0 2px 8px rgba(25, 28, 30, 0.04);
}

.product-zoom-tool {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nm-muted);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.product-zoom-tool:hover {
  background: rgba(230, 232, 234, 0.9);
  color: var(--nm-primary);
}

.product-zoom-tool:active {
  transform: scale(0.95);
}

.product-zoom-close {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 232, 234, 0.85);
  color: var(--nm-primary);
  transition: background 0.15s ease, transform 0.15s ease;
}

.product-zoom-close:hover {
  background: #e0e3e5;
}

.product-zoom-close:active {
  transform: scale(0.95);
}

.product-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  color: var(--nm-primary);
  transition: background 0.15s ease, transform 0.15s ease;
}

.product-zoom-nav:hover {
  background: #fff;
}

.product-zoom-nav:active {
  transform: translateY(-50%) scale(0.96);
}

.product-zoom-image {
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.trust-seal-card {
  display: block;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(198, 198, 205, 0.35);
}

.categories-hero {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.category-tile {
  --cat-accent: #4d661c;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 9.5rem;
  padding: 1rem;
  border-radius: 1.35rem;
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--cat-accent) 18%, white) 0%,
      color-mix(in srgb, var(--cat-accent) 8%, white) 48%,
      rgba(255, 255, 255, 0.78) 100%
    );
  border: 1px solid color-mix(in srgb, var(--cat-accent) 22%, white);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--cat-accent) 10%, transparent);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset-inline-end: -1.5rem;
  inset-block-start: -1.5rem;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-accent) 16%, transparent);
  pointer-events: none;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--cat-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--cat-accent) 36%, white);
}

.category-tile:focus-visible {
  outline: 2px solid var(--nm-lime);
  outline-offset: 3px;
}

.category-tile-icon {
  position: relative;
  z-index: 1;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cat-accent) 14%, white);
  border: 1px solid color-mix(in srgb, var(--cat-accent) 20%, white);
  transition: transform 0.2s ease;
}

.category-tile:hover .category-tile-icon {
  transform: scale(1.06);
}

.category-tile-count {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-accent) 16%, white);
  color: color-mix(in srgb, var(--cat-accent) 72%, #191c1e);
}

.category-tile-arrow {
  position: absolute;
  inset-inline-start: 0.85rem;
  inset-block-end: 0.85rem;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--nm-primary);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-tile:hover .category-tile-arrow {
  background: var(--nm-lime);
  color: #131f00;
  transform: translateX(-2px);
}

@media (min-width: 768px) {
  .category-tile {
    min-height: 11.5rem;
    padding: 1.35rem;
    border-radius: 1.6rem;
    gap: 1rem;
  }

  .category-tile-icon {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 1.1rem;
  }

  .category-tile-arrow {
    width: 2.35rem;
    height: 2.35rem;
    inset-inline-start: 1.1rem;
    inset-block-end: 1.1rem;
  }
}

@media (max-width: 767px) {
  body { padding-bottom: 4.5rem; }
  .product-zoom-panel {
    border-radius: 1.25rem;
    max-height: 94vh;
  }
}
