/* Responsive CSS for peppersoup */
/* Mobile First Approach */

/* ========================================
   GLOBAL RESPONSIVE UTILITIES
======================================== */

/* Container responsive */
.container {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

/* ========================================
   PROFILE PAGE RESPONSIVE
======================================== */

/* Cover photo responsive height */
@media (max-width: 768px) {
  .profile-cover {
    height: 200px !important;
  }
}

@media (max-width: 480px) {
  .profile-cover {
    height: 150px !important;
  }
}

/* Avatar responsive */
@media (max-width: 768px) {
  .profile-avatar {
    width: 100px !important;
    height: 100px !important;
    top: -50px !important;
  }
  
  .profile-avatar button {
    width: 32px !important;
    height: 32px !important;
  }
  
  .profile-avatar svg {
    width: 16px !important;
    height: 16px !important;
  }
}

@media (max-width: 480px) {
  .profile-avatar {
    width: 80px !important;
    height: 80px !important;
    top: -40px !important;
  }
}

/* Profile info section responsive */
@media (max-width: 768px) {
  .profile-info-section {
    padding-left: 0 !important;
    padding-top: 3.5rem !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .profile-credits {
    width: 100% !important;
    margin-left: 0 !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
  }
  
  .profile-credits > div {
    flex: 1 !important;
    min-width: auto !important;
  }
}

/* Profile tabs responsive */
@media (max-width: 640px) {
  .profile-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  
  .profile-tabs button {
    white-space: nowrap !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Profile grid layout */
@media (max-width: 1024px) {
  .profile-grid {
    grid-template-columns: 1fr !important;
  }
  
  .profile-sidebar {
    order: 2 !important;
  }
  
  .profile-main {
    order: 1 !important;
  }
}

/* ========================================
   HEADER RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .header-nav {
    display: none !important;
  }
  
  .mobile-menu-button {
    display: block !important;
  }
  
  .header-logo img {
    max-width: 120px !important;
  }
}

/* ========================================
   CARDS RESPONSIVE
======================================== */

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ========================================
   FORMS RESPONSIVE
======================================== */

@media (max-width: 640px) {
  .form-row {
    flex-direction: column !important;
  }
  
  .form-row > * {
    width: 100% !important;
  }
}

/* ========================================
   MODALS RESPONSIVE
======================================== */

@media (max-width: 640px) {
  .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    margin: 1rem !important;
  }
  
  .modal-header {
    padding: 1rem !important;
  }
  
  .modal-body {
    padding: 1rem !important;
  }
}

/* ========================================
   TABLES RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    min-width: 600px !important;
  }
}

/* ========================================
   BUTTONS RESPONSIVE
======================================== */

@media (max-width: 640px) {
  .btn-group {
    flex-direction: column !important;
    width: 100% !important;
  }
  
  .btn-group button,
  .btn-group a {
    width: 100% !important;
  }
}

/* ========================================
   ADMIN PANEL RESPONSIVE
======================================== */

@media (max-width: 1024px) {
  .admin-sidebar {
    position: fixed !important;
    left: -280px !important;
    transition: left 0.3s ease !important;
    z-index: 1000 !important;
  }
  
  .admin-sidebar.active {
    left: 0 !important;
  }
  
  .admin-main {
    margin-left: 0 !important;
  }
}

@media (max-width: 640px) {
  .admin-header {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .admin-stats {
    grid-template-columns: 1fr !important;
  }
}

/* ========================================
   ADS GRID RESPONSIVE
======================================== */

.ads-grid {
  display: grid;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .ads-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .ads-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1025px) {
  .ads-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ========================================
   SHOP PAGE RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: 1fr !important;
  }
  
  .product-card {
    max-width: 100% !important;
  }
}

/* ========================================
   TEXT RESPONSIVE
======================================== */

@media (max-width: 640px) {
  h1 {
    font-size: 1.875rem !important; /* 30px */
  }
  
  h2 {
    font-size: 1.5rem !important; /* 24px */
  }
  
  h3 {
    font-size: 1.25rem !important; /* 20px */
  }
  
  .text-responsive {
    font-size: 0.875rem !important; /* 14px */
  }
}

/* ========================================
   SPACING RESPONSIVE
======================================== */

@media (max-width: 640px) {
  .section-padding {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .container-padding {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ========================================
   HIDE/SHOW UTILITIES
======================================== */

@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }
}

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

@media (max-width: 768px) {
  .hide-tablet {
    display: none !important;
  }
}

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

/* ========================================
   FOOTER RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }
  
  .footer-links {
    justify-content: center !important;
  }
}

/* ========================================
   NAVIGATION RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    transition: left 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
  }
  
  .nav-overlay.active {
    display: block;
  }
}

/* ========================================
   IMAGES RESPONSIVE
======================================== */

img {
  max-width: 100%;
  height: auto;
}

.img-responsive {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ========================================
   FLEXBOX RESPONSIVE UTILITIES
======================================== */

@media (max-width: 640px) {
  .flex-mobile-col {
    flex-direction: column !important;
  }
  
  .flex-mobile-wrap {
    flex-wrap: wrap !important;
  }
}

/* ========================================
   OVERFLOW RESPONSIVE
======================================== */

@media (max-width: 640px) {
  .overflow-x-mobile {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
