/* ==================== CUSTOM STYLES FOR ATLANTIKA MOTORS ==================== */

/* ==================== HERO BANNER GRID ==================== */

/* --- Desktop ≥768px: основной слайдер слева, два маленьких справа --- */
.hero-banner-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 20px;
  box-sizing: border-box;
  align-items: stretch;
}

.hero-main-slider {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  background: #111827;
  aspect-ratio: 924 / 751;
}

/* Правая колонка: два баннера со своими пропорциями */
.hero-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
}

.hero-right-col a {
  display: block;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  cursor: pointer;
  /* естественные пропорции ~2:1 как у оригинальных изображений */
  aspect-ratio: 580 / 298;
}

.hero-right-col a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.hero-right-col a:hover img {
  transform: scale(1.05);
}

/* --- Tablet 768px–1199px --- */
@media (min-width: 768px) and (max-width: 1199px) {
  .hero-banner-grid {
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 14px;
  }
  .hero-right-col {
    gap: 14px;
  }
}

/* --- Mobile ≤767px --- */
@media (max-width: 767px) {

  /* Один столбец: слайдер сверху, блок маленьких баннеров снизу */
  .hero-banner-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Основной слайдер: высота по изображению */
  .hero-main-slider {
    border-radius: 1.25rem;
  }

  /* Маленькие баннеры: 2 колонки в одной строке */
  .hero-right-col {
    flex-direction: row;
    gap: 8px;
  }

  /* Маленькие баннеры в одну строку, сохраняют пропорции 2:1 */
  .hero-right-col a {
    flex: 1 1 0;
    aspect-ratio: 580 / 298;
    height: auto;
    border-radius: 1rem;
  }

  /* Изображение заполняет весь баннер */
  .hero-right-col a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

/* Font refinements */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c7d2fe; /* light purple */
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
  background: #6E73F7; /* Atlantika purple */
}

/* Horizontal scroll indicators/scrollers */
.product-slider-container {
  scrollbar-width: thin;
  scrollbar-color: #6E73F7 #f1f1f1;
}

/* Custom animations and focus effects */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.benefit-icon-ring {
  position: relative;
}
.benefit-icon-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1.5px solid #FFD500;
  border-radius: 50%;
  animation: pulse-ring 2.5s infinite ease-in-out;
  pointer-events: none;
}

/* Glassmorphism background for banners */
.glass-banner {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Line clamping helper */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;  
  overflow: hidden;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;  
  overflow: hidden;
}

/* Leaflet Map enhancements */
#contact-map {
  border-radius: 24px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1) !important;
  border: 1px solid #f3f4f6;
  padding: 4px;
}

.leaflet-popup-content h4 {
  margin: 0 0 4px 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #111827 !important;
}

.leaflet-popup-content p {
  margin: 0 !important;
  font-size: 11px !important;
  color: #4b5563 !important;
}

/* Active Thumbnail border on product gallery */
.gallery-thumb-active {
  border-color: #6E73F7 !important;
  transform: scale(1.05);
  box-shadow: 0 4px 6px -1px rgba(110, 115, 247, 0.15);
}

/* Multi-step checkout states */
.step-dot-active {
  border-color: #6E73F7 !important;
  background-color: #6E73F7 !important;
  color: white !important;
  box-shadow: 0 0 0 4px rgba(110, 115, 247, 0.2);
}

.step-dot-complete {
  border-color: #10b981 !important;
  background-color: #10b981 !important;
  color: white !important;
}

.step-dot-pending {
  border-color: #e5e7eb !important;
  background-color: white !important;
  color: #9ca3af !important;
}

/* Checkout sticky bottom bar: respect iPhone home indicator */
.safe-area-bottom {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* Checkout radio option cards — highlight selected via :has() */
.checkout-radio-card:has(input:checked) {
  border-color: #6E73F7 !important;
  background-color: rgba(110, 115, 247, 0.06) !important;
}
.checkout-radio-card:has(input:checked) .checkout-radio-icon {
  color: #6E73F7 !important;
}
.checkout-radio-card:not(:has(input:checked)):hover {
  border-color: #a5a8fa !important;
}

/* Image zoom box on product page */
.img-zoom-container {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.img-zoom-container img {
  transition: transform 0.15s ease-out;
}

/* Custom checkbox sliders */
.toggle-switch-checkbox:checked + .toggle-switch-label {
  background-color: #6E73F7;
}

.toggle-switch-checkbox:checked + .toggle-switch-label:before {
  transform: translateX(18px);
}

/* Catalog Filter Scroll */
.filter-scroll {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom card transitions */
.product-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Quick popup animations */
.modal-show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-show > div {
  transform: scale(1) !important;
}

/* Carousel transitions */
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex: 0 0 100%;
}

/* ==================== POPULAR CATEGORIES SECTION ==================== */

/* Category Card Animations */
.category-card {
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 180px;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.category-card:hover::before {
  opacity: 1;
}

/* Smooth Image Loading */
.category-card img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Shimmer Effect on Hover */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.category-card:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: 1rem;
  pointer-events: none;
  z-index: 30;
}

/* Category Section Gradient Enhancement */
.category-section-bg {
  background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #111827 100%);
  position: relative;
  overflow: hidden;
}

.category-section-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(110, 115, 247, 0.05) 0%, transparent 70%);
  animation: pulse-glow 8s infinite ease-in-out;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1) rotate(180deg);
    opacity: 0.5;
  }
}

/* Responsive Grid Adjustments */
@media (max-width: 640px) {
  .category-card {
    min-height: 160px;
  }
  
  .category-card h4 {
    font-size: 0.7rem;
    line-height: 1.3;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .category-card {
    min-height: 200px;
  }
}

@media (min-width: 769px) {
  .category-card {
    min-height: 220px;
  }
}

/* ==================== MOBILE HEADER ICONS ==================== */

/* По умолчанию мобильные элементы скрыты на desktop */
.mobile-header-icons {
  display: none;
}

.mobile-catalog-top {
  display: none;
}

.mobile-search-expanded {
  padding: 8px 0 4px;
}

/* Нижнее мобильное меню — скрыто на desktop */
.mobile-bottom-nav {
  display: none;
}

/* ==================== HEADER ADAPTIVE ==================== */

/* Mobile header optimizations */
@media (max-width: 767px) {
  /* Скрываем верхний тёмный бар полностью */
  .mobile-hide-topbar {
    display: none !important;
  }

  /* Скрываем десктопные элементы шапки */
  .mobile-hide {
    display: none !important;
  }

  /* Компактная высота шапки на мобильных */
  header .py-4 {
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
  }

  /* Логотип меньше на мобильных */
  header .h-20 {
    height: 2.5rem !important;
  }

  /* Показываем мобильные иконки */
  .mobile-header-icons {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  /* Стиль каждой иконки-кнопки */
  .mobile-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
  }

  .mobile-icon-btn:hover {
    background: #e0e7ff;
    color: #6E73F7;
  }

  .mobile-catalog-btn {
    background: #6E73F7;
    color: #fff;
  }

  .mobile-catalog-btn:hover {
    background: #5558e0;
    color: #fff;
  }

  .mobile-catalog-top {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #6E73F7;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mobile-catalog-top:hover {
    background: #5558e0;
  }

  /* Нижнее прилипающее меню */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
  }

  .mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 0;
    font-size: 0.6rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
  }

  .mobile-bottom-nav-item i {
    font-size: 1.2rem;
  }

  .mobile-bottom-nav-item:hover,
  .mobile-bottom-nav-item:active {
    color: #6E73F7;
  }

  /* Badge на корзине в нижнем меню */
  .mobile-cart-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    background: #FFD500;
    color: #111827;
    font-size: 0.55rem;
    font-weight: 900;
    border-radius: 999px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
  }

  /* Отступ снизу чтобы контент не прятался за нижним меню */
  body {
    padding-bottom: 64px;
  }

}

/* Catalog dropdown mobile */
@media (max-width: 768px) {
  #catalog-dropdown {
    top: 120px !important;
  }
  
  #catalog-dropdown-content {
    max-height: calc(100vh - 120px) !important;
  }
  
  #catalog-dropdown-content .grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
  
  #catalog-dropdown-content .col-span-3 {
    grid-column: span 1 !important;
  }
  
  #catalog-dropdown-content .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  #catalog-dropdown-content .border-r {
    border-right: none !important;
  }
}

/* Hover Lift Effect Enhancement */
.category-card:hover {
  box-shadow: 
    0 20px 25px -5px rgba(110, 115, 247, 0.1),
    0 10px 10px -5px rgba(110, 115, 247, 0.04),
    0 0 0 1px rgba(110, 115, 247, 0.1);
}

/* Text Gradient on Hover */
.category-card:hover h4 {
  background: linear-gradient(135deg, #6E73F7 0%, #8B90F9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Line Clamp for Category Names */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;  
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==================== MOBILE FILTERS MODAL ==================== */

/* Mobile filters modal animations */
#filters-modal {
  transition: opacity 0.3s ease;
}

#filters-modal.modal-show {
  opacity: 1 !important;
}

#filters-modal-content {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#filters-modal.modal-show #filters-modal-content {
  transform: translateY(0) !important;
}

/* Accordion smooth transitions */
[class^="filter-accordion-icon-"] {
  transition: transform 0.3s ease;
}

/* Accordion content spacing */
#modal-filters-container > div:last-child {
  margin-bottom: 0 !important;
}

/* ==================== MOBILE HERO BANNERS LAYOUT ==================== */

/* Base styles for banners layout */
.banners-mobile-layout {
  transition: all 0.3s ease;
}

/* Mobile padding adjustments for hero section */
@media (max-width: 767px) {
  section.max-w-7xl.mx-auto.px-4.pt-6.pb-12 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 1rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Mobile-first: Stack banners vertically on small screens */
@media (max-width: 767px) {
  /* Make all banners full width and stack vertically */
  .banners-mobile-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Main carousel takes full width */
  .banners-mobile-layout > div:first-child {
    width: 100% !important;
    min-height: 281px !important;
    height: auto !important;
    max-height: 405px !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
  }
  
  /* Ensure carousel images fit properly and stay within bounds */
  .banners-mobile-layout > div:first-child img {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
  }
  
  /* Carousel track */
  .banners-mobile-layout > div:first-child > div {
    height: 100% !important;
    display: flex !important;
  }
  
  /* Carousel slides */
  .banners-mobile-layout > div:first-child > div > div {
    height: auto !important;
    min-height: 281px !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .banners-mobile-layout > div:first-child > div > div > a {
    height: 100% !important;
    width: 100% !important;
    display: block !important;
    overflow: hidden !important;
  }
  
  .banners-mobile-layout > div:first-child > div > div > a img {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: cover !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }
  
  /* Side banners container */
  .banners-mobile-layout > div:last-child {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Override Tailwind space-y on mobile */
  .banners-mobile-layout > div:last-child.space-y-6 > * + * {
    margin-top: 0 !important;
  }
  
  .banners-mobile-layout > div:last-child.space-y-6 {
    row-gap: 0 !important;
  }
  
  /* Individual side banners */
  .banners-mobile-layout > div:last-child > a {
    width: 100% !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    position: relative !important;
  }
  
  .banners-mobile-layout > div:last-child > a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 1rem !important;
    transition: transform 0.3s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
  }
  
  .banners-mobile-layout > div:last-child > a:hover img {
    transform: scale(1.05) !important;
  }
  
  /* Adjust carousel controls for mobile */
  .banners-mobile-layout button[id^="hero-"] {
    width: 40px !important;
    height: 40px !important;
    font-size: 14px !important;
  }
  
  .banners-mobile-layout button[id^="hero-"] i {
    font-size: 14px !important;
  }
  
  /* Adjust dots for mobile */
  .banners-mobile-layout #hero-dots-container {
    bottom: 1rem !important;
  }
  
  .banners-mobile-layout .hero-dot {
    width: 8px !important;
    height: 8px !important;
  }
  
  /* Ensure images fit properly */
  .banners-mobile-layout img {
    border-radius: 1rem !important;
  }
  
  /* Hide arrows on very small screens (optional) */
  @media (max-width: 380px) {
    .banners-mobile-layout button[id^="hero-prev"] {
      left: 0.5rem !important;
    }
    
    .banners-mobile-layout button[id^="hero-next"] {
      right: 0.5rem !important;
    }
  }
}

/* Tablet view: optimize for medium screens */
@media (min-width: 768px) and (max-width: 1023px) {
  .banners-mobile-layout {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 1.5rem !important;
  }
  
  .banners-mobile-layout > div:first-child {
    min-height: 400px !important;
  }
  
  .banners-mobile-layout > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  
  .banners-mobile-layout > div:last-child > a {
    flex: 1 !important;
    min-height: 0 !important;
  }
  
  .banners-mobile-layout > div:last-child > a img {
    height: 100% !important;
    object-fit: cover !important;
  }
}

/* Desktop: ensure proper layout */
@media (min-width: 1024px) {
  .banners-mobile-layout > div:last-child {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .banners-mobile-layout > div:last-child > a img {
    transition: transform 0.5s ease !important;
  }
  
  .banners-mobile-layout > div:last-child > a:hover img {
    transform: scale(1.05) !important;
  }
}

/* ==================== PRODUCT CARDS ADAPTIVE ==================== */

@media (max-width: 768px) {
  /* Product cards grid spacing */
  .grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-3 {
    gap: 1rem !important;
  }
  
  /* Product card content */
  .product-card-hover {
    padding: 1rem !important;
  }
  
  /* Product card images */
  .product-card-hover img {
    max-height: 180px;
    object-fit: contain;
  }
}

/* ==================== PRODUCT DETAILS PAGE ADAPTIVE ==================== */

@media (max-width: 768px) {
  /* Product details grid */
  .grid.grid-cols-1.md\\:grid-cols-2 {
    gap: 1.5rem !important;
  }
  
  /* Product gallery */
  .product-gallery {
    max-height: 300px;
  }
  
  /* Product info sections */
  .space-y-6 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
}

/* ==================== FOOTER ADAPTIVE ==================== */

@media (max-width: 768px) {
  /* Footer grid */
  footer .grid-cols-1.md\\:grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  /* Payment logos */
  footer .flex-wrap {
    justify-content: center !important;
    gap: 0.5rem !important;
  }
  
  /* Footer text alignment */
  footer .text-center.md\\:text-left {
    text-align: center !important;
  }
}

/* ==================== CART AND CHECKOUT ADAPTIVE ==================== */

@media (max-width: 768px) {
  /* Cart items */
  .cart-item {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .cart-item img {
    width: 100% !important;
    max-width: 200px;
    margin: 0 auto 1rem auto;
  }
  
  /* Checkout steps */
  .step-indicator {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .step-dot {
    width: 100% !important;
  }
}

/* ==================== BREADCRUMBS ADAPTIVE ==================== */

@media (max-width: 480px) {
  /* Breadcrumbs overflow handling */
  nav.flex.items-center.space-x-2 {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  nav.flex.items-center.space-x-2::-webkit-scrollbar {
    display: none;
  }
}

/* ==================== PAGINATION ADAPTIVE ==================== */

@media (max-width: 640px) {
  /* Pagination buttons */
  .flex.items-center.justify-between.text-xs {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .flex.items-center.space-x-1 {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* Hide "Next/Prev" text on very small screens */
  @media (max-width: 380px) {
    .flex.items-center.gap-1\\.5 span {
      display: none;
    }
  }
}

/* ==================== GENERAL MOBILE OPTIMIZATIONS ==================== */

@media (max-width: 768px) {
  /* Reduce padding on mobile */
  .py-12 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Adjust font sizes */
  .text-3xl {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
  }
  
  .text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
  }
  
  /* Rounded corners on mobile */
  .rounded-3xl {
    border-radius: 1.5rem !important;
  }
  
  .rounded-2xl {
    border-radius: 1rem !important;
  }
}

/* ==================== SEARCH RESULTS DROPDOWN ADAPTIVE ==================== */

@media (max-width: 768px) {
  #search-results {
    max-height: 300px !important;
    font-size: 0.75rem;
  }
  
  #search-results img {
    width: 50px !important;
    height: 50px !important;
  }
}

/* ==================== MODAL IMPROVEMENTS ==================== */

@media (max-width: 640px) {
  /* General modal adjustments */
  .fixed.inset-0 > div {
    max-width: 95% !important;
    margin: 0.5rem;
  }
  
  /* Modal content */
  .modal-show > div {
    max-height: 90vh;
    overflow-y: auto;
  }
}

