/*
 * Products and subscriptions styles
 */

/* Products and Subscriptions Styles */
.products-container {
  padding: 40px 0;
  background-color: #f8f9fa;
}

.products-header {
  text-align: center;
  margin-bottom: 3rem;
}

.products-header h1 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.product-card {
  background: white;
  max-width: 300px;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-info h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.product-description {
  color: #7f8c8d;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.product-price {
  margin-bottom: 1.5rem;
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #10b981;
}

.product-actions {
  margin-top: auto;
}

.subscription-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.subscription-form {
  background: white;
  padding: 3rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 900px;
}

.product-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid #10b981;
}

.product-summary h3 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.product-img {
  width: 100%;
  height: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.price-info {
  margin-top: 1rem;
}

.unit-price {
  font-weight: 600;
  color: #10b981;
}

.subscription-summary {
  background: #e8f5e8;
  border: 1px solid #c3e6c3;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.subscription-summary h4 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.summary-details p {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.wallet-info {
  text-align: center;
}

.wallet-balance {
  font-size: 1.5rem;
  color: #10b981;
  margin-bottom: 1rem;
}

.wallet-note {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.upcoming-deliveries {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.delivery-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid #10b981;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delivery-info h4 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.delivery-info p {
  margin-bottom: 0.25rem;
  color: #7f8c8d;
}

.delivery-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.no-deliveries {
  text-align: center;
  color: #7f8c8d;
  font-style: italic;
  padding: 2rem;
}

.no-products {
  text-align: center;
  color: #7f8c8d;
  font-style: italic;
  padding: 2rem;
}

/* Subscription Product Selection Styles */
.product-selection-section {
  margin-bottom: 2rem;
}

.product-selection-section h3 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-size: 1.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

/* Horizontal scrolling products layout for dashboard */
.products-horizontal-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem 0;
  margin-bottom: 2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.products-horizontal-scroll::-webkit-scrollbar {
  height: 8px;
}

.products-horizontal-scroll::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 4px;
}

.products-horizontal-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.products-horizontal-scroll::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.products-scroll-container {
  display: flex;
  gap: 1.5rem;
  padding: 0 1rem;
  min-width: max-content;
}

.products-horizontal-scroll .product-card {
  flex: 0 0 300px;
  max-width: 300px;
  min-width: 280px;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.products-horizontal-scroll .product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.products-horizontal-scroll .product-image {
  height: 150px;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

.products-horizontal-scroll .product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.products-horizontal-scroll .no-image {
  width: 100%;
  height: 200px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 2rem;
  border: 1px dashed #dee2e6;
}

.products-horizontal-scroll .product-info h3 {
  color: #2c3e50;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.products-horizontal-scroll .product-price {
  margin-bottom: 1rem;
}

.products-horizontal-scroll .price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #10b981;
  display: block;
  margin-bottom: 0.25rem;
}

.products-horizontal-scroll .unit {
  color: #6c757d;
  font-size: 0.9rem;
}

.products-horizontal-scroll .product-actions {
  margin-top: auto;
}

.products-horizontal-scroll .product-actions .btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
}

/* Coming soon card styles */
.coming-soon-card {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.coming-soon-card .product-info h3 {
  color: #495057;
  font-weight: 600;
}

.coming-soon-card .price {
  color: #6c757d;
  font-weight: 600;
}

.coming-soon-card .unit {
  color: #6c757d;
}

.coming-soon-card .coming-soon-image {
  background: #e9ecef;
  border: 1px solid #dee2e6;
  color: #6c757d;
  font-size: 2rem;
}

.coming-soon-card .btn {
  background: #6c757d;
  color: white;
  border: 1px solid #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.coming-soon-card .btn:hover {
  background: #6c757d;
  transform: none;
  box-shadow: none;
}

.products-grid.has-selection {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.product-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.product-card.selected {
  border-color: #28a745;
  background-color: #f8fff9;
  margin: 0 2rem;
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
  transform: scale(1.05);
  z-index: 10;
  position: relative;
}

.products-grid.has-selection .product-card.selected {
  transform: scale(1.05);
}

.no-image {
  width: 100%;
  height: 200px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.9rem;
  border: 1px dashed #dee2e6;
}

.product-info h4 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-size: 1.2rem;
}

.product-description {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  text-align: left;
}

.product-name-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: #28a745;
  margin-bottom: 0.5rem;
}

.product-selection-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.product-card.selected .product-selection-indicator {
  background-color: #28a745;
  border-color: #28a745;
}

.selection-icon {
  font-size: 1rem;
  color: transparent;
  transition: color 0.3s ease;
}

.selection-icon.selected {
  color: white;
}

.subscription-details-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-top: 2rem;
}

.subscription-details-section .product-summary {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid #007bff;
}

.subscription-details-section .product-summary h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.subscription-details-section .product-summary p {
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.price-info .unit-price {
  font-size: 1.1rem;
  color: #28a745;
  font-weight: 600;
}

.subscription-summary {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.subscription-summary h4 {
  color: #856404;
  margin-bottom: 1rem;
}

.summary-details p {
  margin-bottom: 0.5rem;
  color: #856404;
}

.summary-details strong {
  color: #533f03;
}

/* Mobile responsiveness for products */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .products-grid.has-selection {
    display: flex;
    justify-content: center;
  }

  .products-grid.has-selection .product-card.selected {
    margin: 1rem 0;
  }

  .product-card {
    padding: 1rem;
  }

  .product-image {
    height: 120px;
  }

  .subscription-details-section {
    padding: 0rem;
  }

  .delivery-item {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .delivery-actions {
    justify-content: center;
  }

  .subscription-form {
    padding: 2rem;
  }

  /* Mobile styles for horizontal scrolling products */
  .products-horizontal-scroll {
    padding: 0.5rem 0;
  }

  .products-scroll-container {
    gap: 1rem;
    padding: 0 0.5rem;
  }

  .products-horizontal-scroll .product-card {
    flex: 0 0 250px;
    min-width: 240px;
    padding: 1rem;
  }

  .products-horizontal-scroll .product-image {
    height: 120px;
  }

  .products-horizontal-scroll .product-info h3 {
    font-size: 1.1rem;
  }

  .products-horizontal-scroll .price {
    font-size: 1.2rem;
  }
}
