/* ============================================
   responsive.css - ESTILOS RESPONSIVOS
   ============================================ */

/* ============================================
   TABLET (768px - 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .search-bar {
    order: 3;
    flex: 1 1 100%;
    margin: 0;
  }

  .categories-nav ul {
    gap: 1rem;
    padding: 0.5rem 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .hero {
    padding: 2rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .profile-sidebar {
    position: static;
  }

  .cart-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cart-checkout-section {
    position: static;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .details-image {
    min-height: 250px;
  }
}

/* ============================================
   MOBILE (320px - 767px)
   ============================================ */
@media (max-width: 767px) {
  .container {
    padding: 0 1rem;
  }

  /* Header */
  .header-content {
    padding: 0.5rem 0;
    gap: 0.75rem;
  }

  .logo {
    font-size: 1.4rem;
  }

  .logo span {
    display: none;
  }

  .search-bar {
    max-width: 100%;
  }

  .search-bar input {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }

  .search-bar button {
    padding: 0.6rem 1rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-actions button {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  .btn-label {
    display: none;
  }

  /* Categories Nav */
  .categories-nav ul {
    gap: 0.75rem;
    padding: 0.25rem 1rem;
  }

  .categories-nav ul li a {
    font-size: 0.75rem;
    padding: 0.3rem 0;
    white-space: nowrap;
  }

  /* Hero */
  .hero {
    padding: 1.5rem;
    border-radius: var(--radius);
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .hero-stats .stat-number {
    font-size: 1.5rem;
  }

  .hero-stats .stat-label {
    font-size: 0.75rem;
  }

  /* Section */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .section-header h2 {
    font-size: 1.2rem;
  }

  /* Grid */
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stores-grid,
  .products-grid,
  .properties-grid,
  .vehicles-grid,
  .professionals-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Cards */
  .store-card .store-image {
    height: 150px;
  }

  .product-card .product-image {
    height: 140px;
  }

  .imovel-card .imovel-image {
    height: 160px;
  }

  .veiculo-card .veiculo-image {
    height: 160px;
  }

  .profissional-card .profissional-image {
    height: 120px;
  }

  /* Modals */
  .modal-content {
    width: 95%;
    margin: 1rem;
    max-height: 90vh;
  }

  .cart-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .cart-item .cart-item-image {
    width: 50px;
    height: 50px;
  }

  .cart-item .cart-item-info {
    flex: 1;
    min-width: 120px;
  }

  .cart-item .cart-item-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .footer-links {
    justify-content: center;
  }

  /* Breadcrumb */
  .breadcrumb ul li {
    font-size: 0.75rem;
  }

  /* Page Header */
  .page-header h1 {
    font-size: 1.8rem;
  }

  .page-header p {
    font-size: 0.95rem;
  }

  /* Profile */
  .profile-content {
    padding: 1.5rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }

  .profile-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Cart */
  .cart-items-header {
    display: none;
  }

  .cart-item-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem 0;
    position: relative;
  }

  .cart-item-product {
    grid-column: 1;
  }

  .cart-item-price {
    grid-column: 1;
    padding-left: 82px;
  }

  .cart-item-quantity {
    grid-column: 1;
    padding-left: 82px;
  }

  .cart-item-total {
    grid-column: 1;
    padding-left: 82px;
    font-size: 1.1rem;
  }

  .cart-item-action {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }

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

  /* Details */
  .details-wrapper {
    padding: 1rem;
  }

  .details-image {
    min-height: 200px;
  }

  .details-image img {
    max-height: 300px;
  }

  .details-info h1 {
    font-size: 1.5rem;
  }

  .details-price .current-price {
    font-size: 1.5rem;
  }

  .details-actions {
    flex-direction: column;
  }

  .details-actions .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .details-store-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .store-logo {
    width: 120px;
    height: 120px;
  }

  .store-contact {
    justify-content: center;
  }

  /* Store */
  .store-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
  }

  .store-logo-large {
    width: 150px;
    height: 150px;
  }

  .store-profile-info h1 {
    font-size: 1.5rem;
  }

  .store-contact-info {
    justify-content: center;
  }

  .store-actions {
    justify-content: center;
  }

  .store-products-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-filters {
    width: 100%;
  }

  .store-filters select {
    flex: 1;
    min-width: 120px;
  }

  /* Search Results */
  .search-results {
    position: fixed;
    top: auto;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    max-height: 70vh;
  }
}

/* ============================================
   SMALL MOBILE (320px - 480px)
   ============================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stores-grid,
  .products-grid,
  .properties-grid,
  .vehicles-grid,
  .professionals-grid {
    grid-template-columns: 1fr;
  }

  .store-card .store-image {
    height: 120px;
  }

  .product-card .product-image {
    height: 120px;
  }

  .imovel-card .imovel-image {
    height: 140px;
  }

  .veiculo-card .veiculo-image {
    height: 140px;
  }

  .profissional-card .profissional-image {
    height: 100px;
  }

  .quick-categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .quick-category {
    padding: 0.75rem;
  }

  .quick-category-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .quick-category span {
    font-size: 0.7rem;
  }

  .hero {
    padding: 1rem;
  }

  .hero h1 {
    font-size: 1.2rem;
  }

  .hero p {
    font-size: 0.85rem;
  }

  .hero-stats .stat-number {
    font-size: 1.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .header-actions button {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

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

  .cart-item-image {
    width: 50px;
    height: 50px;
  }

  .cart-item-price {
    padding-left: 66px;
  }

  .cart-item-quantity {
    padding-left: 66px;
  }

  .cart-item-total {
    padding-left: 66px;
  }

  .checkout-card {
    padding: 1rem;
  }

  .details-image {
    min-height: 150px;
  }

  .details-image img {
    max-height: 200px;
  }

  .details-info h1 {
    font-size: 1.2rem;
  }

  .details-price .current-price {
    font-size: 1.2rem;
  }

  .details-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .store-logo-large {
    width: 120px;
    height: 120px;
  }

  .store-profile-info h1 {
    font-size: 1.2rem;
  }

  .profissional-avatar,
  .avatar-placeholder {
    width: 120px;
    height: 120px;
    font-size: 3rem;
  }

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

  .profile-nav ul {
    flex-direction: column;
  }

  .profile-nav ul li a {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }

  .pagination-controls {
    gap: 0.25rem;
  }

  .pagination-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 0.75rem;
    right: 0.75rem;
  }
}

/* ============================================
   LARGE SCREENS (1025px - 1440px)
   ============================================ */
@media (min-width: 1025px) and (max-width: 1440px) {
  .container {
    max-width: 1200px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* ============================================
   EXTRA LARGE (1441px+)
   ============================================ */
@media (min-width: 1441px) {
  .container {
    max-width: 1400px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .hero h1 {
    font-size: 3.5rem;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .header,
  .categories-nav,
  .footer,
  .modal,
  .btn-cart,
  .btn-favorites,
  .search-bar,
  .theme-toggle {
    display: none !important;
  }

  .main-content {
    padding: 0 !important;
  }

  .grid {
    break-inside: avoid;
  }

  .store-card,
  .product-card,
  .imovel-card,
  .veiculo-card,
  .profissional-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hero {
    background: var(--dark) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
