/* ============================================
   SHOP PAGE STYLES - FIXED GRID LAYOUT
   Mobile-First Responsive Design
   ============================================ */

body {
  padding-top: 70px;
}

/* ============================================
   SHOP HEADER
   ============================================ */

.shop-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  color: white;
  padding: 40px 15px;
  text-align: center;
  margin-bottom: 30px;
}

.shop-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.shop-header p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* ============================================
   PRODUCTS SECTION - MOBILE FIRST
   ============================================ */

.products-section {
  padding: 20px 15px;
  max-width: 1920px;
  margin: 0 auto;
}

/* RESPONSIVE GRID - MOBILE FIRST */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

/* PRODUCT CARD */
.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.product-card:active {
  transform: scale(0.98);
}

/* Product Image */
.product-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background-color: #f5f5f5;
  overflow: hidden;
}

/* Product Info */
.product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: #333;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 30px;
}

/* Product Price */
.product-price {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.original-price {
  font-size: 0.75rem;
  color: #999;
  text-decoration: line-through;
}

.sale-price {
  font-size: 1rem;
  color: #E74C3C;
  font-weight: 700;
}

.product-discount {
  font-size: 0.7rem;
  background-color: #E74C3C;
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  font-weight: 700;
  margin-left: auto;
}

/* Scroll Animation */
.product-card.zoom-animate {
  opacity: 0;
  transform: scale(0.9);
}

.product-card.zoom-animate.in-view {
  opacity: 1;
  transform: scale(1);
  transition: all 0.6s ease;
}

/* ============================================
   TABLET BREAKPOINT - 768px
   ============================================ */

@media (min-width: 768px) {
  body {
    padding-top: 90px;
  }

  .shop-header {
    padding: 60px 30px;
    margin-bottom: 40px;
  }

  .shop-header h1 {
    font-size: 2.5rem;
  }

  .shop-header p {
    font-size: 1rem;
  }

  .products-section {
    padding: 30px;
  }

  /* 3-column grid on tablet */
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .product-card {
    min-height: 280px;
  }

  .product-image {
    height: 180px;
  }

  .product-info {
    padding: 15px;
  }

  .product-name {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .sale-price {
    font-size: 1.1rem;
  }
}

/* ============================================
   DESKTOP BREAKPOINT - 1024px
   ============================================ */

@media (min-width: 1024px) {
  .products-section {
    padding: 40px;
  }

  /* 4-column grid on desktop */
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
  }

  .product-card {
    min-height: 300px;
  }

  .product-image {
    height: 200px;
  }

  .product-info {
    padding: 18px;
  }

  .product-name {
    font-size: 0.95rem;
    min-height: 35px;
  }

  .sale-price {
    font-size: 1.15rem;
  }
}

/* ============================================
   LARGE DESKTOP - 1400px+
   ============================================ */

@media (min-width: 1400px) {
  /* 5-column grid on large screens */
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
  }

  .product-card {
    min-height: 320px;
  }

  .product-image {
    height: 220px;
  }
}

/* ============================================
   NO PRODUCTS MESSAGE
   ============================================ */

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.no-products p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #E74C3C;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   TOUCH-FRIENDLY OPTIMIZATION
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .product-card:hover {
    box-shadow: none;
    transform: none;
  }

  .product-card:active {
    background-color: #f9f9f9;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .shop-header {
    display: none;
  }

  .product-card {
    break-inside: avoid;
  }
}
