/* ===== style.css ===== */
/* Main CSS file that imports all partials */

@import url('base.css');
@import url('components.css');
@import url('animations.css');
@import url('responsive.css');

/* ===== COFFEE SHOP AESTHETIC ADDITIONS ===== */

:root {
  --coffee-dark: #4a2c2c;
  --coffee-medium: #6f4e37;
  --coffee-light: #a5673f;
  --coffee-cream: #f5e6d3;
  --coffee-foam: #fff5e6;
}

/* ===== AUTO-SLIDING PICTURE GALLERY ===== */

.sliding-gallery {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 20px;
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(30, 106, 208, 0.2);
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: galleryAnimation 15s infinite;
}

.gallery-slide:nth-child(1) {
  animation-delay: 0s;
}

.gallery-slide:nth-child(2) {
  animation-delay: 5s;
}

.gallery-slide:nth-child(3) {
  animation-delay: 10s;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  padding: 2rem;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.gallery-slide:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-caption {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.gallery-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.gallery-dot:hover {
  background: white;
}

@keyframes galleryAnimation {
  0%, 30% { opacity: 1; }
  33%, 100% { opacity: 0; }
}

/* ===== DUAL IMAGE SLIDER (FOR HOMEPAGE) ===== */

.dual-slider {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: 500px;
  margin: 3rem 0;
}

.slider-left, .slider-right {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(30, 106, 208, 0.15);
}

.slider-left img, .slider-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}

.slider-left:hover img, .slider-right:hover img {
  transform: scale(1.1);
}

.slider-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.slider-left:hover .slider-content,
.slider-right:hover .slider-content {
  transform: translateY(0);
}

.slider-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.slider-subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

/* ===== AUTO-SLIDING FEATURED ITEMS ===== */

.featured-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
}

.featured-track {
  display: flex;
  gap: 20px;
  animation: slideTrack 30s linear infinite;
  width: fit-content;
}

.featured-track:hover {
  animation-play-state: paused;
}

.featured-item {
  min-width: 300px;
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(30, 106, 208, 0.1);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.featured-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px rgba(30, 106, 208, 0.2);
  border-color: var(--primary-color);
}

.featured-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 1rem;
}

.featured-item h4 {
  font-family: 'Playfair Display', serif;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.featured-item .price {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

@keyframes slideTrack {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== COFFEE SHOP GALLERY SECTION ===== */

.coffee-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 3rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(30,106,208,0.8), rgba(10,45,90,0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-text {
  color: white;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-text {
  transform: translateY(0);
}

.gallery-item-text i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ===== TESTIMONIAL SLIDER ===== */

.testimonial-slider {
  position: relative;
  max-width: 800px;
  margin: 3rem auto;
  overflow: hidden;
  border-radius: 30px;
  background: white;
  box-shadow: 0 20px 40px rgba(30, 106, 208, 0.1);
  padding: 2rem;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial-slide {
  min-width: 100%;
  padding: 1rem;
  text-align: center;
}

.testimonial-slide img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 4px solid var(--primary-color);
}

.testimonial-slide p {
  font-style: italic;
  color: var(--text-gray);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.testimonial-slide h4 {
  color: var(--dark-blue);
  font-family: 'Playfair Display', serif;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1rem;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.testimonial-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* ===== ADDITIONAL ANIMATIONS ===== */

@keyframes popIn {
  0% { transform: scale(0); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  to { opacity: 0; transform: translateY(50px); }
}

@keyframes fadeInBg {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes ring {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-15deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-10deg); }
  50% { transform: rotate(5deg); }
  60% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

/* Coffee-specific animations */
@keyframes steam {
  0% { opacity: 0; transform: translateY(0) scale(1); }
  50% { opacity: 0.5; transform: translateY(-20px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.4); }
}

@keyframes beanBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-15px) rotate(10deg); }
  60% { transform: translateY(-7px) rotate(5deg); }
}

/* ===== ANIMATION CLASSES ===== */

.animate-pulse {
  animation: pulse 1s ease-in-out;
}

.notification-ring {
  animation: ring 0.5s ease-in-out;
}

.animate-slideUp {
  animation: slideUp 0.4s ease-out;
}

.animate-steam {
  animation: steam 3s ease-in-out infinite;
}

.animate-bean {
  animation: beanBounce 2s ease-in-out infinite;
}

/* ===== CART BADGE ===== */

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background-color: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
}

.cart-badge.pulse {
  animation: pulse 0.3s ease-in-out;
}

/* ===== ORDER SUCCESS MODAL ===== */

#orderSuccessModal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#orderSuccessModal.active {
  display: flex;
}

#orderSuccessModal .bg-white {
  animation: slideUp 0.4s ease-out;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border-radius: 1.5rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
  margin: 0 1rem;
  position: relative;
  padding: 2rem;
}

#orderSuccessModal.fade-out .bg-white {
  animation: slideDown 0.3s ease-in forwards;
}

#orderSuccessModal .fa-check-circle {
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===== NOTIFICATION BADGES ===== */

#ordersNotificationBadge,
#reservationBadge,
#orderNotificationBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}

#ordersNotificationBadge {
  background-color: #ef4444;
  color: white;
  margin-left: auto;
  padding: 0 6px;
}

#orderNotificationBadge {
  background-color: #ef4444;
  color: white;
  width: 18px;
  height: 18px;
}

#reservationBadge {
  background-color: #1e6ad0;
  color: white;
  margin-left: auto;
  padding: 0 6px;
}

/* ===== ORDER HISTORY MODAL ===== */

#orderHistoryModal,
#fullOrderHistoryModal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

#orderHistoryModal.active,
#fullOrderHistoryModal.active {
  display: flex;
}

#orderHistoryModal .bg-white,
#fullOrderHistoryModal .bg-white {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease-out;
  max-height: 80vh;
  overflow-y: auto;
}

/* Timeline effect for history */
#orderHistoryModal .space-y-1 .flex.gap-3,
#fullOrderHistoryModal .space-y-1 .flex.gap-3 {
  position: relative;
  padding-left: 1rem;
}

#orderHistoryModal .space-y-1 .flex.gap-3:not(:last-child)::before,
#fullOrderHistoryModal .space-y-1 .flex.gap-3:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -10px;
  width: 2px;
  background: linear-gradient(to bottom, #e2efff, transparent);
  z-index: 0;
}

/* ===== NOTIFICATION DROPDOWN ===== */

#orderNotificationDropdown {
  max-width: 320px;
  box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #e5e7eb;
  z-index: 50;
  display: none;
}

#orderNotificationDropdown.active {
  display: block;
}

#orderNotificationList {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
  max-height: 24rem;
  overflow-y: auto;
}

#orderNotificationList::-webkit-scrollbar {
  width: 6px;
}

#orderNotificationList::-webkit-scrollbar-track {
  background: #f7fafc;
}

#orderNotificationList::-webkit-scrollbar-thumb {
  background-color: #cbd5e0;
  border-radius: 3px;
}

/* ===== PAYMENT & DELIVERY OPTIONS ===== */

.payment-option {
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid #d9ebff;
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.payment-option:hover {
  border-color: #1e6ad0;
  background-color: #f0f7ff;
}

.payment-option.selected {
  border-color: #1e6ad0;
  background-color: #e2efff;
}

.delivery-type-option {
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid #d9ebff;
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.delivery-type-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: #1e6ad0;
}

.delivery-type-option.selected {
  border-color: #1e6ad0;
  background-color: #e2efff;
}

/* ===== QUANTITY BUTTON ===== */

.quantity-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.quantity-btn:hover {
  background: var(--primary-color);
  color: white;
}

.quantity-btn:active {
  transform: scale(0.95);
}

/* ===== REMOVE BUTTON ===== */

.remove-btn {
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s;
}

.remove-btn:hover {
  color: #dc2626;
  transform: scale(1.1);
}

/* ===== STATUS BADGES ===== */

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
}

.status-pending {
  background: #fff3e0;
  color: #e67e22;
}

.status-preparing {
  background: #e3f2fd;
  color: var(--primary-color);
}

.status-ready {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-delivered {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-cancelled {
  background: #ffebee;
  color: #c62828;
}

/* ===== HISTORY BUTTON STYLES ===== */

button.bg-purple-100 {
  transition: all 0.2s;
}

button.bg-purple-100:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(128, 90, 213, 0.2);
}

.text-purple-600 {
  transition: all 0.2s;
}

.text-purple-600:hover {
  transform: scale(1.1);
}

/* ===== SCROLLBAR STYLES ===== */

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.overflow-y-auto {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
  background: #f7fafc;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
  background-color: #cbd5e0;
  border-radius: 3px;
}

/* ===== UTILITY CLASSES ===== */

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shadow-soft {
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.hover-lift {
  transition: transform 0.2s;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* ===== PRINT STYLES ===== */

@media print {
  .cart-sidebar,
  .back-to-top,
  .modal,
  #orderSuccessModal,
  #orderHistoryModal,
  #fullOrderHistoryModal,
  #orderNotificationDropdown,
  .sliding-gallery,
  .dual-slider,
  .featured-slider,
  .coffee-gallery,
  .testimonial-slider {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  main {
    margin: 0;
    padding: 20px;
  }
}

/* ===== RESPONSIVE FIXES ===== */

@media (max-width: 768px) {
  .cart-sidebar {
    max-width: 100%;
  }
  
  .modal-content {
    width: 95%;
    padding: 1rem;
  }
  
  #orderSuccessModal .bg-white {
    padding: 1.5rem;
  }
  
  #orderHistoryModal .bg-white,
  #fullOrderHistoryModal .bg-white {
    width: 95%;
    padding: 1rem;
  }
  
  /* Adjust timeline for mobile */
  #orderHistoryModal .space-y-1 .flex.gap-3:not(:last-child)::before,
  #fullOrderHistoryModal .space-y-1 .flex.gap-3:not(:last-child)::before {
    left: 15px;
  }
  
  /* Responsive gallery */
  .sliding-gallery {
    height: 300px;
  }
  
  .dual-slider {
    grid-template-columns: 1fr;
    height: auto;
    gap: 15px;
  }
  
  .slider-left, .slider-right {
    height: 300px;
  }
  
  .coffee-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .featured-item {
    min-width: 250px;
  }
}

@media (max-width: 640px) {
  table {
    min-width: 500px;
  }
  
  .gap-4 {
    gap: 1rem;
  }
  
  .coffee-gallery {
    grid-template-columns: 1fr;
  }
  
  .gallery-caption {
    font-size: 1.2rem;
  }
  
  .slider-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .cart-sidebar {
    max-width: 100%;
    border-left: none;
    border-top: 4px solid var(--primary-color);
  }
  
  .sliding-gallery {
    height: 250px;
  }
  
  .slider-left, .slider-right {
    height: 250px;
  }
  
  .featured-item {
    min-width: 200px;
  }
  
  .gallery-overlay {
    padding: 1rem;
  }
}