/**
 * Merchandise Upsell Page Styles
 *
 * Provides responsive, mobile-first styling for the post-booking
 * merchandise upsell page with smooth animations and modern design.
 */

/* Container & Layout */
.merchandise-upsell-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 2rem 1rem;
}

.merchandise-upsell-page .container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.upsell-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upsell-header h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.upsell-header .subtitle {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin: 0;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Error State */
.error-state {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-state h3 {
  color: #e74c3c;
  margin-bottom: 1rem;
}

.error-state p {
  color: #7f8c8d;
  margin-bottom: 2rem;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #f8f9fa;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-finisher {
  background: linear-gradient(135deg, #f10000 0%, #ff3333 100%);
  color: white;
}

.badge-limited {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.badge-route {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.product-info {
  padding: 1.5rem;
}

.product-name {
  font-size: 1.25rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.product-description {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.social-proof {
  font-size: 0.85rem;
  color: #27ae60;
  margin-bottom: 1rem;
  font-weight: 500;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ecf0f1;
}

.product-price {
  font-size: 1.5rem;
  color: #2c3e50;
  font-weight: 700;
}

.view-details {
  color: #3498db;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Bundles Section */
.bundles-section {
  margin-bottom: 3rem;
}

.bundles-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  font-weight: 700;
}

.bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.bundle-card {
  background: linear-gradient(135deg, #f10000 0%, #ff3333 100%);
  border-radius: 12px;
  padding: 2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.bundle-card:hover {
  transform: translateY(-5px);
}

.bundle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.bundle-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.bundle-discount {
  background: #27ae60;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
}

.bundle-name {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.bundle-description {
  font-size: 1rem;
  margin-bottom: 1rem;
  opacity: 0.95;
  line-height: 1.6;
}

.bundle-items {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

/* Actions Footer */
.actions-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #f10000 0%, #ff3333 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #cc0000 0%, #f10000 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-skip {
  background: transparent;
  color: #7f8c8d;
  border: 2px solid #ecf0f1;
}

.btn-skip:hover {
  background: #ecf0f1;
  color: #2c3e50;
}

.btn-view-cart {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-view-cart:hover {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 12px;
  max-width: 900px;
  width: 90%;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #2c3e50;
}

.modal-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.modal-image {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
}

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

.modal-details {
  padding: 1rem;
}

.modal-details h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  font-weight: 700;
}

.modal-price {
  font-size: 2rem;
  color: #27ae60;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.modal-description {
  font-size: 1rem;
  color: #7f8c8d;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.product-variants {
  margin: 2rem 0;
}

.product-variants h4 {
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  font-weight: 600;
}

.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.variant-option {
  display: block;
  padding: 0.75rem;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.variant-option:has(input:checked) {
  border-color: #f10000;
  background: rgba(102, 126, 234, 0.1);
}

.variant-option:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.variant-option input {
  display: none;
}

.variant-label {
  font-size: 0.9rem;
  color: #2c3e50;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 2rem;
  background: #27ae60;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 2000;
  font-weight: 600;
}

.notification.show {
  transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .upsell-header h1 {
    font-size: 1.8rem;
  }

  .upsell-header .subtitle {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .bundles-grid {
    grid-template-columns: 1fr;
  }

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

  .modal-image {
    min-height: 300px;
  }

  .actions-footer {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .variants-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .merchandise-upsell-page {
    padding: 1rem 0.5rem;
  }

  .upsell-header {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-name {
    font-size: 1.1rem;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-product {
    padding: 1rem;
    gap: 1rem;
  }
}
