/* Dynamic Boutique Styles for uOttawa Laughs */
/* Enhanced CSS for AI-powered features and dynamic content */

/* Loading States and Animations */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #4ecdc4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Image Loading States */
img.loading {
  opacity: 0.5;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

img.loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img.error {
  filter: grayscale(100%);
  opacity: 0.7;
}

/* Cart Notifications */
.cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.cart-notification.error {
  background: #ffebee;
  border-left: 4px solid #f44336;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Enhanced Product Cards */
.product-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

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

.product-card h4 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.product-card p {
  color: #666;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Enhanced Rental Items */
.rental-item {
  background: rgba(255, 255, 255, 0.25);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.rental-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.rental-item img {
  transition: all 0.3s ease;
}

.rental-item:hover img {
  transform: scale(1.1);
}

/* Image Gallery Styles */
.image-gallery {
  margin: 20px 0;
}

.gallery-main {
  text-align: center;
  margin-bottom: 15px;
}

.main-image {
  max-width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: #4ecdc4;
  opacity: 1;
  transform: scale(1.05);
}

/* Booking Form Styles */
.booking-form {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 20px auto;
}

.step-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 20px;
}

.step-indicator .step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #666;
  transition: all 0.3s ease;
}

.step-indicator .step.active {
  background: #4ecdc4;
  color: white;
}

.step-indicator .step.completed {
  background: #44a08d;
  color: white;
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4ecdc4;
}

.form-group input.error {
  border-color: #f44336;
}

.field-error {
  color: #f44336;
  font-size: 14px;
  margin-top: 5px;
}

/* Cart Styles */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-items {
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #333;
}

.cart-item-info .price {
  color: #4ecdc4;
  font-weight: bold;
  margin-bottom: 10px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: #f5f5f5;
}

.cart-total {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  background: #f9f9f9;
}

.cart-total .total-amount {
  font-size: 18px;
  font-weight: bold;
  color: #4ecdc4;
  text-align: center;
  margin-bottom: 20px;
}

/* Success/Error Messages */
.booking-success,
.booking-error {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  padding: 30px;
  z-index: 10000;
  max-width: 400px;
  text-align: center;
}

.booking-success {
  border-left: 4px solid #4caf50;
}

.booking-error {
  border-left: 4px solid #f44336;
}

.booking-success h3,
.booking-error h3 {
  margin: 0 0 15px 0;
  color: #333;
}

.booking-success button,
.booking-error button {
  background: #4ecdc4;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
}

.booking-success button:hover,
.booking-error button:hover {
  background: #44a08d;
}

/* Recommendation Styles */
.recommendations {
  margin-top: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.recommendations h3 {
  text-align: center;
  margin-bottom: 20px;
  color: white;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.recommendation-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.recommendation-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.recommendation-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.recommendation-item h4 {
  color: white;
  font-size: 14px;
  margin: 0;
}

/* Smart Search Styles */
.search-container {
  margin: 20px 0;
  text-align: center;
}

.search-input {
  width: 100%;
  max-width: 500px;
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  backdrop-filter: blur(10px);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  outline: none;
  border-color: #4ecdc4;
  background: rgba(255, 255, 255, 0.2);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.search-suggestion {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
}

.search-suggestion:hover {
  background: #f5f5f5;
}

.search-suggestion:last-child {
  border-bottom: none;
}

/* Filter Styles */
.filter-container {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: white;
  color: #4ecdc4;
  border-color: white;
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
  
  .booking-form {
    margin: 10px;
    padding: 20px;
  }
  
  .step-indicator {
    gap: 10px;
  }
  
  .step-indicator .step {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  
  .gallery-thumbnails {
    gap: 5px;
  }
  
  .thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .main-image {
    height: 250px;
  }
  
  .filter-container {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  
  .filter-btn {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .product-card,
  .rental-item {
    padding: 15px;
  }
  
  .product-card img,
  .rental-item .item-photo {
    height: 150px;
  }
  
  .cart-notification {
    right: 10px;
    left: 10px;
    top: 10px;
  }
  
  .booking-success,
  .booking-error {
    margin: 10px;
    max-width: none;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .product-card,
  .rental-item {
    border: 2px solid #000;
  }
  
  .filter-btn {
    border-width: 2px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .booking-form {
    background: #2a2a2a;
    color: white;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    background: #3a3a3a;
    border-color: #555;
    color: white;
  }
  
  .cart-sidebar {
    background: #2a2a2a;
    color: white;
  }
}
