/* =========================================
   SWAPPIT Marketplace CSS - Unified Styles
   ========================================= */

/* CSS Variables */
:root {
    --swappit-blue: #3468c0;
    --swappit-blue-hover: #1d4ed8;
    --swappit-orange: #ffa424;
    --swappit-orange-hover: #ff5722;
    --neutral-dark: #1e293b;
    --neutral-medium: #64748b;
    --neutral-light: #f1f5f9;
    --background-white: #ffffff;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --background-white: #1a1a1a;
    --neutral-dark: #ffffff;
    --neutral-medium: #a0aec0;
    --neutral-light: #2d2d2d;
    --border-color: #2d2d2d;
}

/* =========================================
   Global Styles
   ========================================= */
body, .all-products-main {
    font-family: var(--font-secondary);
    background: var(--neutral-light) !important;
    color: var(--neutral-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* =========================================
   Main Layout - Unified for all pages
   ========================================= */
.marketplace-main,
.all-products-main {
    min-height: 100vh;
    background: var(--neutral-light);
}

.all-products-main {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* =========================================
   Container - Unified padding for all pages
   ========================================= */
.marketplace-container,
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* =========================================
   Banner Sections
   ========================================= */
/* Marketplace Banner (orange/blue gradient) */
/* Animación de entrada para el banner */
.marketplace-banner {
  animation: bannerFadeIn 1.2s cubic-bezier(.22,1.12,.58,1) both;
  background: url('/assets/logos/Marketplace.jpg') center center/cover no-repeat !important;
  position: relative;
  padding: 3rem 0;
  color: white;
  text-align: center;
  min-height: 320px;
  display: flex;
  align-items: center;
  overflow: hidden;
  will-change: background-position;
}

@media (min-width: 768px) {
  .marketplace-banner {
    background-attachment: fixed;
  }
}

@keyframes bannerFadeIn {
  0% { opacity: 0; transform: translateY(40px);}
  100% { opacity: 1; transform: translateY(0);}
}

.marketplace-banner .banner-content {
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.marketplace-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30, 41, 59, 0.45);
  z-index: 1;
}

/* Animación para el texto */
.banner-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  animation: titleZoomIn 1s 0.3s cubic-bezier(.22,1.12,.58,1) both;
}

@keyframes titleZoomIn {
  0% { opacity: 0; transform: scale(0.8);}
  100% { opacity: 1; transform: scale(1);}
}

.banner-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: subtitleSlideIn 1s 0.7s cubic-bezier(.22,1.12,.58,1) both;
}

@keyframes subtitleSlideIn {
  0% { opacity: 0; transform: translateY(30px);}
  100% { opacity: 1; transform: translateY(0);}
}

/* Animación para el botón */
.banner-actions .btn {
  animation: buttonBounceIn 1s 1.1s cubic-bezier(.22,1.12,.58,1) both;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: background 0.3s, border 0.3s, transform 0.2s;
  box-shadow: 0 4px 24px 0 rgba(52,104,192,0.10);
}

@keyframes buttonBounceIn {
  0% { opacity: 0; transform: scale(0.7);}
  60% { opacity: 1; transform: scale(1.1);}
  100% { opacity: 1; transform: scale(1);}
}

.banner-actions .btn:hover {
  background: #fff;
  color: #3468c0;
  border-color: #fff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 32px 0 rgba(52,104,192,0.18);
}

/* Page Header (blue gradient for categories/all-products) */
/* Animaciones para el banner de All Products */
.page-header {
  background: url('/assets/logos/Markeplace2.jpg') center center/cover no-repeat !important;
  color: white;
  padding: 1.5rem 0;
  position: relative;
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: optimize-contrast;
  min-height: 200px;
  display: flex;
  align-items: center;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(52, 104, 192, 0.4) 0%, rgba(26, 54, 93, 0.3) 100%);
  z-index: 1;
}

.page-header .header-text h1 {
  animation: allProductsTitleSlideIn 1.1s cubic-bezier(.22,1.12,.58,1) both;
}
@keyframes allProductsTitleSlideIn {
  0% { opacity: 0; transform: translateX(-60px); }
  100% { opacity: 1; transform: translateX(0); }
}

.page-header .header-text p {
  animation: allProductsSubtitleFadeIn 1.2s 0.3s cubic-bezier(.22,1.12,.58,1) both;
}
@keyframes allProductsSubtitleFadeIn {
  0% { opacity: 0; }
  100% { opacity: 0.9; }
}

.page-header .header-actions .btn {
  animation: allProductsButtonFadeIn 1.2s 0.7s cubic-bezier(.22,1.12,.58,1) both;
  transition: background 0.3s, border 0.3s, transform 0.2s;
}
@keyframes allProductsButtonFadeIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}



.page-header .marketplace-container,
.page-header .header-content,
.page-header .header-text,
.page-header .header-actions {
  position: relative;
  z-index: 2;
}

.page-header .container {
  display: flex;
  align-items: center;
  min-height: 200px;
}

.page-header h1,
.page-header p {
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Mejorar la visualización de la imagen en dispositivos móviles */
@media (max-width: 768px) {
  .page-header {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
  }
}

.header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    text-align: center;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.header-text p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    text-align: center;
}

.header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-actions .btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-actions .btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* =========================================
   Products Grid - Unified for all pages
   ========================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem; /* Más arriba, menos espacio */
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* =========================================
   Product Cards - Unified for all pages
   ========================================= */
.product-card {
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 8px 0 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

/* Fallback para imágenes que no cargan */
.product-image img:not([src]),
.product-image img[src=""],
.product-image img[src*="undefined"] {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img:not([src])::after,
.product-image img[src=""]::after,
.product-image img[src*="undefined"]::after {
    content: "📦";
    font-size: 3rem;
    color: #90a4ae;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1;
}

.product-badge.bestseller {
    background: var(--swappit-orange);
    color: white;
}

.product-badge.new {
    background: var(--swappit-blue);
    color: white;
}

.product-badge.sale {
    background: #dc3545;
    color: white;
}

.product-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}

.product-overlay button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-overlay button:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.product-overlay button i {
    font-size: 16px;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

.product-title a {
    color: var(--neutral-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: var(--swappit-blue);
}

.product-seller {
    color: var(--neutral-medium);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.product-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--swappit-blue);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-price .swappit-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--swappit-blue);
}

.product-price .dollar-price {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--neutral-medium);
}

.original-price {
    text-decoration: line-through;
    color: var(--neutral-medium);
    font-size: 1rem;
    margin-left: 0.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-rating .stars {
    color: var(--swappit-orange);
}

.product-rating .rating-text {
    color: var(--neutral-medium);
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
}

.btn-add-cart {
    background: var(--swappit-blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart:hover {
    background: var(--swappit-blue-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

.btn-swapp {
    background: var(--swappit-orange);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-swapp:hover {
    background: var(--swappit-orange-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

.swapp-price {
    color: var(--swappit-orange);
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-details {
    border: 1px solid var(--border-color);
    color: var(--neutral-dark);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background: var(--neutral-light);
    color: var(--swappit-blue);
    border-color: var(--swappit-blue);
    text-decoration: none;
}

/* =========================================
   Products Controls - Unified for all pages
   ========================================= */
.products-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.products-info h2 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--neutral-dark);
    margin: 0 0 0.5rem 0;
}

.products-info p {
    color: var(--neutral-medium);
    margin: 0;
    font-size: 0.95rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-controls label {
    font-weight: 600;
    color: var(--neutral-dark);
}

.sort-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-white);
    color: var(--neutral-dark);
    font-size: 0.9rem;
    transition: var(--transition);
}

.sort-controls select:focus {
    outline: none;
    border-color: var(--swappit-blue);
    box-shadow: 0 0 0 3px rgba(52, 104, 192, 0.1);
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--background-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-medium);
    transition: var(--transition);
    cursor: pointer;
}

.view-btn.active,
.view-btn:hover {
    background: var(--swappit-blue);
    color: white;
    border-color: var(--swappit-blue);
}

/* =========================================
   Section Headers (for marketplace main page)
   ========================================= */
.section-container {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.section-header h2 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--neutral-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 i {
    color: var(--swappit-orange);
}

.section-header .btn {
    background: var(--swappit-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header .btn:hover {
    background: var(--swappit-blue-hover);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* =========================================
   Products Sections (for marketplace main page)
   ========================================= */
.products-section,
.best-sellers-section,
.new-arrivals-section {
    padding: 4rem 2rem;
}

/* =========================================
   Products Container (for categories/all-products)
   ========================================= */
.products-container {
    padding: 0 0 3rem 0;
}

/* =========================================
   Loading and States - Unified for all pages
   ========================================= */
.loading-state {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--neutral-light);
    border-top: 4px solid var(--swappit-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--neutral-medium);
    font-size: 1.1rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
}

.no-results i {
    font-size: 4rem;
    color: var(--neutral-medium);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--neutral-dark);
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--neutral-medium);
    font-size: 1.1rem;
}

.load-more-container {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.load-more-container .btn {
    background: var(--swappit-blue);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.load-more-container .btn:hover {
    background: var(--swappit-blue-hover);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* =========================================
   Notification Toast - Unified for all pages
   ========================================= */
.notification-toast {
    position: fixed;
    top: 100px; /* Account for header height */
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--swappit-blue);
    min-width: 300px;
    max-width: 400px;
}

.notification-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-content i {
    font-size: 1.25rem;
    color: var(--swappit-blue);
}

.toast-message {
    font-weight: 500;
    color: var(--neutral-dark);
    font-size: 0.95rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--neutral-medium);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 1rem;
}

.toast-close:hover {
    color: var(--neutral-dark);
    background: var(--neutral-light);
}

/* Notification types */
.notification-toast.success {
    border-left-color: #10b981;
}

.notification-toast.success .toast-content i {
    color: #10b981;
}

.notification-toast.error {
    border-left-color: #ef4444;
}

.notification-toast.error .toast-content i {
    color: #ef4444;
}

.notification-toast.info {
    border-left-color: var(--swappit-orange);
}

.notification-toast.info .toast-content i {
    color: var(--swappit-orange);
}

/* === ANIMACIONES MEJORADAS PARA EL MARKETPLACE === */
@keyframes card-bounce-in {
  0% { opacity: 0; transform: scale(0.95) translateY(30px); }
  60% { opacity: 1; transform: scale(1.03) translateY(-6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.product-card {
  animation: card-bounce-in 0.7s cubic-bezier(.22,1.12,.58,1) both;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border: 1.5px solid transparent;
  transition: box-shadow 0.35s cubic-bezier(.22,1.12,.58,1), border-color 0.35s, transform 0.25s cubic-bezier(.22,1.12,.58,1);
}

.product-card:hover {
  box-shadow: 0 8px 32px 0 rgba(0, 140, 255, 0.18), 0 1.5px 8px rgba(0,0,0,0.10);
  border-color: #1e90ff;
  transform: translateY(-8px) scale(1.03);
}

.product-card:hover .product-image img {
  filter: brightness(1.08) drop-shadow(0 0 8px #1e90ff33);
  transform: scale(1.08) rotate(-1deg);
  transition: filter 0.4s, transform 0.4s;
}

.product-card .product-price {
  transition: color 0.3s cubic-bezier(.22,1.12,.58,1), text-shadow 0.3s;
}

.product-card:hover .product-price {
  color: #ff9800;
  text-shadow: 0 2px 8px #ff980055;
}

.product-card .product-info {
  transition: background 0.3s;
}

.product-card:hover .product-info {
  background: linear-gradient(90deg, #f0f7ff 0%, #e6f7ff 100%);
}

.product-card .product-title {
  transition: color 0.3s;
}

.product-card:hover .product-title {
  color: #1e90ff;
}

.product-card .product-badge {
  transition: box-shadow 0.3s;
}

.product-card:hover .product-badge {
  box-shadow: 0 2px 8px #1e90ff33;
}

/* === FIN DE ANIMACIONES MEJORADAS === */

/* =========================================
   Responsive Design - Unified for all pages
   ========================================= */
@media (max-width: 1400px) {
    .marketplace-container,
    .container {
        padding: 0 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 1200px) {
    .marketplace-container,
    .container {
        padding: 0 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Desktop/Laptop: Botones uno debajo del otro */
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .product-actions .btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 992px) {
    .marketplace-container,
    .container {
        padding: 0 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .products-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .banner-text h1 {
        font-size: 2.5rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .products-section,
    .best-sellers-section,
    .new-arrivals-section {
        padding: 3rem 1.5rem;
    }
    
    /* Tablet: Botones uno debajo del otro */
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .product-actions .btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .marketplace-banner {
        padding: 2rem 0;
    }
    
    .banner-text h1 {
        font-size: 2rem;
    }
    
    .banner-text p {
        font-size: 1rem;
    }
    
    .marketplace-container,
    .container {
        padding: 0 1rem;
    }
    
    /* Tablet: 1-2 tarjetas dependiendo del ancho */
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .products-controls {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .controls-right {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .sort-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sort-controls select {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header .btn {
        width: 100%;
        text-align: center;
    }
    
    .notification-toast {
        top: 160px; /* Account for dual header height on mobile */
        left: 1rem;
        right: 1rem;
        width: auto;
    }
    
    .notification-toast.show {
        transform: translateY(0);
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-overlay {
        opacity: 1;
        transform: translateY(0);
    }
    
    .products-section,
    .best-sellers-section,
    .new-arrivals-section {
        padding: 2rem 1rem;
    }
    
    /* Tablet: Botones uno debajo del otro */
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .product-actions .btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .product-actions .btn {
        width: 100%;
        min-width: unset;
    }
    
    .banner-text h1 {
        font-size: 1.75rem;
    }
    
    .marketplace-container,
    .container {
        padding: 0 0.5rem;
    }
    
    .products-section,
    .best-sellers-section,
    .new-arrivals-section {
        padding: 1.5rem 0.5rem;
    }
    
    .notification-toast {
        top: 150px; /* Slightly less for smaller mobile screens */
    }
} 