/* ===== Shop Hero ===== */
.shop-hero {
  padding: 130px 0 50px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3e2 50%, #f7f9fc 100%);
  text-align: center;
}

.shop-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 12px;
}

.shop-hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 550px;
  margin: 0 auto;
}

/* ===== Filters ===== */
.shop-filters {
  padding: 32px 0 0;
}

.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

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

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card {
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  height: 220px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image .placeholder-img {
  font-size: 4rem;
  color: #cbd5e1;
}

.product-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 6px;
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}

.product-card .description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.product-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--secondary);
}

.product-condition {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  background: #ecfdf5;
  color: #059669;
}

.product-condition.fair {
  background: #fef9c3;
  color: #a16207;
}

.paypal-button-container {
  min-height: 45px;
}

/* Sold out overlay */
.product-card.sold-out {
  opacity: 0.6;
}

.product-card.sold-out .sold-badge {
  display: block;
}

.sold-badge {
  display: none;
  background: #ef4444;
  color: #fff;
  text-align: center;
  padding: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* No products */
.no-products {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.no-products span {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

/* ===== Shop Info ===== */
.shop-info {
  padding: 60px 0 80px;
  background: var(--bg-alt);
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.info-card {
  text-align: center;
  padding: 32px 20px;
}

.info-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 6px;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Active nav link */
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== Product Detail Modal ===== */
.product-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.product-modal-overlay.visible {
  display: flex;
}

.product-modal {
  background: var(--bg);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Gallery */
.modal-gallery {
  padding: 32px;
  background: #f8fafc;
  border-radius: var(--radius) 0 0 var(--radius);
}

.gallery-main {
  position: relative;
  width: 100%;
  height: 320px;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-main .placeholder-gallery {
  font-size: 5rem;
  color: #cbd5e1;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.gallery-arrow:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}

.gallery-arrow.visible {
  display: flex;
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.gallery-thumb:hover {
  border-color: var(--primary);
}

.gallery-thumb.active {
  border-color: var(--primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modal Details */
.modal-details {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
}

.modal-details .product-category {
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.modal-details h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.modal-details .product-meta {
  margin-bottom: 20px;
}

.modal-details .product-price {
  font-size: 1.8rem;
}

.modal-description {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 28px;
  flex: 1;
}

.modal-buy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-buy .btn {
  text-align: center;
}

.btn-ebay {
  background: #0064d2;
  color: #fff;
  border-color: #0064d2;
}

.btn-ebay:hover {
  background: #004fb4;
  border-color: #004fb4;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .shop-hero {
    padding: 110px 0 40px;
  }

  .shop-hero h1 {
    font-size: 1.8rem;
  }

  .shop-hero p {
    font-size: 0.95rem;
  }

  .shop-filters {
    padding: 24px 0 0;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  .shop-products {
    padding: 28px 0 60px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
    gap: 20px;
  }

  .product-body {
    padding: 18px;
  }

  .product-card h3 {
    font-size: 1rem;
  }

  .product-price {
    font-size: 1.2rem;
  }

  .info-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .info-card {
    padding: 24px 16px;
  }

  .shop-info {
    padding: 40px 0 60px;
  }

  .product-modal-overlay {
    padding: 12px;
  }

  .product-modal {
    max-height: 95vh;
  }

  .modal-content {
    grid-template-columns: 1fr;
  }

  .modal-gallery {
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 16px;
  }

  .gallery-main {
    height: 220px;
  }

  .gallery-thumb {
    width: 52px;
    height: 52px;
  }

  .modal-details {
    padding: 20px;
  }

  .modal-details h2 {
    font-size: 1.2rem;
  }

  .modal-details .product-price {
    font-size: 1.5rem;
  }

  .modal-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .shop-hero h1 {
    font-size: 1.5rem;
  }

  .filter-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .gallery-main {
    height: 180px;
  }

  .modal-details {
    padding: 16px;
  }
}
