/* ===================================
   Shopping Section Styles
   =================================== */

/* Cart Icon in Header */
.cart-icon-wrapper {
  position: relative;
  margin-left: 20px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.cart-icon-wrapper:hover {
  transform: scale(1.1);
}

.cart-icon {
  font-size: 24px;
  color: #0d2735;
  position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #d93636 0%, red 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Shopping Section */
.shopping-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
}

.shopping-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.shopping-section .container {
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 42px;
  font-weight: 700;
  color: #0d2735;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 18px;
  color: #5a6c7d;
  max-width: 600px;
  margin: 0 auto;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 50px;
  padding: 0 15px;
}

.category-btn {
  padding: 12px 30px;
  border: 2px solid transparent;
  background: white;
  color: #5a6c7d;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: left 0.3s ease;
  z-index: -1;
}

.category-btn:hover::before,
.category-btn.active::before {
  left: 0;
}

.category-btn:hover,
.category-btn.active {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

/* Product Actions */
.product-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.action-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.action-btn i {
  font-size: 20px;
  color: #5a6c7d;
  transition: color 0.3s ease;
}

.action-btn.favorite-btn.active i,
.action-btn.favorite-btn:hover i {
  color: #ff6b6b;
}

.action-btn.cart-btn:hover i {
  color: #667eea;
}

/* Product Badge */
.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Product Info */
.product-info {
  padding: 25px;
}

/* Product Measure Selector */
.product-measure-selector {
  margin: 15px 0;
  padding: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border: 2px solid #e0e6ed;
}

.product-measure-label {
  font-size: 12px;
  color: #667eea;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.product-measure-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-measure-option {
  position: relative;
}

.product-measure-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.product-measure-option-label {
  display: inline-block;
  padding: 6px 12px;
  background: white;
  border: 2px solid #e0e6ed;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  color: #5a6c7d;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.product-measure-option-label:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.product-measure-option input[type="radio"]:checked + .product-measure-option-label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

.product-measure-option input[type="radio"]:checked + .product-measure-option-label::after {
  content: '✓';
  margin-left: 4px;
  font-weight: bold;
}

.product-category {
  font-size: 12px;
  color: #667eea;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product-name {
  font-size: 20px;
  font-weight: 700;
  color: #0d2735;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 14px;
  color: #5a6c7d;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 2px solid #f5f7fa;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-rating i {
  color: #ffd700;
  font-size: 14px;
}

.rating-count {
  font-size: 13px;
  color: #5a6c7d;
  margin-left: 5px;
}

.add-to-cart-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn i {
  font-size: 16px;
}

/* See All Button */
.see-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.see-all-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transition: left 0.3s ease;
  z-index: -1;
}

.see-all-btn:hover::before {
  left: 0;
}

.see-all-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
  color: white;
}

.see-all-btn i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.see-all-btn:hover i {
  transform: translateX(5px);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 80px;
  color: #c3cfe2;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 24px;
  color: #5a6c7d;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 16px;
  color: #8b9aa8;
}

/* Loading Animation */
.loading {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f5f7fa;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification Toast */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: white;
  padding: 20px 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 9999;
  animation: slideIn 0.3s ease;
  max-width: 350px;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-notification.slide-out {
  animation: slideOut 0.3s ease;
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon.success {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toast-icon i {
  color: white;
  font-size: 20px;
}

.toast-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0d2735;
  margin: 0 0 5px 0;
}

.toast-content p {
  font-size: 14px;
  color: #5a6c7d;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 992px) {
  .section-header h2 {
    font-size: 36px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
  
  .product-image-wrapper {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .shopping-section {
    padding: 60px 0;
  }
  
  .section-header h2 {
    font-size: 32px;
  }
  
  .section-header p {
    font-size: 16px;
  }
  
  .category-tabs {
    gap: 10px;
    margin-bottom: 40px;
  }
  
  .category-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .product-image-wrapper {
    height: 220px;
  }
  
  .product-info {
    padding: 20px;
  }
  
  .product-name {
    font-size: 18px;
  }
  
  .toast-notification {
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
  }
}

@media (max-width: 576px) {
  .section-header h2 {
    font-size: 28px;
  }
  
  .category-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }
  
  .category-btn {
    flex-shrink: 0;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .product-image-wrapper {
    height: 250px;
  }
  
  .product-actions {
    opacity: 1;
    transform: translateX(0);
  }
  
  .cart-icon-wrapper {
    margin-left: 15px;
  }
  
  .cart-icon {
    font-size: 22px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .shopping-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  }
  
  .section-header h2 {
    color: #ffffff;
  }
  
  .section-header p {
    color: #b8c5d6;
  }
  
  .product-card {
    background: #2a2a3e;
  }
  
  .product-name {
    color: #ffffff;
  }
  
  .product-description {
    color: #b8c5d6;
  }
  
  .category-btn {
    background: #2a2a3e;
    color: #b8c5d6;
  }
  
  .toast-notification {
    background: #2a2a3e;
  }
  
  .toast-content h4 {
    color: #ffffff;
  }
  
  .toast-content p {
    color: #b8c5d6;
  }
}

/* Print Styles */
@media print {
  .shopping-section {
    background: white;
  }
  
  .product-actions,
  .add-to-cart-btn,
  .cart-icon-wrapper {
    display: none;
  }
}
