/* ========================================
   MODERN MARKETPLACE THEME 2024
   Diseño moderno y optimizado para marketplace
   ======================================== */

/* ===== VARIABLES CSS ===== */
:root {
  /* Colores principales */
  --primary-blue: #0066ff;
  --primary-blue-light: #4d94ff;
  --primary-blue-dark: #0052cc;
  --secondary-orange: #ffc107;
  --accent-green: #00cc66;
--primary-yelou:#ffc107;

  /* Colores neutros */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Tipografía */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;
  --font-secondary: "Poppins", sans-serif;

  /* Espaciado */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Bordes y sombras */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transiciones */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== RESET Y BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TIPOGRAFÍA ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1.125rem;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--gray-700);
}

/* ===== HEADER MODERNO ===== */
.header-top {
  background: var(--gray-900);
  color: white;
  padding: var(--space-xs) 0;
  font-size: 0.875rem;
}

.header-top a {
  color: var(--gray-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.header-top a:hover {
  color: white;
}

.header-main {
  background: white;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.logo {
  max-height: 60px;
  width: auto;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

/* ===== BÚSQUEDA MODERNA ===== */
.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 16px;
  background: white;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-btn:hover {
  background: var(--primary-blue-dark);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 20px;
}

/* ===== NAVEGACIÓN ===== */
.nav-modern {
  background: var(--gray-900);
  padding: var(--space-sm) 0;
}

.nav-modern .nav-link {
  color: var(--gray-300);
  text-decoration: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
}

.nav-modern .nav-link:hover,
.nav-modern .nav-link.active {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
}

/* ===== BOTONES MODERNOS ===== */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-blue-dark) 100%
  );
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(
    135deg,
    var(--primary-blue-light) 0%,
    var(--primary-blue) 100%
  );
}

.btn-secondary {
  background: var(--secondary-orange);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: #ffc107;
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
}

.btn-outline:hover {
  background: var(--primary-blue);
  color: white;
}

/* ===== TARJETAS DE PRODUCTO ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card .card-body {
  padding: var(--space-md);
}

.product-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: var(--space-xs);
}

.product-card .card-text {
  color: var(--gray-600);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

/* ===== HERO SECTION ===== */
.section-hero {
  background: linear-gradient(
    rgba(0, 102, 255, 0.75),
    rgba(0, 102, 255, 0.75)
  ), url('/assets/img/home.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  padding: 2.5rem 0;
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
}

.section-hero .container {
  position: relative;
  z-index: 2;
}

.section-hero h1 {
  color: white;
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-hero .lead {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
}

.section-hero .text-gradient {
  color: #ffc107;
  font-weight: 700;
}

.section-hero .btn {
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.section-hero .btn-primary {
  background: #ffc107;
  border: none;
  color: #000;
}

.section-hero .btn-primary:hover {
  background: #e0a800;
  transform: translateY(-2px);
}

.section-hero .btn-outline {
  background: transparent;
  border: 2px solid #ffc107;
  color: #ffc107;
}

.section-hero .btn-outline:hover {
  background: #ffc107;
  color: #000;
}

.section-hero .text-white-75 {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-hero {
    padding: 2rem 0;
    min-height: 35vh;
    background-attachment: scroll;
  }
  
  .section-hero h1 {
    font-size: 2.2rem;
  }
  
  .section-hero .lead {
    font-size: 1rem;
  }
  
  .section-hero .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .section-hero {
    padding: 1.5rem 0;
    min-height: 30vh;
  }
  
  .section-hero h1 {
    font-size: 1.8rem;
  }
  
  .section-hero .d-flex {
    flex-direction: column;
    align-items: center;
  }
  
  .section-hero .btn {
    width: 100%;
    max-width: 250px;
  }
}

/* ===== FORMULARIOS ===== */
.form-modern .form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-xs);
}

.form-modern .form-control {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 16px;
  transition: all var(--transition-normal);
  background: white;
}

.form-modern .form-control:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
  outline: none;
}

.form-modern .form-control:invalid {
  border-color: var(--accent-red);
}

/* ===== ANIMACIONES ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up:nth-child(1) {
  animation-delay: 0.1s;
}
.fade-in-up:nth-child(2) {
  animation-delay: 0.2s;
}
.fade-in-up:nth-child(3) {
  animation-delay: 0.3s;
}
.fade-in-up:nth-child(4) {
  animation-delay: 0.4s;
}

/* ===== UTILIDADES ===== */
.text-gradient {
  background: linear-gradient(
    135deg,
    var(--primary-yelou) 0%,
    var(--primary-yelou) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-blue-dark) 100%
  );
  color: white !important;
}

.bg-gradient-primary * {
  color: white !important;
}

.bg-gradient-primary .btn-light {
  background: white !important;
  color: var(--primary-blue) !important;
  border: none;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.bg-gradient-primary .btn-light:hover {
  background: var(--gray-100) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--secondary-orange) 0%, #e55a00 100%);
}

/* ===== RESPONSIVE ===== */
/* Category Cards */
.category-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.category-card:hover .card-body i {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* Responsive Grid for Categories */
@media (max-width: 768px) {
  .category-card .card-body {
    padding: 2rem 1rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
  }

  .section-hero {
    padding: var(--space-xl) 0;
  }

  .header-main .container {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .search-container {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .btn-modern {
    width: 100%;
    justify-content: center;
  }
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== SIDEBAR Y OFFCANVAS ===== */
.offcanvas-modern {
  background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
}

.offcanvas-modern .nav-link {
  color: var(--gray-300);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  transition: all var(--transition-fast);
}

.offcanvas-modern .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.offcanvas-modern .nav-link.active {
  background: var(--primary-blue);
  color: white;
}

/* ===== FOOTER ===== */
.footer-modern {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-modern h5 {
  color: white;
  margin-bottom: var(--space-md);
}

.footer-modern a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-modern a:hover {
  color: var(--primary-blue);
}

.social-icons {
  display: flex;
  gap: var(--space-sm);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
  color: white;
}
.animate-fade-in {
  animation: fadeIn 1.5s ease-in-out;
}

/* ===== CTA SECTIONS ===== */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-blue-dark) 100%
  );
  color: white;
  padding: var(--space-2xl) 0;
}

.cta-section h2,
.cta-section h3,
.cta-section p,
.cta-section .lead {
  color: white !important;
}

.cta-section .btn-light {
  background: white;
  color: var(--primary-blue);
  border: none;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.cta-section .btn-light:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Footer CTA específico */
.footer-cta {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--secondary-orange) 100%
  );
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-cta h3,
.footer-cta p {
  color: white !important;
  margin-bottom: 0.5rem;
}

.footer-cta .btn-light {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-blue);
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
}

.footer-cta .btn-light:hover {
  background: white;
  transform: scale(1.05);
}

.animate-slide-in {
  animation: slideIn 1.2s ease-in-out;
}

.active {
  color: var(--gray-50);
}
.active .text-muted {
  color: var(--gray-50) !important;
}
.active h6 {
  color: var(--gray-50) !important;
}

/* ===== Estilos para selección de paquetes (publish-now.php) ===== */
.package-card {
  transition: all var(--transition-normal);
  cursor: pointer;
}

.btn-check:checked + .package-card {
  border-color: var(--accent-red, #ff3333);
  border-width: 3px;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255, 51, 51, 0.2);
  background: #adb5bd;
}

.btn-check:checked + .package-card .card-title {
  color: var(--accent-red, #ff3333);
}
