/* Optimización específica para móviles - Soukia.ma */
/* No afecta la vista de escritorio */

/* ===== OPTIMIZACIONES GENERALES PARA MÓVIL ===== */
@media (max-width: 768px) {
  
  /* Ajustar contenedores principales */
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  /* Optimizar cards de productos para móvil */
  .product-card {
    margin-bottom: 15px !important;
  }
  
  .product-card .card-img-top {
    height: 150px !important;
    object-fit: cover !important;
  }
  
  .product-card .card-body {
    padding: 12px !important;
  }
  
  .product-card .card-title {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
  }
  
  /* Botones más grandes para móvil */
  .product-card .btn {
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    margin-bottom: 5px !important;
  }
  
  /* Ajustar grid de productos para móvil */
  .col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  
  /* Espaciado entre secciones */
  .bg-white.rounded-3 {
    margin-bottom: 20px !important;
    padding: 15px !important;
  }
  
  /* Títulos de sección más pequeños */
  .h3 {
    font-size: 1.4rem !important;
    margin-bottom: 15px !important;
  }
  
  /* Ocultar elementos innecesarios en móvil */
  .promo-desktop-only {
    display: none !important;
  }
  
  /* Optimizar carrusel para móvil */
  .carousel-inner img {
    height: 200px !important;
    object-fit: cover !important;
  }
  
  /* Ajustar indicadores del carrusel */
  .carousel-indicators {
    bottom: 10px !important;
  }
  
  .carousel-indicators li {
    width: 8px !important;
    height: 8px !important;
    margin: 0 3px !important;
  }
}

/* ===== OPTIMIZACIONES PARA PANTALLAS MUY PEQUEÑAS ===== */
@media (max-width: 576px) {
  
  /* Una columna en pantallas muy pequeñas */
  .col-sm-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  
  /* Ajustar padding de contenedores */
  .container {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  /* Cards más compactas */
  .product-card .card-body {
    padding: 10px !important;
  }
  
  .product-card .card-title {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
  }
  
  /* Botones más pequeños pero táctiles */
  .product-card .btn {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
    min-height: 36px !important;
  }
  
  /* Ajustar precios */
  .h5 {
    font-size: 0.9rem !important;
  }
  
  /* Ocultar carrusel en móviles muy pequeños */
  .carousel {
    display: none !important;
  }
}

/* ===== OPTIMIZACIONES PARA TABLETS ===== */
@media (min-width: 769px) and (max-width: 991px) {
  
  /* 3 columnas en tablets */
  .col-md-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }
  
  /* Ajustar altura de imágenes */
  .product-card .card-img-top {
    height: 160px !important;
  }
  
  /* Botones medianos */
  .product-card .btn {
    padding: 7px 11px !important;
    font-size: 0.8rem !important;
  }
}

/* ===== MEJORAS DE USABILIDAD MÓVIL ===== */
@media (max-width: 768px) {
  
  /* Aumentar área táctil de botones */
  .btn {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  /* Mejorar espaciado entre elementos */
  .mb-4 {
    margin-bottom: 1rem !important;
  }
  
  /* Optimizar texto para lectura móvil */
  .card-title {
    line-height: 1.4 !important;
    word-wrap: break-word !important;
  }
  
  /* Ajustar badges */
  .badge {
    font-size: 0.7rem !important;
    padding: 4px 6px !important;
  }
  
  /* Mejorar contraste en móvil */
  .text-muted {
    color: #6c757d !important;
  }
  
  /* Optimizar precios para móvil */
  .h5.text-primary,
  .h5.text-danger {
    font-weight: 600 !important;
  }
  
  /* Ajustar iconos */
  .fa {
    font-size: 0.9em !important;
  }
}

/* ===== OPTIMIZACIONES ESPECÍFICAS DEL HEADER MÓVIL ===== */
@media (max-width: 768px) {
  
  /* Ajustar logo en móvil */
  .navbar-brand img {
    max-height: 60px !important;
  }
  
  /* Optimizar buscador móvil */
  .d-none.d-lg-block {
    display: none !important;
  }
  
  /* Ajustar menú móvil */
  .navbar-toggler {
    padding: 4px 8px !important;
  }
  
  /* Optimizar dropdowns móviles */
  .dropdown-menu {
    font-size: 0.9rem !important;
    padding: 8px 0 !important;
  }
  
  .dropdown-item {
    padding: 8px 16px !important;
  }
}

/* ===== OPTIMIZACIONES DEL FOOTER MÓVIL ===== */
@media (max-width: 768px) {
  
  /* Footer más compacto */
  .footer {
    padding: 20px 0 !important;
  }
  
  /* Ajustar columnas del footer */
  .footer .col-md-3 {
    margin-bottom: 20px !important;
  }
  
  /* Optimizar enlaces del footer */
  .footer a {
    font-size: 0.9rem !important;
    padding: 5px 0 !important;
  }
}

/* ===== MEJORAS DE RENDIMIENTO MÓVIL ===== */
@media (max-width: 768px) {
  
  /* Reducir sombras para mejor rendimiento */
  .shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
  }
  
  /* Optimizar transiciones */
  .card {
    transition: transform 0.2s ease !important;
  }
  
  .card:hover {
    transform: translateY(-2px) !important;
  }
  
  /* Reducir efectos visuales pesados */
  .bg-gradient {
    background: #f8f9fa !important;
  }
}

/* ===== CORRECCIONES ESPECÍFICAS PARA SOUKIA.MA ===== */
@media (max-width: 768px) {
  
  /* Ajustar secciones de productos destacados */
  .d-flex.justify-content-between.align-items-center {
    flex-direction: column !important;
    align-items: flex-start !important;
    margin-bottom: 15px !important;
  }
  
  /* Optimizar contadores de productos */
  .text-muted {
    font-size: 0.8rem !important;
    margin-top: 5px !important;
  }
  
  /* Ajustar grid de productos para mejor distribución */
  .row .col-lg-2 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  
  /* Optimizar espaciado entre productos */
  .row .col-lg-2.mb-4 {
    margin-bottom: 15px !important;
  }
  
  /* Mejorar legibilidad de precios */
  .d-flex.align-items-center {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .d-flex.align-items-center .h5 {
    margin-bottom: 2px !important;
  }
  
  .d-flex.align-items-center small {
    margin-left: 0 !important;
  }
}

/* ===== OPTIMIZACIONES PARA PANTALLAS LANDSCAPE MÓVIL ===== */
@media (max-width: 768px) and (orientation: landscape) {
  
  /* Ajustar para orientación horizontal */
  .product-card .card-img-top {
    height: 120px !important;
  }
  
  .product-card .card-body {
    padding: 8px !important;
  }
  
  .product-card .card-title {
    font-size: 0.75rem !important;
  }
  
  .product-card .btn {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
  }
}
