/* ==========================================================================
   TÍN THÀNH BRANDING & LOGO STYLES (Đã cập nhật theo Phương án 1)
   ========================================================================== */
.logo {
  display: flex;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.15));
  transition: var(--transition-smooth);
}

.logo-img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.35));
}

/* Tối ưu không gian tránh chèn ép menu trên màn hình Desktop trung bình */
@media (min-width: 993px) and (max-width: 1200px) {
  .nav-menu {
    gap: 15px;
  }
  .nav-link {
    font-size: 0.85rem;
  }
  .logo {
    font-size: 1.4rem;
  }
  .logo-img {
    height: 32px;
    width: 32px;
  }
}

/* ==========================================================================
   DELIVERY SECTION (SOCIAL PROOF)
   ========================================================================== */
.delivery-section {
  background-color: #0c0c0c;
  position: relative;
  overflow: hidden;
}

.delivery-gallery-container {
  position: relative;
  width: 100%;
}

.delivery-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (min-width: 992px) {
  .delivery-gallery {
    grid-template-columns: repeat(6, 1fr);
  }
  .delivery-item:nth-child(1),
  .delivery-item:nth-child(2),
  .delivery-item:nth-child(3) {
    grid-column: span 2;
  }
  .delivery-item:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .delivery-item:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

.delivery-card {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: #121212;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.delivery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.delivery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(7, 7, 7, 0.95) 0%, rgba(7, 7, 7, 0.6) 50%, rgba(7, 7, 7, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0.9;
  transition: var(--transition-smooth);
}

.delivery-overlay h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 6px;
  font-family: var(--font-header);
  transform: translateY(0);
  transition: var(--transition-smooth);
}

.delivery-overlay p {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-bottom: 0;
  line-height: 1.4;
  transform: translateY(0);
  transition: var(--transition-smooth);
}

.category-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: rgba(212, 175, 55, 0.9);
  color: #070707;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.zoom-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background-color: rgba(7, 7, 7, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

/* Hover States */
.delivery-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.15);
}

.delivery-card:hover img {
  transform: scale(1.08);
}

.delivery-card:hover .delivery-overlay {
  background: linear-gradient(to top, rgba(7, 7, 7, 0.98) 0%, rgba(7, 7, 7, 0.7) 60%, rgba(7, 7, 7, 0.2) 100%);
}

.delivery-card:hover .zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 7, 7, 0.95);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 100001;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

.lightbox-content {
  position: relative;
  max-width: 85%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightboxZoom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lightboxZoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: var(--border-radius-sm);
  border: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  width: 100%;
  text-align: center;
  margin-top: 16px;
  color: #ffffff;
  max-width: 600px;
}

.lightbox-tag {
  display: inline-block;
  background-color: var(--color-primary);
  color: #070707;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.lightbox-caption h4 {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 6px;
  font-family: var(--font-header);
}

.lightbox-caption p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
  z-index: 100000;
}

.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }

.lightbox-prev:hover, .lightbox-next:hover {
  background-color: var(--color-primary);
  color: #070707;
  border-color: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

/* Dots and Mobile Carousel Styling */
.delivery-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.delivery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.delivery-dot.active {
  background-color: var(--color-primary);
  transform: scale(1.2);
}

/* ==========================================================================
   RESPONSIVE DESIGN FOR GALLERY
   ========================================================================== */
@media (max-width: 991px) {
  .delivery-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .delivery-gallery-container {
    overflow: hidden;
  }
  
  .delivery-gallery {
    display: flex;
    gap: 0;
    width: 100%;
    overflow-x: auto; /* Thêm để kích hoạt cuộn ngang trên mobile */
    scroll-snap-type: x mandatory; /* Hít slide mượt mà */
    scrollbar-width: none; /* Ẩn scrollbar trên Firefox */
    -webkit-overflow-scrolling: touch; /* Cuộn mượt trên iOS */
  }

  .delivery-gallery::-webkit-scrollbar {
    display: none; /* Ẩn scrollbar trên Chrome/Safari/Edge */
  }
  
  .delivery-item {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    scroll-snap-align: start; /* Điểm hít */
  }
  
  .delivery-dots {
    display: flex;
  }

  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }
  .lightbox-prev, .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  .lightbox-close {
    top: 16px;
    right: 20px;
  }
}
