/* ===== DESKTOP VIEW - NO MOBILE STYLES ===== */
@media (min-width: 769px) {
  /* Hide ALL mobile elements on desktop */
  .hamburger-menu,
  .mobile-nav-overlay,
  .mobile-backdrop,
  .mobile-action-buttons,
  .mobile-search-modal,
  #mobile-contact-info,
  .mobile-contact-info {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Ensure desktop elements are visible */
  .cart-info {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .top-nav,
  .nav-links {
    display: block !important;
  }
  
  /* Reset any mobile styles that might affect desktop */
  body {
    overflow-x: visible !important;
    max-width: none !important;
    position: static !important;
    top: auto !important;
  }
  
  .header {
    padding: inherit !important;
    min-height: auto !important;
  }
  
  .logo img {
    max-width: none !important;
  }
}

/* ===== MOBILE VIEW (768px and below) ===== */
@media (max-width: 768px) {
  /* Mobile Contact Info - White Background with Icons */
  #mobile-contact-info,
  .mobile-contact-info {
    display: block !important;
    background: white !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 10 !important;
    margin: 0 !important;
  }
  
  .mobile-contact-container {
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* OPTIMIZED FOR VERTICAL STACKING ON ALL MOBILE SIZES */
  .contact-row {
    display: flex !important;
    flex-direction: column !important; /* Always stack vertically */
    gap: 12px !important; /* Consistent spacing */
    align-items: flex-start !important; /* Left alignment */
    width: 100% !important;
  }
  
  .contact-item {
    display: flex !important;
    align-items: flex-start !important; /* Top alignment for multi-line */
    gap: 8px !important;
    color: #1a3a5f !important;
    font-size: 14px !important;
    white-space: normal !important; /* Allow text wrapping */
    word-break: break-word !important;
    width: 100% !important;
    line-height: 1.4 !important;
  }
  
  .contact-icon {
    color: #4CAF50 !important;
    font-size: 16px !important;
    min-width: 20px !important;
    text-align: center !important;
    align-self: flex-start !important;
  }
  
  #mobile-contact-info a,
  .mobile-contact-info a {
    color: #1a3a5f !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s !important;
    display: block !important; /* Full-width links */
  }
  
  #mobile-contact-info a:hover,
  .mobile-contact-info a:hover {
    color: #4CAF50 !important;
    text-decoration: underline !important;
  }
  
  /* Hide desktop cart-info on mobile */
  .cart-info {
    display: none !important;
  }
  
  /* Hamburger Menu Button */
  .hamburger-menu {
    display: block !important;
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 1002 !important;
    background: #153C60 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 12px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
  }
  
  .hamburger-menu:hover {
    background: #1a4a7a !important;
    transform: scale(1.05) !important;
  }
  
  .hamburger-menu span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background: #fff !important;
    margin: 4px 0 !important;
    transition: 0.3s !important;
    border-radius: 1px !important;
  }
  
  /* Hamburger Animation */
  .hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px) !important;
  }
  
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px) !important;
  }
  
  /* Hide desktop navigation */
  .top-nav,
  .nav-links {
    display: none !important;
  }
  
  /* Mobile Navigation Overlay */
  .mobile-nav-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: calc(var(--vh, 1vh) * 100) !important;
    background: white !important;
    z-index: 1001 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    overflow-y: auto !important;
  }
  
  .mobile-nav-overlay.active {
    display: block !important;
    transform: translateX(0) !important;
  }
  
  .mobile-nav-content {
    position: relative !important;
    padding: 80px 20px 40px !important;
    min-height: 100% !important;
  }
  
  /* Close Button */
  .mobile-nav-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: #153C60 !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    color: white !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-nav-close:hover {
    transform: rotate(90deg) !important;
    background: #1a4a7a !important;
  }
  
  /* Mobile Navigation Links */
  .mobile-nav-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .mobile-nav-links li {
    margin-bottom: 10px !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 10px !important;
  }
  
  .mobile-nav-links li:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
  }
  
  .mobile-nav-links a {
    display: block !important;
    color: #1a3a5f !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 12px 15px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border-radius: 4px !important;
  }
  
  .mobile-nav-links a:hover,
  .mobile-nav-links a.active {
    background: rgba(21, 60, 96, 0.1) !important;
    color: #153C60 !important;
    transform: translateX(5px) !important;
  }
  
  /* Backdrop */
  .mobile-backdrop {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    transition: opacity 0.3s !important;
  }
  
  .mobile-backdrop.active {
    display: block !important;
    opacity: 1 !important;
  }
  
  /* Header adjustments */
  .header {
    position: relative !important;
    min-height: 70px !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .header .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    position: relative !important;
  }
  
  /* Logo adjustments */
  .logo img {
    max-width: 150px !important;
    height: auto !important;
  }
  
  /* Body lock when menu is open */
  body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
  
  /* Remove mobile action buttons if not needed */
  .mobile-action-buttons {
    display: none !important;
  }
}

/* ===== SMALL MOBILE DEVICES (480px and below) ===== */
@media (max-width: 480px) {
  /* Only adjust spacing for very small screens */
  .contact-row {
    gap: 10px !important; /* Slightly tighter spacing */
  }
  
  .contact-item {
    font-size: 13px !important; /* Slightly smaller text */
  }
  
  .mobile-nav-links a {
    font-size: 14px !important;
    padding: 10px 12px !important;
  }
  
  .logo img {
    max-width: 120px !important;
  }
  
  .hamburger-menu {
    top: 12px !important;
    right: 12px !important;
    padding: 8px 10px !important;
  }
}

/* ===== TOUCH DEVICE ENHANCEMENTS ===== */
@media (hover: none) and (pointer: coarse) {
  .hamburger-menu,
  .mobile-nav-close,
  .mobile-nav-links a,
  #mobile-contact-info a,
  .mobile-contact-info a {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  * {
    -webkit-tap-highlight-color: transparent !important;
  }
}

/* ===== VIEWPORT HEIGHT VARIABLE ===== */
:root {
  --vh: 1vh;
}

/* ===== REDUCE MOTION PREFERENCE ===== */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-overlay,
  .hamburger-menu span,
  .mobile-nav-close,
  .mobile-backdrop {
    transition: none !important;
  }
}

/* ===== GLOBAL RESETS ===== */
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* ===== SMOOTH SCROLLING ===== */
html {
  scroll-behavior: smooth !important;
}

/* ===== ACCESSIBILITY: REDUCE MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  
  html {
    scroll-behavior: auto !important;
  }
}

/* ===== PROPER STACKING CONTEXT ===== */
#mobile-contact-info,
.mobile-contact-info {
  z-index: 10 !important;
}

.hamburger-menu {
  z-index: 1002 !important;
}

.mobile-nav-overlay {
  z-index: 1001 !important;
}

.mobile-backdrop {
  z-index: 1000 !important;
}
/* =====================================================
   SAFE MOBILE FIX — FINAL APPEND (NO LAYOUT BREAK)
   Fixes hamburger position, header visibility, contact hide
===================================================== */

@media (max-width: 768px) {

  /* ---------------- HEADER: FIX VISIBILITY ---------------- */
  .header {
    position: relative !important;
    min-height: 70px !important; /* keep your original */
    z-index: 1001 !important;
  }

  /* ---------------- HAMBURGER: ANCHOR TO TOP-RIGHT ---------------- */
  .hamburger-menu {
    position: fixed !important;   /* KEY FIX */
    top: 14px !important;
    right: 14px !important;
    z-index: 1006 !important;
  }

  /* Prevent hamburger from drifting */
  body {
    padding-top: 0 !important;
  }

  /* ---------------- NAV OVERLAY DOMINANCE ---------------- */
  .mobile-nav-overlay {
    z-index: 1005 !important;
  }

  .mobile-backdrop {
    z-index: 1004 !important;
  }

  /* ---------------- CONTACT INFO NORMAL SCROLL ---------------- */
  #mobile-contact-info,
  .mobile-contact-info {
    position: relative !important;
    z-index: 10 !important;
  }
}

/* ---------------- HIDE CONTACT INFO WHEN MENU OPENS ---------------- */
body.menu-open #mobile-contact-info,
body.menu-open .mobile-contact-info {
  display: none !important;
}

/* ---------------- FIX BLUE RIGHT-SIDE OVERFLOW ---------------- */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  .mobile-nav-overlay {
    max-width: 100vw !important;
  }
}
/* =====================================================
   MOBILE GALLERY — PORTRAIT SLIDER ENHANCEMENT (SAFE)
   ✔ Append only
   ✔ Mobile only
   ✔ Desktop untouched
===================================================== */

@media (max-width: 768px) {

  /* ---------- GALLERY SECTION VISIBILITY ---------- */
  .gallery,
  .gallery-section,
  .gallery-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
  }

  /* ---------- SLIDER: FULL WIDTH + PORTRAIT HEIGHT ---------- */
  .gallery-slider,
  .swiper,
  .swiper-container {
    width: 100% !important;
    height: 70vh !important;              /* PORTRAIT FEEL */
    max-height: 80vh !important;
    min-height: 60vh !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* ---------- SLIDE STRUCTURE ---------- */
  .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
  }

  .swiper-slide {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  /* ---------- IMAGE: PERFECT CENTER + FULL VIEW ---------- */
  .gallery img,
  .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;       /* 🔑 FULL IMAGE */
    object-position: center center !important;

    display: block !important;
    margin: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* ---------- REMOVE SIDE CUT / BLUE OVERFLOW ---------- */
  .gallery,
  .gallery * {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* ---------- TOUCH & SWIPE COMFORT ---------- */
  .swiper,
  .gallery-slider {
    touch-action: pan-y !important;
  }

  /* ---------- PREVENT MENU OVERLAY INTERFERENCE ---------- */
  body.menu-open .gallery,
  body.menu-open .gallery-section {
    opacity: 0.25 !important;
    pointer-events: none !important;
  }
}

/* =====================================================
   SMALL MOBILE — EXTRA PORTRAIT OPTIMIZATION
===================================================== */
@media (max-width: 480px) {

  .gallery-slider,
  .swiper {
    height: 75vh !important;       /* More vertical on small phones */
  }

  .swiper-slide img {
    border-radius: 8px !important;
  }
}
/* =====================================================
   REAL-TIME MOBILE IMAGE CENTERING FIX (SAFE APPEND)
   Fixes: off-center image, partial visibility, stretch
===================================================== */

@media (max-width: 768px) {

  /* --- FORCE SLIDE TO BE A TRUE VIEWPORT FRAME --- */
  .swiper-slide {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important; /* prevents white gaps */
  }

  /* --- CRITICAL FIX: IMAGE SIZING LOGIC --- */
  .swiper-slide img {
    width: auto !important;        /* 🔑 STOP STRETCH */
    height: 100% !important;       /* Fill portrait height */
    max-height: 100% !important;
    max-width: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    margin: auto !important;
    display: block !important;
  }

  /* --- HANDLE LANDSCAPE IMAGES SMARTLY --- */
  .swiper-slide img.landscape,
  .swiper-slide img[width][height] {
    width: 100% !important;
    height: auto !important;
  }
}

/* =====================================================
   EXTRA SMALL PHONES — BETTER VISUAL BALANCE
===================================================== */
@media (max-width: 480px) {

  .swiper-slide {
    background: #000 !important;
  }

  .swiper-slide img {
    max-height: 90vh !important;
  }
}





