/* ========================================================================= */
/* UI/UX Pro Max - Fluid Multi-Device Responsive System                      */
/* Perfect Layout for: PC, 4K, Laptops, Tablets, iPads, Mobiles              */
/* ========================================================================= */

/* ========================================================================= */
/* 1. Large Laptops & Standard Desktops (max-width: 1200px)                  */
/* ========================================================================= */
@media (max-width: 1200px) {
  .container {
    max-width: 980px;
    padding: 0 16px;
  }

  .deals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================================================= */
/* 2. Small Laptops & Landscape Tablets (max-width: 992px)                   */
/* ========================================================================= */
@media (max-width: 992px) {
  .container {
    max-width: 740px;
  }

  .nav-links {
    gap: 2px;
    padding: 3px;
  }

  .nav-link {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wallet-summary-grid {
    grid-template-columns: 1fr;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================= */
/* 3. Portrait Tablets & Mobile Devices (max-width: 768px)                   */
/* ========================================================================= */
@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 10px 0 18px;
  }

  .step-card {
    padding: 10px 12px;
  }
  body {
    padding-bottom: 68px; /* Space for Mobile Bottom Nav */
  }

  .container {
    padding: 0 14px;
  }

  /* Header adjustments */
  .navbar {
    height: 60px;
  }

  .nav-links {
    display: none !important; /* Managed by Bottom Nav */
  }

  .brand-logo {
    font-size: 1.125rem;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .user-header-name {
    display: none;
  }

  /* Hero Section */
  .hero-section {
    padding: 16px 0 10px 0;
  }

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  .hero-subtitle {
    font-size: 0.8125rem;
    margin-bottom: 12px;
  }

  /* Search & Converter Bar Mobile */
  .master-converter {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: var(--radius-lg);
    gap: 10px;
  }

  .master-converter-input {
    width: 100%;
    font-size: 0.875rem;
    padding: 6px 0;
  }

  .converter-paste-btn {
    width: 100%;
    text-align: center;
  }

  .master-converter button[type="submit"] {
    width: 100%;
  }

  /* Converter Result Box Mobile */
  .result-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 14px;
  }

  .result-image {
    width: 64px;
    height: 64px;
    margin: 0 auto;
  }

  .result-details {
    text-align: center;
  }

  .result-details > div:first-child {
    justify-content: center;
  }

  .result-actions {
    width: 100%;
  }

  .result-actions button {
    width: 100%;
  }

  /* Deals Grid Mobile */
  .deals-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .deal-thumb-wrap {
    height: 190px;
  }

  /* Tables Mobile */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
  }

  .custom-table {
    min-width: 540px;
  }

  /* Modals Mobile */
  .modal-dialog {
    max-width: calc(100vw - 24px);
    margin: 12px auto;
  }

  .modal-body {
    padding: 18px 16px;
  }

  /* Bottom Navigation */
  .mobile-bottom-nav {
    display: flex !important;
  }

  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 78px;
  }

  .toast {
    width: 100%;
  }
}

/* ========================================================================= */
/* 4. Extra Small Mobile (max-width: 480px)                                  */
/* ========================================================================= */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .platform-pill-row {
    gap: 8px;
  }

  .platform-pill {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}

/* ========================================================================= */
/* 5. Mobile Bottom Navigation Component                                     */
/* ========================================================================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 1500;
  justify-content: space-around;
  align-items: center;
  padding: 0 6px;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--slate-500);
  font-size: 0.6875rem;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  flex: 1;
  text-align: center;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.mobile-nav-item.active, 
.mobile-nav-item:hover {
  color: var(--primary);
  background: var(--primary-light);
}
