/* ========== SHOP PAGE ========== */

/* Shop Hero */
.shop-hero {
  position: relative;
  padding: 120px 0 40px;
  overflow: hidden;
  text-align: center;
}
.shop-hero .flare { z-index: 0; }
.shop-hero .flare-1 {
  width: 500px; height: 500px;
  top: -100px; left: 20%;
}
.shop-hero .flare-2 {
  width: 400px; height: 400px;
  bottom: -100px; right: 10%;
}
.shop-hero-content {
  position: relative; z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}
.shop-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 50px;
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.shop-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1px;
  color: white;
  margin-bottom: 16px;
}
.shop-sub {
  font-size: 17px;
  color: var(--gray);
  line-height: 1.6;
}

/* Shop Controls */
.shop-controls-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 70px;
  background: rgba(10,10,18,0.92);
  backdrop-filter: blur(16px);
  z-index: 50;
}
.shop-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.shop-search {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}
.shop-search i {
  position: absolute;
  left: 16px;
  color: var(--gray2);
  font-size: 14px;
  pointer-events: none;
}
[dir="rtl"] .shop-search i { left: auto; right: 16px; }
.shop-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: 0.3s;
}
[dir="rtl"] .shop-search input { padding: 0 42px 0 16px; }
.shop-search input:focus { border-color: var(--red); }
.shop-search input::placeholder { color: var(--gray2); }

.shop-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shop-sort label {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}
.shop-sort select {
  height: 44px;
  padding: 0 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: 0.3s;
}
.shop-sort select:hover { border-color: var(--red); }
.shop-sort select option { background: var(--card); }

/* Category Pills */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  color: var(--gray);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.3s;
}
.cat-pill:hover {
  border-color: rgba(239,68,68,0.4);
  color: white;
}
.cat-pill.active {
  background: var(--gradient-btn);
  border-color: transparent;
  color: white;
}
.pill-count {
  padding: 2px 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.cat-pill.active .pill-count { background: rgba(0,0,0,0.25); }

.results-info {
  margin-top: 12px;
  font-size: 13px;
  color: var(--gray2);
}

/* Shop Products */
.shop-products-section { padding: 40px 0 80px; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  perspective: 1100px;
}
.sp-card.tilt { transform-style: preserve-3d; will-change: transform; }

/* ========== PREMIUM PRODUCT CARD ========== */
.sp-card {
  background: linear-gradient(145deg, #1a1a2e 0%, #141425 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.sp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), transparent);
  opacity: 0;
  transition: 0.4s;
  z-index: 2;
}

.sp-card:hover {
  transform: translateY(-8px);
  border-color: rgba(239,68,68,0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(239,68,68,0.1);
}

.sp-card:hover::before { opacity: 1; }

/* Image wrapper with aspect ratio */
.sp-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg3);
  display: block;
}

.sp-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,10,18,0.8) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  transition: opacity 0.4s;
}

.sp-card:hover .sp-img-wrap::after { opacity: 0.8; }

.sp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.sp-card:hover .sp-img { transform: scale(1.1); }

/* Badges - top left */
.sp-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
}
[dir="rtl"] .sp-badges { left: auto; right: 14px; }

.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: white;
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.sp-new { background: linear-gradient(135deg, #22c55e, #16a34a); }
.sp-hot { background: linear-gradient(135deg, #f97316, #ea580c); }
.sp-sale { background: linear-gradient(135deg, #ef4444, #dc2626); }
.sp-badge i { font-size: 9px; }

/* Category label floating on image */
.sp-cat-float {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
[dir="rtl"] .sp-cat-float { left: auto; right: 14px; }
.sp-cat-float i { color: var(--orange); font-size: 10px; }

/* Quick actions overlay */
.sp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
.sp-card:hover .sp-overlay { opacity: 1; }

.sp-action {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  color: var(--bg);
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
  transform: translateY(15px) scale(0.7);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.sp-card:hover .sp-action {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.sp-card:hover .sp-action:nth-child(1) { transition-delay: 0s; }
.sp-card:hover .sp-action:nth-child(2) { transition-delay: 0.07s; }
.sp-card:hover .sp-action:nth-child(3) { transition-delay: 0.14s; }

.sp-action:hover {
  background: var(--red);
  color: white;
  transform: translateY(-2px) scale(1.05) !important;
}

/* Wishlist active heart */
.sp-action.sp-heart[data-wishlist-id].active {
  background: var(--red) !important;
  color: white !important;
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}
.sp-action.sp-heart[data-wishlist-id].active i {
  animation: heartPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes heartPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Card body */
.sp-body {
  padding: 18px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sp-cat i { font-size: 11px; }

.sp-name {
  font-size: 15px;
  font-weight: 700;
  color: white;
  line-height: 1.35;
  min-height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.3s;
}
.sp-card:hover .sp-name { color: var(--orange); }

.sp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--gray2);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sp-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: white;
}
.sp-rating i { color: #f59e0b; font-size: 12px; }
.sp-sales {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sp-sales i {
  color: var(--orange);
  font-size: 11px;
}

.sp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.sp-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.sp-old {
  font-size: 12px;
  color: var(--gray2);
  text-decoration: line-through;
  font-weight: 500;
}
.sp-new-price {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(90deg, #ef4444, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.sp-buy {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-btn);
  color: white;
  border: none;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.sp-buy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}
.sp-buy:hover::before { transform: translateX(100%); }
.sp-buy:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(239,68,68,0.5);
}

/* Load more */
.shop-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* Empty state */
.shop-empty {
  text-align: center;
  padding: 80px 20px;
}
.shop-empty i {
  font-size: 56px;
  color: var(--gray2);
  margin-bottom: 20px;
}
.shop-empty h3 {
  font-size: 22px;
  color: white;
  margin-bottom: 8px;
}
.shop-empty p { color: var(--gray); }

/* Responsive */
@media (max-width: 1024px) {
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-title { font-size: 40px; }
}
@media (max-width: 768px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-title { font-size: 32px; }
  .shop-sub { font-size: 15px; }
  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .shop-sort { justify-content: space-between; }
  .sp-name { font-size: 14px; min-height: 36px; }
  .sp-img-wrap { height: 170px; }
}
@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; gap: 16px; }
  .shop-title { font-size: 26px; }
  .sp-img-wrap { height: 200px; }
}

/* Product SKU code */
.sp-code {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  margin: 4px 0 8px;
  font-family: 'Inter', monospace;
}

/* ========== QUICK VIEW MODAL ========== */
.qv-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 12, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.qv-overlay.open { opacity: 1; visibility: visible; }

.qv-modal {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: min(900px, 100%);
  max-height: 88vh;
  overflow: hidden;
  background: linear-gradient(145deg, #1a1a2e 0%, #141425 100%);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.qv-overlay.open .qv-modal { transform: translateY(0) scale(1); }

.qv-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s;
}
[dir="rtl"] .qv-close { right: auto; left: 14px; }
.qv-close:hover { background: var(--red); transform: rotate(90deg); }

.qv-media {
  position: relative;
  min-height: 260px;
  background: var(--bg3);
}
.qv-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qv-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
[dir="rtl"] .qv-badges { left: auto; right: 14px; }
.qv-cat-float {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  color: white;
  font-size: 11px;
  font-weight: 600;
}
[dir="rtl"] .qv-cat-float { left: auto; right: 14px; }
.qv-cat-float i { color: var(--orange); }

.qv-info {
  padding: 32px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.qv-name { font-size: 22px; font-weight: 800; color: white; line-height: 1.3; margin-bottom: 6px; }
.qv-code {
  align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 2px 8px; border-radius: 6px; margin-bottom: 14px;
  font-family: 'Inter', monospace;
}
.qv-meta { display: flex; gap: 18px; margin-bottom: 16px; font-size: 13px; color: var(--gray); }
.qv-meta i { color: var(--orange); margin-inline-end: 4px; }
.qv-rating i { color: #fbbf24; }
.qv-desc { font-size: 14px; line-height: 1.7; color: var(--gray); margin-bottom: 20px; }
.qv-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.qv-current { font-size: 28px; font-weight: 800; color: var(--orange); }
.qv-old { font-size: 16px; color: var(--gray2); text-decoration: line-through; }
.qv-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.qv-add { flex: 1; justify-content: center; }
.qv-wish {
  width: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  color: var(--gray);
  font-size: 16px;
  cursor: pointer;
  transition: 0.25s;
}
.qv-wish:hover { color: var(--red); border-color: rgba(239,68,68,0.4); }
.qv-wish.active { background: var(--red); color: white; border-color: var(--red); }
.qv-details {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  transition: 0.25s;
}
.qv-details:hover { color: var(--orange); gap: 12px; }

@media (max-width: 680px) {
  .qv-modal { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .qv-media { min-height: 200px; max-height: 240px; }
}
