@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
:root {
  --c-primary: #1a73e8;
  --c-primary-hover: #1152a8;
  --c-accent: #f59e0b;
  --c-bg: #f8f9fa;
  --c-card: #ffffff;
  --text-main: #374151;
  --text-muted: #6b7280;
  --c-border: #e5e7eb;
  --c-success: #10b981;
  --c-danger: #ef4444;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 0.75rem;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--c-bg);
  color: var(--text-main);
}
/* Botones y Formularios */
.btn-primary {
  background-color: var(--c-primary) !important;
  border-color: var(--c-primary) !important;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background-color: var(--c-primary-hover) !important;
  border-color: var(--c-primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}
.btn-outline-primary {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid var(--c-border);
  padding: 0.6rem 1rem;
  transition: border-color 0.3s;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.1);
}

/* Navbar y Header */
.navbar {
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}
.nav-link {
  color: var(--text-main) !important;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-link:hover {
  color: var(--c-primary-hover) !important;
}
.navbar-brand {
  font-weight: 700;
  color: var(--c-primary) !important;
  font-size: 1.5rem;
}
.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
}
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0 0 8px 8px;
  z-index: 1050;
  max-height: 350px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  display: none;
}
.search-dropdown:not(.hidden) {
  display: block;
}
.search-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.2s;
}
.search-item:hover {
  background-color: var(--c-bg);
  color: var(--c-primary);
}

/* Tarjetas de Producto ACHICADAS Y SIN ESPACIOS GIGANTES */
.product-card {
  background: var(--c-card);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1rem !important;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}
.product-image-container {
  height: 180px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.product-image-container img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  padding: 10px;
}
.product-card:hover .product-image-container img {
  transform: scale(1.05);
}
.badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--c-accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 10;
}
.badge-shipping {
  background-color: #ecfdf5;
  color: var(--c-success);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 4px;
}
.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
  margin-bottom: 6px;
}
.product-title:hover {
  color: var(--c-primary-hover);
}
.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-top: 2px;
}
.product-old-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 0px;
}

/* Sliders (Swiper) y Galerías */
.swiper-container {
  width: 100%;
  padding-bottom: 2rem !important;
}
.gallery-thumbnail {
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.3s ease;
  border-radius: 8px;
  height: 80px;
  object-fit: cover;
}
.gallery-thumbnail:hover,
.gallery-thumbnail.active {
  opacity: 1;
  border-color: var(--c-primary);
}
.category-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--c-border);
  transition: all 0.3s;
  display: block;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.category-card:hover {
  border-color: var(--c-primary);
  background: #f0f7ff;
  color: var(--c-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.category-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

/* Banners (Ofertas) */
.promo-banner-home {
  background: linear-gradient(135deg, var(--c-primary), #4facfe);
  border-radius: var(--radius);
  color: white;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 350px;
  display: flex;
  align-items: center;
}
.promo-banner-home h2 {
  font-weight: 700;
  font-size: 2.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}
.offer-banner {
  height: 300px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  padding: 2rem;
  color: #fff;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.offer-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  z-index: 1;
}
.offer-banner-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

/* Formularios Auth (Login/Register) */
.auth-container {
  max-width: 500px;
  margin: 40px auto;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-border);
}

/* Admin Sidebar & Layout */
.admin-sidebar {
  background-color: #fff;
  min-height: 100vh;
  border-right: 1px solid var(--c-border);
}
.admin-link {
  color: var(--text-muted);
  padding: 12px 20px;
  display: block;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.3s;
}
.admin-link:hover,
.admin-link.active {
  background-color: var(--c-primary);
  color: #fff;
}
.admin-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.badge-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-publicado,
.status-pagado,
.status-read,
.status-active {
  background-color: var(--c-success);
  color: #fff;
}
.status-borrador,
.status-por.confirmar.pago,
.status-unread {
  background-color: var(--c-accent);
  color: #fff;
}
.status-papelera,
.status-cancelado,
.status-inactive {
  background-color: var(--c-danger);
  color: #fff;
}
.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--c-primary) !important;
  color: white !important;
  border: none;
  border-radius: 6px;
}
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 6px 12px;
  outline: none;
  margin-bottom: 15px;
}
.main-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--c-border);
  padding: 4rem 0 2rem 0;
  margin-top: 5rem;
}
