/* ── Shop Pages Shared CSS ── */

/* ── Banner ── */
.shop-banner {
  background: #1a0a2e;
  padding: 70px 40px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.shop-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 20% 50%, rgba(168, 85, 247, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 50%, rgba(219, 39, 119, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.shop-banner-content {
  position: relative;
  z-index: 1;
}

.banner-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c084fc;
  margin-bottom: 12px;
}

.shop-banner h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: white;
  margin-bottom: 14px;
}

.banner-sub {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Controls Bar ── */
.shop-controls-bar {
  background: white;
  border-bottom: 1px solid #f3e8ff;
  position: sticky;
  top: 85px; /* matches nav height */
  z-index: 90;
}

.shop-controls-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-count {
  font-size: 0.88rem;
  color: #7c5fa0;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-wrap label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4c1d95;
}

.sort-wrap select {
  border: 1.5px solid #e9d5ff;
  border-radius: 10px;
  padding: 8px 34px 8px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  color: #1e0a2e;
  background: #fdf4ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a855f7' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sort-wrap select:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* ── Shop Main ── */
.shop-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

/* ── Product Grid ── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 50px;
}

/* ── Product Card ── */
.shop-card {
  background: white;
  border: 1px solid #f3e8ff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(168, 85, 247, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: cardFadeIn 0.4s ease both;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.shop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(168, 85, 247, 0.16);
  border-color: #d8b4fe;
}

.shop-card .img-wrap {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.shop-card .img-wrap img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
  background: #f3e8ff;
}

/* Placeholder shimmer for empty images */
.shop-card .img-wrap img.placeholder-img {
  object-fit: none;
  background: linear-gradient(135deg, #f3e8ff 25%, #e9d5ff 50%, #f3e8ff 75%);
  background-size: 200% 200%;
  animation: shimmer 2s ease-in-out infinite;
}

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

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

.shop-card .img-wrap .zoom-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(107, 33, 168, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 1.8rem;
  color: white;
}

.shop-card:hover .img-wrap .zoom-icon { opacity: 1; }

/* Placeholder emoji tile */
.shop-card .img-placeholder {
  width: 100%;
  height: 210px;
  background: linear-gradient(135deg, #fdf4ff, #f3e8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  cursor: default;
  transition: background 0.3s ease;
}

.shop-card:hover .img-placeholder {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
}

.shop-card-body {
  padding: 14px 16px 16px;
}

.shop-card-body h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e0a2e;
  margin-bottom: 4px;
  line-height: 1.4;
}

.shop-card-body .card-sub {
  font-size: 0.78rem;
  color: #a78bca;
  margin-bottom: 10px;
}

.shop-card-body .card-price {
  font-size: 1rem;
  font-weight: 700;
  color: #0d9488;
  margin-bottom: 12px;
}

.shop-card-body .card-price .original {
  font-size: 0.8rem;
  color: #c4b5d4;
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

.shop-card-body button {
  width: 100%;
  padding: 11px;
  background: #c026d3;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

.shop-card-body button:hover {
  background: #a21caf;
}

.shop-card-body button:active {
  transform: scale(0.98);
}

/* Out of stock state */
.shop-card.out-of-stock .img-placeholder,
.shop-card.out-of-stock .img-wrap {
  opacity: 0.6;
}

.shop-card.out-of-stock .shop-card-body button {
  background: #d1c4e9;
  color: #7c5fa0;
  cursor: not-allowed;
}

.shop-card.out-of-stock .shop-card-body button:hover {
  background: #d1c4e9;
}

.out-of-stock-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.9);
  color: #7c5fa0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}

/* ── Load More ── */
.load-more-wrap {
  text-align: center;
  padding-top: 10px;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 44px;
  background: white;
  color: #6b21a8;
  border: 2px solid #d8b4fe;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
  margin-bottom: 14px;
}

.load-more-btn:hover {
  background: #6b21a8;
  border-color: #6b21a8;
  color: white;
  transform: translateY(-2px);
}

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

.load-more-btn.hidden { display: none; }

.load-more-hint {
  font-size: 0.82rem;
  color: #a78bca;
}

/* ── Progress Bar ── */
.load-progress {
  max-width: 240px;
  margin: 12px auto 0;
  height: 4px;
  background: #f3e8ff;
  border-radius: 99px;
  overflow: hidden;
}

.load-progress-fill {
  height: 100%;
  background: #a855f7;
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ── Mobile ── */
@media (max-width: 1024px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .shop-banner {
    padding: 50px 20px 40px;
  }

  .shop-controls-bar {
    top: 68px;
  }

  .shop-controls-inner {
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .shop-main {
    padding: 24px 16px 60px;
  }

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

  .shop-card .img-placeholder,
  .shop-card .img-wrap img {
    height: 170px;
  }
}

@media (max-width: 480px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}