/**
 * COMPONENT CSS (TẦNG 2)
 * Chứa các bộ chọn lồng nhau, quan hệ cha-con, hiệu ứng hover con,
 * button components, Swiper custom UI và WooCommerce template overrides.
 */

/* ==========================================================================
   1. BUTTON COMPONENTS (.btn, .btn-primary, .btn-secondary)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* Outline Buttons */
.btn-outline-primary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-outline-secondary {
  background-color: transparent;
  color: var(--color-secondary);
  border-color: var(--color-slate-300);
}

.btn-outline-secondary:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-white);
}

/* Button Sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-xl);
}

/* ==========================================================================
   2. BADGE COMPONENTS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-primary {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-secondary {
  background-color: var(--color-secondary-light);
  color: var(--color-secondary);
  border: 1px solid var(--color-slate-200);
}

.badge-sale {
  background-color: var(--color-danger);
  color: var(--color-white);
}

.badge-hot {
  background-color: var(--color-warning);
  color: var(--color-white);
}

/* ==========================================================================
   3. ICON & MULTILINE TEXT ALIGNMENT HELPER (RULE 6)
   ========================================================================== */
.icon-first-line {
  margin-top: 0.125rem; /* 2px: thẳng hàng hoàn hảo với cap-height dòng đầu */
  flex-shrink: 0;
}

/* ==========================================================================
   4. NAVIGATION & HEADER STICKY (SLIDE DOWN AT 200PX)
   ========================================================================== */
/* Header Base & Wrapper */
.site-header-wrapper {
  position: relative;
  width: 100%;
}

.site-header-wrapper.is-fixed {
  min-height: 88px;
}

.site-header {
  position: relative;
  width: 100%;
  background-color: var(--color-white);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  z-index: 40;
}

/* Hiệu ứng Sticky: Kích hoạt khi cuộn quá 200px, trượt mượt mà từ trên xuống */
.site-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: headerSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headerSlideDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Desktop Submenu Dropdown */
.desktop-nav .menu-item {
  position: relative;
}

.desktop-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--color-white);
  border: 1px solid var(--color-slate-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}

.desktop-nav .menu-item:hover > .sub-menu,
.desktop-nav .menu-item:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.desktop-nav .sub-menu .menu-item a {
  display: block;
  padding: 0.5rem 1.25rem;
  color: var(--color-slate-700);
  font-size: 0.875rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.desktop-nav .sub-menu .menu-item a:hover {
  background-color: var(--color-slate-50);
  color: var(--color-primary);
}

/* Mobile Drawer Overlay (RULE 15: z-index 100 > Header z-index 40/50) */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Navigation Drawer (RULE 15: z-index 101 > Overlay 100 & Header 40/50) */
.mobile-navigation-drawer,
.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 85%;
  max-width: 360px;
  background-color: var(--color-white);
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-navigation-drawer.is-active,
.mobile-drawer.is-active {
  transform: translateX(0);
}

/* ==========================================================================
   5. SWIPER CUSTOM CONTROLS (ARROWS & PAGINATION)
   ========================================================================== */
.swiper-button-next,
.swiper-button-prev {
  width: 42px !important;
  height: 42px !important;
  background-color: var(--color-white) !important;
  color: var(--color-slate-800) !important;
  border-radius: var(--radius-full) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.3s ease !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: var(--color-primary) !important;
  color: var(--color-white) !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 1rem !important;
  font-weight: 700 !important;
}

.swiper-pagination-bullet {
  width: 8px !important;
  height: 8px !important;
  background: var(--color-slate-400) !important;
  opacity: 0.6 !important;
  transition: all 0.3s ease !important;
}

.swiper-pagination-bullet-active {
  width: 24px !important;
  border-radius: var(--radius-full) !important;
  background: var(--color-primary) !important;
  opacity: 1 !important;
}

/* ==========================================================================
   6. PRODUCT CARD & HOVER RELATIONS
   ========================================================================== */
.product-card {
  border: 1px solid var(--color-slate-100);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  border-color: var(--color-slate-200);
  box-shadow: var(--shadow-lg);
}

.product-card .hover-actions {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .hover-actions {
  opacity: 1;
}

.product-card .product-thumb img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   7. GSAP FOUC SHIELD & PROTECTION
   ========================================================================== */
.gsap-init-hidden {
  opacity: 0;
  will-change: transform, opacity;
}

/* ==========================================================================
   8. WOOCOMMERCE FORM & UI OVERRIDES
   ========================================================================== */
.woocommerce form .form-row {
  margin-bottom: 1rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-slate-300);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-focus);
}

.woocommerce .star-rating {
  font-size: 0.875rem;
  color: #eab308;
}

/* ==========================================================================
   9. LUXURY HOTEL COMPONENTS & BOOKING SYSTEM OVERRIDES
   ========================================================================== */

/* Gold Button & Luxury Accents */
.btn-gold {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--color-white);
  border-color: transparent;
  font-weight: 600;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(180, 140, 72, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, #8c672b 100%);
  color: var(--color-white);
  box-shadow: 0 8px 24px rgba(180, 140, 72, 0.4);
  transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.btn-outline-gold:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(180, 140, 72, 0.25);
}

/* Luxury Room Card */
.room-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--color-slate-100);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-slate-200));
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(180, 140, 72, 0.08);
  transform: translateY(-4px);
}

.room-card .room-thumb-wrapper {
  position: relative;
  overflow: hidden;
}

.room-card .room-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-card:hover .room-thumb-wrapper img {
  transform: scale(1.08);
}

/* Room Spec Badges / Pills */
.room-spec-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  background-color: var(--color-slate-50);
  color: var(--color-slate-700);
  border: 1px solid var(--color-slate-200);
  line-height: 1.25;
}

/* Quick Booking Bar Floating */
.quick-booking-bar-wrapper {
  position: relative;
  z-index: 30;
  margin-top: -3.5rem;
}

.quick-booking-box {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(180, 140, 72, 0.2);
  backdrop-filter: blur(12px);
}

.quick-booking-field {
  display: flex;
  flex-direction: column;
}

.quick-booking-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-500);
  margin-bottom: 0.375rem;
}

.quick-booking-field input,
.quick-booking-field select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-slate-800);
  background-color: var(--color-slate-50);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  outline: none;
  transition: all 0.25s ease;
}

.quick-booking-field input:focus,
.quick-booking-field select:focus {
  background-color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-focus);
}

/* Floating Contact Buttons */
.floating-contact-wrapper {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.floating-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.floating-contact-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.28);
}

.floating-contact-phone {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.floating-contact-zalo {
  background-color: #0068ff;
  color: var(--color-white);
}

.floating-back-to-top {
  background-color: var(--color-white);
  color: var(--color-slate-800);
  border: 1.5px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.floating-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-back-to-top:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.28);
}

.floating-back-to-top:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* BIV Hotel Booking Plugin Overrides */
.biv-hb-search-box {
  background: var(--color-white) !important;
  border: 1px solid rgba(180, 140, 72, 0.25) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-md) !important;
}

.biv-hb-search-submit,
.biv-hb-book-btn {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-white) !important;
  border-radius: var(--radius-lg) !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.biv-hb-search-submit:hover,
.biv-hb-book-btn:hover {
  background-color: var(--color-primary-hover) !important;
  box-shadow: 0 6px 18px rgba(180, 140, 72, 0.35) !important;
  transform: translateY(-1px);
}

.biv-hb-base-rate,
.biv-hb-price-display {
  color: var(--color-primary) !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   10. THEME LAYOUT & INTERACTIVE COMPONENTS
   ========================================================================== */
.top-bar {
  width: 100%;
}

.desktop-navigation {
  position: relative;
}

.mobile-menu-toggle,
.mobile-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}

.drawer-header,
.drawer-body,
.drawer-footer {
  width: 100%;
}

.mobile-menu-list,
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gsap-product-grid {
  width: 100%;
}

.single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   11. QUANTITY STEPPER COMPONENT (- COUNT +)
   ========================================================================== */
.stepper-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 46px;
  padding: 0 0.375rem;
  background-color: var(--color-slate-50);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-xl);
  transition: all 0.25s ease;
}

.stepper-box:focus-within {
  background-color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-focus);
}

.stepper-btn,
.stepper-btn-minus,
.stepper-btn-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-white);
  border: 1px solid var(--color-slate-200);
  color: var(--color-slate-700);
  border-radius: var(--radius-lg);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  user-select: none;
}

.stepper-btn:hover:not(:disabled) {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.05);
}

.stepper-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.stepper-btn:disabled,
.stepper-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.stepper-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 0.25rem;
}

.stepper-input {
  width: 100%;
  text-align: center;
  background: transparent !important;
  border: 0 !important;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-slate-900);
  padding: 0 !important;
  height: auto !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: default;
  -moz-appearance: textfield;
}

.stepper-input::-webkit-inner-spin-button,
.stepper-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper-unit {
  font-size: 0.75rem;
  color: var(--color-slate-500);
  font-weight: 500;
  margin-left: 0.25rem;
  user-select: none;
  white-space: nowrap;
}

/* ==========================================================================
   12. THEME LAYOUT & COMPONENT SELECTORS
   ========================================================================== */
.site-main {
  width: 100%;
}

.site-footer {
  width: 100%;
}

.header-desktop,
.header-mobile {
  width: 100%;
}

.header-logo,
.header-actions {
  display: flex;
  align-items: center;
}

.hero-section {
  position: relative;
  width: 100%;
}

.hero-swiper,
.gallery-swiper,
.testimonials-swiper,
.room-gallery-main,
.room-gallery-thumbs {
  position: relative;
  width: 100%;
}

.room-gallery-thumbs {
  height: auto;
}

.room-gallery-thumbs .swiper-slide {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity var(--duration-default) ease, border-color var(--duration-default) ease, box-shadow var(--duration-default) ease;
  opacity: 0.6;
}

.room-gallery-thumbs .swiper-slide:hover {
  opacity: 1;
}

.room-gallery-thumbs .swiper-slide.swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.swiper,
.swiper-wrapper,
.swiper-slide {
  position: relative;
}

.swiper-pagination,
.testimonials-swiper-pagination {
  position: relative;
}

.room-gallery-section {
  position: relative;
  width: 100%;
}

.room-gallery-prev,
.room-gallery-next {
  cursor: pointer;
  user-select: none;
}

.room-specs-grid {
  width: 100%;
}

.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.contact-map-wrapper {
  position: relative;
  width: 100%;
  height: 380px;
}

@media (min-width: 640px) {
  .contact-map-wrapper {
    height: 420px;
  }
}

.contact-map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block;
}

/* ==========================================================================
   13. GALLERY LIGHTBOX MODAL
   ========================================================================== */
.gallery-lightbox-trigger {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  position: relative;
}

.gallery-zoom-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(2, 6, 23, 0.35);
  opacity: 0;
  transition: opacity var(--duration-default, 300ms) ease;
  z-index: 5;
}

.gallery-lightbox-trigger:hover .gallery-zoom-badge,
.gallery-lightbox-trigger:focus-visible .gallery-zoom-badge {
  opacity: 1;
}

.gallery-zoom-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-slate-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  transform: translateY(8px);
  transition: transform var(--duration-default, 300ms) cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox-trigger:hover .gallery-zoom-icon,
.gallery-lightbox-trigger:focus-visible .gallery-zoom-icon {
  transform: translateY(0);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.is-open .gallery-lightbox-content {
  transform: scale(1);
}

.gallery-lightbox-img-wrapper {
  position: relative;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.gallery-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-2xl);
  user-select: none;
  transition: opacity 0.2s ease;
}

.gallery-lightbox-img.is-loading {
  opacity: 0.35;
}

.gallery-lightbox-btn {
  position: absolute;
  z-index: 20;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  user-select: none;
}

.gallery-lightbox-btn:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.08);
}

.gallery-lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}

.gallery-lightbox-prev {
  left: 1.5rem;
}

.gallery-lightbox-next {
  right: 1.5rem;
}

.gallery-lightbox-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 36rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
  color: var(--color-white);
}

.gallery-lightbox-caption {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  margin: 0;
}

.gallery-lightbox-counter {
  font-size: 0.75rem;
  color: var(--color-slate-400);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-left: 1rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .gallery-lightbox-prev {
    left: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  .gallery-lightbox-next {
    right: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  .gallery-lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  .gallery-lightbox-img {
    max-height: 65vh;
  }
}






