/* ============================================
   RAZOCONNECT - MOBILE RESPONSIVE FIXES
   Mobile-First Design System
   Breakpoints: 480px, 768px, 1024px
   ============================================ */

/* ============================================
   GLOBAL RESPONSIVE IMAGES
   ============================================ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
}

/* Ensure all containers respect viewport width */
* {
  box-sizing: border-box;
}

/* Prevent text from forcing horizontal scroll */
.container,
.hero-content,
.benefits-section,
.landing-brands,
.landing-featured {
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================
   DESKTOP NAVBAR - HIDE HAMBURGER
   ============================================ */
.navbar-toggle {
  display: none;
}

@media (min-width: 769px) {
  .navbar-toggle {
    display: none !important;
  }
  
  .navbar-menu {
    display: flex !important;
  }
}

/* ============================================
   MOBILE FIRST - BASE STYLES (< 480px)
   ============================================ */
@media (max-width: 480px) {
  /* Typography adjustments */
  h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.5rem !important;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  /* Hero section typography - extra small screens */
  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
    line-height: 1.4 !important;
    padding: 0.5rem 1rem !important;
  }

  .hero-icon {
    font-size: 2.5rem !important;
    width: 70px !important;
    height: 70px !important;
  }

  /* Section titles */
  .section-title,
  .landing-section-title {
    font-size: 1.5rem !important;
  }

  .section-subtitle,
  .landing-section-subtitle {
    font-size: 1rem !important;
  }

  /* Container padding reduction */
  .container,
  .admin-container {
    padding: 0 0.75rem !important;
  }

  /* Form containers */
  .form-container,
  .admin-login-box {
    padding: 1rem !important;
    margin: 0.5rem !important;
    max-width: 100% !important;
  }

  /* Buttons full width on small mobile */
  .btn,
  .admin-btn,
  button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }

  /* Input fields */
  input,
  select,
  textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
    width: 100%;
  }

  /* Cards padding */
  .product-card,
  .admin-card,
  .stat-card {
    padding: 1rem !important;
  }

  /* Modal adjustments */
  .modal-content {
    margin: 0.5rem !important;
    padding: 1rem !important;
    max-width: calc(100% - 1rem) !important;
  }
}

/* ============================================
   TABLET & MOBILE (< 768px)
   ============================================ */
@media (max-width: 768px) {
  /* ========== LAYOUT ========== */
  
  /* Hero sections - stack vertically */
  .hero-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .hero-image {
    order: -1; /* Image first on mobile */
    max-height: 300px;
  }

  /* Footer - single column */
  .footer-content,
  .rz-footer-top {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* ========== NAVIGATION - LIMPIO Y SIMPLE ========== */
  
  /* Navbar en móviles */
  .navbar {
    padding: 0.75rem 0;
  }

  .navbar-brand img {
    height: 28px;
  }

  /* Espaciador de contenido - usar en páginas que lo necesiten */
  .main-content-spacer {
    padding-top: 2rem !important;
  }

  .navbar-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  /* Navbar menu - hamburger style */
  .navbar-menu {
    display: none;
    flex-direction: column !important;
    width: 100%;
    gap: 0.75rem !important;
    padding: 1rem 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu.active {
    display: flex !important;
  }

  .navbar-menu li {
    width: 100%;
    text-align: center;
  }

  .navbar-menu .btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.875rem 1.5rem !important;
    margin: 0 !important;
  }

  .navbar-menu .navbar-link {
    display: block;
    padding: 0.75rem 1rem;
    width: 100%;
  }

  /* Hamburger toggle button */
  .navbar-toggle {
    display: block !important;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--razo-orange, #ff9966);
    z-index: 1000;
    padding: 0.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
  }

  .navbar-toggle:hover {
    transform: scale(1.1);
  }

  .navbar-toggle:active {
    transform: scale(0.95);
  }

  /* Navbar container adjustments */
  .navbar-container {
    position: relative;
  }

  .navbar-search {
    order: 3;
    width: 100%;
  }

  /* ========== ADMIN PANEL - MOBILE FIRST ========== */
  
  /* Admin sidebar - off-canvas with overlay */
  .admin-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .admin-sidebar.active {
    left: 0;
  }

  /* Sidebar overlay - dark backdrop when sidebar is open */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Hamburger menu button - top left */
  .sidebar-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 44px;
    height: 44px;
    background: var(--razo-orange, #F97316);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all 0.3s ease;
  }

  .sidebar-toggle-btn:hover {
    background: var(--razo-orange-dark, #ea580c);
    transform: scale(1.05);
  }

  .sidebar-toggle-btn:active {
    transform: scale(0.95);
  }

  /* Admin main content - full width on mobile */
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .admin-main-content {
    margin-left: 0 !important;
    padding: 1rem !important;
  }

  /* Admin header adjustments */
  .admin-header {
    padding: 1rem 1rem 1rem 4rem !important; /* Space for hamburger */
    height: auto !important;
    min-height: 60px;
  }

  /* Admin content - add top padding for hamburger button */
  .admin-content {
    padding: 1rem !important;
    padding-top: 4rem !important; /* Space for hamburger */
  }

  /* Admin grids - single column */
  .admin-grid-lg,
  .admin-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Admin cards */
  .admin-card {
    padding: 1rem !important;
    margin-bottom: 1rem;
    border-radius: 0.75rem !important;
  }

  .admin-card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .admin-card-header-actions {
    width: 100%;
  }

  .admin-card-header-actions .btn {
    width: 100%;
  }

  .admin-card-toolbar {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Admin search forms - full width */
  .admin-search {
    width: 100% !important;
  }

  .search-group {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .search-group input {
    width: 100% !important;
  }

  .search-group .btn {
    width: 100% !important;
  }

  /* ========== TABLES - CARD VIEW ON MOBILE ========== */
  
  /* Hide table headers on mobile */
  .admin-table thead {
    display: none;
  }

  /* Transform table rows into cards */
  .admin-table,
  .admin-table tbody {
    display: block;
    width: 100%;
  }

  .admin-table tbody tr {
    display: block;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
  }

  .admin-table tbody tr:last-child {
    margin-bottom: 0;
  }

  /* Transform table cells into key-value pairs */
  .admin-table tbody td {
    display: block;
    text-align: left !important;
    padding: 0.5rem 0 !important;
    border: none !important;
    position: relative;
    padding-left: 45% !important;
    min-height: 32px;
  }

  /* Add labels before each cell using data-label attribute */
  .admin-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 0.5rem;
    font-weight: 600;
    color: var(--razo-gray-warm, #6b5d57);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 40%;
  }

  /* Action buttons in table cells */
  .admin-table tbody td:last-child {
    padding-top: 1rem !important;
    padding-left: 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin-top: 0.5rem;
  }

  .admin-table tbody td:last-child::before {
    display: none;
  }

  .admin-table tbody td .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .admin-table tbody td .btn:last-child {
    margin-bottom: 0;
  }

  /* Empty state row */
  .table-empty-state,
  .table-empty-state-row td {
    padding: 2rem 1rem !important;
    text-align: center !important;
  }

  .table-empty-state::before,
  .table-empty-state-row td::before {
    display: none !important;
  }

  /* Table containers */
  .admin-table-container,
  .table-responsive,
  .dashboard-table-wrapper {
    overflow-x: visible !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
  }

  /* Modal tables */
  .modal-table-scroll {
    max-height: 60vh !important;
  }

  /* Table header (title area) */
  .admin-table-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .admin-table-header .btn {
    width: 100%;
  }

  /* ========== CART & PRODUCTS ========== */
  
  /* Cart items - Mobile optimized layout */
  .cart-item {
    display: flex !important;
    flex-direction: column !important;
    padding: 1rem !important;
    gap: 0 !important;
    position: relative;
  }

  .cart-item-image {
    width: 100% !important;
    max-width: 120px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 0.5rem !important;
    margin: 0 auto 1rem auto !important;
  }

  .cart-item-info {
    width: 100% !important;
    padding: 0 !important;
  }

  .cart-item-title {
    font-size: 1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
    word-break: break-word !important;
  }

  .cart-item-details {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    margin-bottom: 0.75rem !important;
    word-break: break-word !important;
  }

  /* Status badges container - Flexbox with wrap */
  .cart-item-info > p:has(.badge),
  .cart-item-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin: 0.75rem 0 !important;
  }

  /* Individual badges - ensure proper spacing */
  .cart-item .badge {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.65rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Quantity controls - Better alignment */
  .cart-item-info > div[style*="display: flex"] {
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
  }

  /* Quantity buttons group */
  .cart-item-info > div > div[style*="background"] {
    flex-shrink: 0 !important;
  }

  /* Price section - Better hierarchy */
  .cart-item-price {
    width: 100% !important;
    margin-top: 1rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .cart-item-subtotal {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--razo-orange, #F97316) !important;
    margin: 0 !important;
  }

  /* Delete button - repositioned for mobile */
  .cart-item > button[onclick*="eliminarProducto"] {
    position: absolute !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
    z-index: 10 !important;
  }

  /* Change variant button */
  .cart-item-change-variant {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    display: inline-block !important;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
  }

  /* Cart summary - Stack on mobile */
  #cartContent > div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 1.5rem !important;
  }

  #cartContent .summary {
    position: static !important;
    width: 100% !important;
    margin-bottom: 1.5rem !important;
  }

  /* ========== PRODUCT GRID - NIKE STYLE 2 COLUMNS ========== */
  
  /* Product grid - 2 columns with tight gap for mobile */
  .product-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 0.5rem;
  }

  /* Product card - compact and square proportions */
  .product-card {
    max-width: 100%;
    margin: 0;
    border-radius: 0.5rem;
    overflow: hidden;
  }

  /* Image container - force square aspect ratio */
  .imagen-wrapper {
    aspect-ratio: 1 / 1 !important;
    max-height: none !important;
    height: auto !important;
    overflow: hidden;
    position: relative;
  }

  /* Product media - cover to fill square container */
  .product-media {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1;
  }

  /* Fallback emoji media */
  .product-media--fallback {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 3rem !important;
    background: #f5f5f5 !important;
  }

  /* Product info - compact padding */
  .product-info {
    padding: 8px !important;
  }

  /* Product category - smaller and more compact */
  .product-category {
    font-size: 0.65rem !important;
    padding: 0.1rem 0.45rem !important;
    margin-bottom: 0.25rem !important;
  }

  /* Product title - compact with line clamp */
  .product-title {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    margin: 0.25rem 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 2.6em !important;
  }

  /* Product price - compact */
  .product-price {
    font-size: 0.85rem !important;
    margin-top: 0.35rem !important;
  }

  /* Price components - smaller */
  .precio-normal,
  .precio-oferta {
    font-size: 0.85rem !important;
  }

  .precio-original {
    font-size: 0.75rem !important;
  }

  /* CTA button - hide on mobile, tap card instead */
  .product-cta-wrapper {
    display: none !important;
  }

  /* Floating cart button - smaller and subtle */
  .cart-floating-btn {
    width: 32px !important;
    height: 32px !important;
    bottom: 6px !important;
    right: 6px !important;
    padding: 0 !important;
  }

  .cart-floating-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Product badges - smaller and tighter */
  .product-badge {
    font-size: 0.6rem !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0 0 0.5rem 0 !important;
  }

  /* Stock info - smaller text */
  .product-stock {
    font-size: 0.7rem !important;
    margin-top: 0.25rem !important;
  }

  /* Medida badge - compact */
  .product-badge--medida {
    font-size: 0.6rem !important;
    padding: 0.2rem 0.4rem !important;
    margin-top: 0.25rem !important;
  }

  .product-card-image {
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }

  /* ========== FORMS ========== */
  
  /* Form groups stack vertically */
  .form-row,
  .form-group-row {
    flex-direction: column !important;
    gap: 1rem;
  }

  .form-group {
    width: 100% !important;
  }

  /* Form labels */
  label {
    font-size: 0.9rem;
  }

  /* Input groups */
  .input-group {
    flex-direction: column;
  }

  .input-group-text {
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0 !important;
  }

  .input-group input {
    border-radius: 0 0 0.5rem 0.5rem !important;
  }

  /* ========== MODALS ========== */
  
  .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 1rem auto !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header {
    padding: 1rem !important;
  }

  .modal-body {
    padding: 1rem !important;
  }

  .modal-footer {
    padding: 1rem !important;
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* ========== STATS & METRICS - STACK VERTICALLY ========== */
  
  .stats-grid,
  .metrics-grid,
  .testimonials-grid,
  .admin-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .stat-card,
  .admin-stat-card {
    text-align: left;
    padding: 1.25rem !important;
  }

  /* Stat card header - better mobile layout */
  .admin-stat-header {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: flex-start;
  }

  .admin-stat-content {
    flex: 1;
  }

  .admin-stat-icon {
    font-size: 2rem !important;
    width: 48px !important;
    height: 48px !important;
    flex-shrink: 0;
  }

  .admin-stat-value {
    font-size: 1.75rem !important;
    margin: 0.5rem 0;
  }

  .admin-stat-change {
    font-size: 0.8rem !important;
  }

  /* ========== FEATURES & BENEFITS ========== */
  
  .features-grid,
  .benefits-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Benefits section - prevent overflow */
  .benefits-section {
    padding: 3rem 0 !important;
    overflow-x: hidden;
  }

  .benefit-card {
    padding: 1.5rem !important;
    margin: 0 0.5rem;
  }

  /* Brands grid - single column */
  .landing-brands-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .brand-card {
    margin: 0 0.5rem;
  }

  /* Featured products grid - single column */
  .landing-featured-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .featured-card {
    max-width: 100%;
    margin: 0 0.5rem;
  }

  .featured-card-image {
    height: 200px !important;
  }

  /* Landing sections - proper spacing */
  .landing-brands,
  .landing-featured {
    padding: 3rem 0 !important;
  }

  .landing-section-title {
    font-size: 1.75rem !important;
    margin-bottom: 0.75rem !important;
  }

  .landing-section-subtitle {
    font-size: 1rem !important;
    margin-bottom: 2rem !important;
  }

  /* ========== BUTTONS & ACTIONS ========== */
  
  /* Button groups stack vertically */
  .btn-group,
  .button-group,
  .hero-ctas {
    flex-direction: column !important;
    width: 100%;
  }

  .btn-group .btn,
  .button-group .btn {
    width: 100%;
    margin: 0.25rem 0;
  }

  /* Hero CTA buttons - stack with proper spacing */
  .hero-cta-group {
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    text-align: center;
    box-sizing: border-box;
  }

  /* Remove pseudo-elements that may cause visual artifacts */
  .btn-hero-primary::before,
  .btn-hero-primary::after,
  .btn-hero-secondary::before,
  .btn-hero-secondary::after {
    display: none !important;
  }

  /* Featured section button fixes */
  .btn-view-all {
    width: 100% !important;
    max-width: 300px;
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
    box-sizing: border-box;
  }

  .landing-featured-cta {
    padding: 0 1rem;
  }

  /* Hero trust indicators - stack vertically */
  .hero-trust {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: center;
  }

  .hero-trust-item {
    font-size: 0.9rem !important;
    text-align: center;
  }

  /* Action buttons */
  .admin-actions,
  .dashboard-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* ========== FILTERS & SIDEBAR ========== */
  
  /* Sidebar filters - collapse by default */
  .sidebar-filtros,
  .filters-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 9998;
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  .sidebar-filtros.active,
  .filters-sidebar.active {
    left: 0;
  }

  /* Filter toggle button */
  .filter-toggle-btn {
    display: block !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9997;
  }

  /* ========== NOTIFICATIONS & DROPDOWNS ========== */
  
  .notifications-dropdown,
  .user-dropdown {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90vw !important;
    max-width: 400px;
  }

  /* ========== PAGINATION ========== */
  
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }

  .pagination .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  /* ========== BREADCRUMBS ========== */
  
  .breadcrumb {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  /* ========== ALERTS & TOASTS ========== */
  
  .alert,
  .toast {
    font-size: 0.9rem;
    padding: 0.75rem !important;
  }

  /* ========== CAROUSEL / SLIDER CONTROLS ========== */
  
  /* FIX: Reducir botones de navegación del carrusel en móviles */
  .carousel-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.875rem !important;
  }

  .carousel-btn.prev {
    left: 4px !important;
  }

  .carousel-btn.next {
    right: 4px !important;
  }

  /* Botones de control de carrusel Bootstrap (si existen) */
  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 20px !important;
    height: 20px !important;
    background-size: 100% 100% !important;
  }

  /* Botones Swiper (si existen) */
  .swiper-button-next,
  .swiper-button-prev {
    width: 28px !important;
    height: 28px !important;
  }

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

  /* ========== SPACING UTILITIES ========== */
  
  /* Reduce large paddings */
  .py-5,
  .pt-5,
  .pb-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .px-5,
  .pl-5,
  .pr-5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Reduce large margins */
  .my-5,
  .mt-5,
  .mb-5 {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
  }

  .mx-5,
  .ml-5,
  .mr-5 {
    margin-left: 1rem !important;
    margin-right: 1rem !important;
  }
}

/* ============================================
   TABLET LANDSCAPE (769px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Admin grid - 1 column on tablets */
  .admin-grid-lg {
    grid-template-columns: 1fr !important;
  }

  /* Product grid - 2 columns on tablets ONLY (not mobile) */
  .product-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem;
  }

  /* Stats grid - 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Features grid - 2 columns */
  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Reduce container max-width */
  .container {
    max-width: 100% !important;
    padding: 0 1.5rem !important;
  }

  /* Admin sidebar - reduce width */
  .admin-sidebar {
    width: 240px;
  }
}

/* ============================================
   GLOBAL RESPONSIVE TABLES - TABLETS & iPADS
   Transform ALL tables to card layout on devices < 1024px
   Fixes iPad vertical orientation and tablet issues
   ============================================ */
@media (max-width: 1024px) {
  /* Force all table elements to block display */
  table,
  .admin-table,
  .table,
  .responsive-table {
    display: block !important;
    width: 100% !important;
  }

  table thead,
  .admin-table thead,
  .table thead,
  .responsive-table thead {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  table tbody,
  .admin-table tbody,
  .table tbody,
  .responsive-table tbody {
    display: block !important;
    width: 100% !important;
  }

  /* Transform each row into a card */
  table tbody tr,
  .admin-table tbody tr,
  .table tbody tr,
  .responsive-table tbody tr {
    display: block !important;
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
  }

  table tbody tr:last-child,
  .admin-table tbody tr:last-child,
  .table tbody tr:last-child,
  .responsive-table tbody tr:last-child {
    margin-bottom: 0 !important;
  }

  /* Transform cells into rows with labels */
  table tbody td,
  .admin-table tbody td,
  .table tbody td,
  .responsive-table tbody td {
    display: block !important;
    text-align: left !important;
    padding: 0.5rem 0 !important;
    padding-left: 45% !important;
    border: none !important;
    position: relative !important;
    min-height: 32px !important;
  }

  /* Add labels before each cell using data-label attribute */
  table tbody td::before,
  .admin-table tbody td::before,
  .table tbody td::before,
  .responsive-table tbody td::before {
    content: attr(data-label) !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.5rem !important;
    font-weight: 600 !important;
    color: var(--razo-gray-warm, #6b5d57) !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    width: 40% !important;
  }

  /* Action buttons column - full width at bottom */
  table tbody td:last-child,
  .admin-table tbody td:last-child,
  .table tbody td:last-child,
  .responsive-table tbody td:last-child {
    padding-top: 1rem !important;
    padding-left: 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin-top: 0.5rem !important;
  }

  table tbody td:last-child::before,
  .admin-table tbody td:last-child::before,
  .table tbody td:last-child::before,
  .responsive-table tbody td:last-child::before {
    display: none !important;
  }

  /* Buttons in action cells - full width */
  table tbody td .btn,
  .admin-table tbody td .btn,
  .table tbody td .btn,
  .responsive-table tbody td .btn {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }

  table tbody td .btn:last-child,
  .admin-table tbody td .btn:last-child,
  .table tbody td .btn:last-child,
  .responsive-table tbody td .btn:last-child {
    margin-bottom: 0 !important;
  }

  /* Empty state rows */
  .table-empty-state,
  .table-empty-state-row,
  table tbody tr.empty-state,
  .admin-table tbody tr.empty-state {
    padding: 2rem 1rem !important;
    text-align: center !important;
  }

  .table-empty-state td,
  .table-empty-state-row td,
  table tbody tr.empty-state td,
  .admin-table tbody tr.empty-state td {
    padding: 2rem 1rem !important;
    text-align: center !important;
    padding-left: 1rem !important;
  }

  .table-empty-state td::before,
  .table-empty-state-row td::before,
  table tbody tr.empty-state td::before,
  .admin-table tbody tr.empty-state td::before {
    display: none !important;
  }

  /* Table containers - remove horizontal scroll */
  .admin-table-container,
  .table-responsive,
  .dashboard-table-wrapper,
  .table-container {
    overflow-x: visible !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 0.5rem !important;
  }

  /* Images in table cells */
  table tbody td img,
  .admin-table tbody td img,
  .table tbody td img {
    max-width: 100px !important;
    height: auto !important;
    display: block !important;
    margin: 0.5rem 0 !important;
  }

  /* Badges in table cells */
  table tbody td .badge,
  .admin-table tbody td .badge,
  .table tbody td .badge {
    display: inline-block !important;
    margin: 0.25rem 0.25rem 0.25rem 0 !important;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION FIXES
   ============================================ */
@media (max-height: 600px) and (orientation: landscape) {
  /* Reduce header heights */
  .admin-header,
  .navbar {
    padding: 0.5rem 1rem !important;
  }

  /* Reduce modal heights */
  .modal-content {
    max-height: 85vh !important;
  }

  /* Compact form spacing */
  .form-group {
    margin-bottom: 0.75rem !important;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hide on mobile */
.hide-mobile {
  display: none !important;
}

@media (min-width: 769px) {
  .hide-mobile {
    display: block !important;
  }
}

/* Show only on mobile */
.show-mobile {
  display: block !important;
}

@media (min-width: 769px) {
  .show-mobile {
    display: none !important;
  }
}

/* Responsive text alignment */
@media (max-width: 768px) {
  .text-center-mobile {
    text-align: center !important;
  }

  .text-left-mobile {
    text-align: left !important;
  }
}

/* Full width on mobile */
@media (max-width: 768px) {
  .full-width-mobile {
    width: 100% !important;
  }
}

/* Stack on mobile */
@media (max-width: 768px) {
  .stack-mobile {
    flex-direction: column !important;
  }
}

/* ============================================
   SCROLLBAR STYLING FOR MOBILE
   ============================================ */
@media (max-width: 768px) {
  /* Thin scrollbars for better mobile UX */
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
  }
}

/* ============================================
   TOUCH IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
  /* Larger touch targets */
  a,
  button,
  .btn,
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 44px;
    min-width: 44px;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent text size adjustment */
  body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }

  /* Remove tap highlight */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* ========== FILTER TABS - MOBILE FRIENDLY ========== */
  
  .admin-filter-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .admin-filter-btn {
    white-space: nowrap;
    min-width: auto;
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
  }

  /* ========== FORM IMPROVEMENTS ========== */
  
  /* Input fields - prevent iOS zoom */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .form-control,
  .form-input {
    min-height: 44px;
    padding: 0.75rem 1rem !important;
    font-size: 16px !important;
  }

  /* Select dropdowns */
  select.form-control,
  select.form-input {
    background-position: right 0.75rem center;
    padding-right: 2.5rem !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  /* Hide navigation and non-essential elements */
  .navbar,
  .admin-sidebar,
  .footer,
  .btn,
  .admin-actions,
  .filter-toggle-btn {
    display: none !important;
  }

  /* Full width for printing */
  .container,
  .admin-main-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Remove shadows and backgrounds */
  .admin-card,
  .product-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  /* Ensure tables fit */
  .admin-table {
    font-size: 10pt;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus visible for keyboard navigation */
@media (max-width: 768px) {
  *:focus-visible {
    outline: 3px solid var(--razo-orange, #ff9966);
    outline-offset: 2px;
  }

  /* Skip to main content link */
  .skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
  }

  .skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    background: var(--razo-orange, #ff9966);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {
  /* Reduce animations on mobile for performance */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* Optimize images */
  img {
    image-rendering: -webkit-optimize-contrast;
  }

  /* ============================================
     MODAL CLIENTE SELECTION - MOBILE CARDS
     ============================================ */
  
  /* Hide table headers in modal */
  #tablaClientesDisponibles thead {
    display: none !important;
  }

  /* Transform modal table to block layout */
  #tablaClientesDisponibles,
  #tablaClientesDisponibles tbody {
    display: block !important;
    width: 100%;
  }

  /* Transform each row into a card */
  #tablaClientesDisponibles tbody tr.cliente-row {
    display: flex !important;
    align-items: center;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    gap: 1rem;
  }

  /* Selected state */
  #tablaClientesDisponibles tbody tr.cliente-row.selected-row {
    border-color: var(--razo-orange, #F97316);
    background: rgba(249, 115, 22, 0.03);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
  }

  /* Radio button column - left side with large touch area */
  #tablaClientesDisponibles tbody tr.cliente-row td.table-radio {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: none !important;
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  #tablaClientesDisponibles tbody tr.cliente-row td.table-radio::before {
    display: none !important;
  }

  #tablaClientesDisponibles tbody tr.cliente-row td.table-radio input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    cursor: pointer;
    accent-color: var(--razo-orange, #F97316);
  }

  /* Content area - stacked layout */
  #tablaClientesDisponibles tbody tr.cliente-row td:not(.table-radio) {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    width: auto !important;
    flex: 1;
  }

  #tablaClientesDisponibles tbody tr.cliente-row td:not(.table-radio)::before {
    display: none !important;
  }

  /* Name - bold and prominent */
  #tablaClientesDisponibles tbody tr.cliente-row td:nth-child(2) {
    font-weight: 700 !important;
    font-size: 1rem !important;
    color: #1f2d3d;
    margin-bottom: 0.35rem;
    line-height: 1.3;
  }

  /* Email and phone - smaller gray text */
  #tablaClientesDisponibles tbody tr.cliente-row td:nth-child(3),
  #tablaClientesDisponibles tbody tr.cliente-row td:nth-child(4) {
    font-size: 0.85rem !important;
    color: #6b5d57;
    line-height: 1.4;
    margin-bottom: 0.15rem;
  }

  /* Last child - no margin */
  #tablaClientesDisponibles tbody tr.cliente-row td:last-child {
    margin-bottom: 0 !important;
  }

  /* Empty state row */
  #tablaClientesDisponibles tbody tr.table-empty-state-row {
    display: block !important;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 2rem 1rem !important;
    text-align: center;
    margin-bottom: 0;
  }

  #tablaClientesDisponibles tbody tr.table-empty-state-row td {
    display: block !important;
    padding: 0 !important;
    text-align: center !important;
  }

  #tablaClientesDisponibles tbody tr.table-empty-state-row td::before {
    display: none !important;
  }

  /* Modal table scroll container adjustments */
  .modal-table-scroll {
    max-height: 55vh !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure modal search form is full width */
  #formBuscarClienteDisponible {
    width: 100% !important;
  }

  #formBuscarClienteDisponible .search-group {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  #formBuscarClienteDisponible .search-group input,
  #formBuscarClienteDisponible .search-group .btn {
    width: 100% !important;
  }
}

/* ============================================
   TABLET RESPONSIVE - PRODUCTS TABLE CARD VIEW
   iPad Vertical Mode (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
  /* ========== ADMIN PRODUCTS TABLE - CARD TRANSFORMATION ========== */
  
  /* Hide table headers - no column headers needed in card view */
  #productsTable thead {
    display: none !important;
  }

  /* Transform table structure to block layout */
  #productsTable,
  #productsTable tbody {
    display: block !important;
    width: 100%;
  }

  /* Transform each row into a beautiful card */
  #productsTable tbody tr {
    display: flex !important;
    flex-direction: column !important;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 0;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
  }

  #productsTable tbody tr:hover {
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.15);
    transform: translateY(-2px);
  }

  #productsTable tbody tr:last-child {
    margin-bottom: 0;
  }

  /* Reset all table cells to block display */
  #productsTable tbody td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    width: 100% !important;
  }

  /* ========== CARD HEADER - Image + Product Name/SKU ========== */
  
  /* First cell: Product Name/ID - Header with image-like layout */
  #productsTable tbody tr td:nth-child(1) {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    padding: 1.25rem !important;
    border-bottom: 2px solid rgba(249, 115, 22, 0.1) !important;
    display: flex !important;
    align-items: center;
    gap: 1rem;
  }

  /* Product icon/placeholder (using emoji or first letter) */
  #productsTable tbody tr td:nth-child(1)::before {
    content: "📦";
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 80px;
    min-width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--razo-orange, #F97316), var(--razo-orange-dark, #ea580c));
    border-radius: 0.75rem;
    font-size: 2.5rem;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    flex-shrink: 0;
  }

  /* Product name and ID styling */
  #productsTable tbody tr td:nth-child(1) > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  #productsTable tbody tr td:nth-child(1) > div > div:first-child {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #1f2d3d;
    line-height: 1.3;
  }

  #productsTable tbody tr td:nth-child(1) > div > div:last-child {
    font-size: 0.875rem !important;
    color: var(--razo-gray-warm, #6b5d57);
    font-weight: 500;
  }

  /* ========== CARD BODY - Secondary Information Grid ========== */
  
  /* Container for category, estado, variantes */
  #productsTable tbody tr td:nth-child(2),
  #productsTable tbody tr td:nth-child(3),
  #productsTable tbody tr td:nth-child(4),
  #productsTable tbody tr td:nth-child(5) {
    padding: 0.875rem 1.25rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
  }

  /* Add labels using pseudo-elements */
  #productsTable tbody tr td:nth-child(2)::before {
    content: "Categoría:";
    font-weight: 600;
    color: var(--razo-gray-warm, #6b5d57);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  #productsTable tbody tr td:nth-child(3)::before {
    content: "Estado:";
    font-weight: 600;
    color: var(--razo-gray-warm, #6b5d57);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  #productsTable tbody tr td:nth-child(4)::before {
    content: "Variantes:";
    font-weight: 600;
    color: var(--razo-gray-warm, #6b5d57);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Administrador column (only visible for superadmin) */
  #productsTable tbody tr td:nth-child(5) {
    display: flex !important;
  }

  #productsTable tbody tr td:nth-child(5)::before {
    content: "Administrador:";
    font-weight: 600;
    color: var(--razo-gray-warm, #6b5d57);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Style the estado badges and toggle button container */
  #productsTable tbody tr td:nth-child(3) > div {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
  }

  /* Visibility badges styling */
  #productsTable tbody tr td .visibility-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  #productsTable tbody tr td .visibility-badge.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
  }

  #productsTable tbody tr td .visibility-badge.badge-secondary {
    background: rgba(107, 93, 87, 0.1);
    color: #6b5d57;
  }

  /* Toggle button styling */
  #productsTable tbody tr td .btn-icon-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem !important;
    padding: 0.5rem !important;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
  }

  #productsTable tbody tr td .btn-icon-toggle:hover {
    background: rgba(249, 115, 22, 0.1);
  }

  /* Variantes badge styling */
  #productsTable tbody tr td .admin-badge {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem !important;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.25);
  }

  /* ========== CARD FOOTER - Action Buttons ========== */
  
  /* Last cell: Actions - Full width footer with touch-friendly button */
  #productsTable tbody tr td:last-child {
    padding: 1.25rem !important;
    background: rgba(249, 115, 22, 0.02);
    border-top: 2px solid rgba(249, 115, 22, 0.1) !important;
    border-bottom: none !important;
  }

  #productsTable tbody tr td:last-child::before {
    display: none !important;
  }

  /* Action button - full width and touch-friendly */
  #productsTable tbody tr td:last-child .btn {
    width: 100% !important;
    min-height: 52px !important;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 0.75rem !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--razo-orange, #F97316), var(--razo-orange-dark, #ea580c)) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
  }

  #productsTable tbody tr td:last-child .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4) !important;
  }

  #productsTable tbody tr td:last-child .btn:active {
    transform: translateY(0) !important;
  }

  /* ========== EMPTY STATE & LOADING ========== */
  
  /* Empty state row - keep centered */
  #productsTable tbody tr.table-empty-state,
  #productsTable tbody tr:has(.empty-state-icon) {
    display: block !important;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 3rem 1.5rem !important;
    text-align: center;
    margin-bottom: 0;
  }

  #productsTable tbody tr.table-empty-state td,
  #productsTable tbody tr:has(.empty-state-icon) td {
    display: block !important;
    padding: 0 !important;
    text-align: center !important;
    border: none !important;
  }

  #productsTable tbody tr.table-empty-state td::before,
  #productsTable tbody tr:has(.empty-state-icon) td::before {
    display: none !important;
  }

  /* ========== TABLE CONTAINER ADJUSTMENTS ========== */
  
  /* Remove horizontal scroll on tablet */
  .admin-table-container,
  #productsTable {
    overflow-x: visible !important;
  }

  /* Ensure proper spacing */
  .admin-content {
    padding: 1.5rem !important;
  }

  /* Table header (title and search) - stack on tablet */
  .admin-table-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem;
  }

  .admin-table-header input[type="text"],
  .admin-table-header input[type="search"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Pagination - better mobile layout */
  #paginationContainer {
    padding: 1rem !important;
  }

  #paginationContainer > div {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center;
  }

  #paginationContainer .btn {
    min-width: 120px;
    padding: 0.75rem 1.25rem !important;
  }
}
