@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --primary: #9873ac;
  --primary-dark: #7458a6;
  --primary-light: #d2b1e4;
  --bg: #f9f9f9;
  --text: #333;
  --text-light: #666;
  --border: #e9ecef;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
}

* { box-sizing: border-box; }

body {
  font-family: 'Manrope', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.footer {
  margin-top: auto !important;
}

/* HEADER */
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.logo img {
  height: 45px;
}

.menu ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.menu ul li a {
  text-decoration: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.menu ul li a:hover { color: var(--primary-dark); }

.menu ul li:nth-child(2) a {
  background: var(--primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
}

.menu ul li:nth-child(2) a:hover { background: var(--primary-dark); }

.user-menu { display: flex; align-items: center; gap: 10px; }
.user-link { text-decoration: none; color: var(--primary); font-size: 14px; }

.search-bar { margin-left: auto; }

.search-form {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid var(--primary-light);
  border-radius: 20px;
  padding: 4px 12px;
  width: 240px;
  transition: box-shadow 0.3s;
}

.search-form:focus-within {
  box-shadow: 0 0 0 3px rgba(152,115,172,0.15);
}

.search-form input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  padding: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.search-form button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 4px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* FOOTER */
.footer {
  background: var(--primary);
  color: #e0d4e8;
  padding: 40px 0 20px;
}

.footer h4 { color: #fff; font-size: 16px; margin-bottom: 15px; }
.footer p, .footer a { color: #e0d4e8; font-size: 13px; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer hr { border-color: rgba(255,255,255,0.2); }

/* BUTTONS */
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

/* CARDS */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-card .img-wrapper {
  position: relative;
  overflow: hidden;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.product-card .img-wrapper img {
  max-height: 180px;
  max-width: 90%;
  object-fit: contain;
  transition: transform 0.3s;
}

.product-card:hover .img-wrapper img { transform: scale(1.05); }

.product-card .img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-card:hover .img-overlay { opacity: 1; }

.product-card .card-body {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-card .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}

.product-card .card-category {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.product-card .btn-cart {
  margin-top: auto;
  background: var(--primary-light);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.3s;
}

.product-card .btn-cart:hover { background: var(--primary); color: #fff; }
.product-card .btn-cart:disabled { background: #ccc; cursor: not-allowed; }

/* Product card small (best sellers) */
.product-card-sm .img-wrapper { height: 120px; }
.product-card-sm .img-wrapper img { max-height: 100px; }
.product-card-sm .card-body { padding: 10px; }
.product-card-sm .card-title { font-size: 11px; margin-bottom: 4px; }
.product-card-sm .price { font-size: 14px; }
.product-card-sm .btn-cart { padding: 6px; font-size: 12px; }

/* BADGES */
.product-badge {
  position: absolute;
  top: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
}

.product-badge.nuevo { left: 8px; background: var(--warning); color: #000; }
.product-badge.sin-stock { right: 8px; background: #343a40; color: #fff; }
.product-badge.oferta { right: 8px; background: #dc3545; color: #fff; }

/* CART BUTTON */
.cart-floating {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 999;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  text-decoration: none;
  color: #000;
  transition: transform 0.3s;
}

.cart-floating:hover { transform: scale(1.1); }

.cart-floating .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .cart-floating {
    top: 130px;
  }
}

/* OFFCANVAS CART */
.offcanvas-header { background: var(--border); }
.offcanvas-body { background: #f8f9fa; }

/* MODAL THUMBNAILS */
.modal-thumb {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 3px;
  background: #fafafa;
  transition: border-color 0.2s;
}

.modal-thumb:hover { border-color: var(--primary-light); }
.modal-thumb.active { border-color: var(--primary); }

/* FILTERS */
.filters-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 20px;
}

.filters-card h5 { color: var(--primary); font-size: 16px; margin-bottom: 15px; }

/* BANNER SLIDER */
.banner-section {
  margin: 20px auto;
  max-width: 1200px;
  padding: 0 30px;
  overflow: visible;
  position: relative;
}

.banner-slide {
  padding: 0;
  border-radius: 16px;
  min-height: 300px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.banner-slide .row {
  min-height: 300px;
}

.banner-slide .col-md-5 {
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.banner-slide .col-md-7 {
  padding: 40px 100px 40px 40px;
}

.bg-slide-1 { background: linear-gradient(135deg, #b3e5fc 0%, #81d4fa 100%); }
.bg-slide-2 { background: linear-gradient(135deg, #f8bbd0 0%, #f48fb1 100%); }
.bg-slide-3 { background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%); }

.banner-title {
  color: var(--primary-dark);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.banner-subtitle {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.banner-description {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
}

.banner-image {
  height: 100%;
  max-height: 300px;
  width: auto;
  object-fit: contain;
}

.banner-section .carousel-control-prev,
.banner-section .carousel-control-next {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
}

.banner-section .carousel-control-prev { left: -20px; }
.banner-section .carousel-control-next { right: -20px; }

.banner-section .carousel-control-prev:hover,
.banner-section .carousel-control-next:hover {
  background: var(--primary-dark);
}

@media (max-width: 768px) {
  .banner-slide { min-height: 500px; height: 500px; }
  .banner-slide .row { min-height: 500px; height: 100%; }
  .banner-slide .col-md-5 { height: 200px; min-height: unset; order: 2; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
  .banner-slide .col-md-7 { padding: 40px 20px 10px 20px; order: 1; }
  .banner-title { font-size: 1.5rem; }
  .banner-subtitle { font-size: 0.95rem; }
  .banner-image { max-height: 200px; width: auto; margin: 0; padding: 0; display: block; }
  .banner-slide .container { padding-left: 16px; padding-right: 16px; }
}

/* CATEGORY CARDS */
.category-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: var(--text);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  color: var(--primary);
}

.category-card i { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }
.category-card h6 { font-weight: 600; margin: 0; }

.category-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* SLIDER DE CATEGORÍAS */
.slider-section { padding: 0; }

.slider-section h3,
.custom-title {
  margin-bottom: 20px;
  font-size: 20px;
  color: var(--primary);
  text-align: center;
}

.slider-infinito-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.slider-infinito-wrapper {
  overflow: hidden;
  padding: 15px 0;
}

.slider-infinito {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.slide-infinito {
  flex: 0 0 calc(16.666% - 20px);
  margin: 0 10px;
  transition: all 0.3s ease;
}

.slider-dots {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

.categoria-card {
  text-align: center;
  padding: 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.categoria-imagen {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 15px;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

a.categoria-nombre {
  text-decoration: none;
  color: var(--text);
}

h4.categoria-nombre {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.slider-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #555;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease;
}

.slider-arrow:hover { color: #000; }
.slider-arrow.left { left: 10px; }
.slider-arrow.right { right: 10px; }

@media (max-width: 767px) {
  .slide-infinito { flex: 0 0 calc(50% - 20px); }
  .categoria-imagen { width: 60px; height: 60px; }
  h4.categoria-nombre { font-size: 0.85rem; }
  .slider-arrow { font-size: 1.6rem; top: 35%; }
  .slider-dots { display: none; }
}

@media (max-width: 480px) {
  .slide-infinito { flex: 0 0 calc(100% - 20px); }
}

/* CHECKOUT */
.checkout-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 25px;
}

/* PAGINATION */
#pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}

#pagination button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#pagination button:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

#pagination button:disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}

#pagination button.active { background: var(--primary-dark); font-weight: 700; }



/* RESPONSIVE */

/* BRANDS SLIDER */
.slider-marcas {
  height: 100px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.slider-marcas::before,
.slider-marcas::after {
  background: linear-gradient(to right, rgba(249,249,249,1) 0%, rgba(249,249,249,0) 100%);
  content: "";
  height: 100px;
  position: absolute;
  width: 150px;
  z-index: 2;
}

.slider-marcas::before { left: 0; top: 0; }
.slider-marcas::after { right: 0; top: 0; transform: rotateZ(180deg); }

.slider-marcas .slide-track {
  animation: scroll-marcas 30s linear infinite;
  display: flex;
  width: calc(200px * 18);
}

.slider-marcas .slide {
  height: 100px;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.slider-marcas .slide img {
  max-height: 80px;
  max-width: 180px;
  object-fit: contain;
}

@keyframes scroll-marcas {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-200px * 11)); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .header-container {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 8px 12px;
  }

  .menu-toggle {
    position: static;
    transform: none;
    order: 1;
    flex-shrink: 0;
  }

  .logo {
    order: 2;
    flex: 1;
    text-align: center;
  }

  .logo img { height: 36px; }

  .search-bar {
    order: 3;
    flex-shrink: 0;
    margin: 0;
    width: auto;
  }

  .search-form {
    width: 36px;
    padding: 4px 8px;
    overflow: hidden;
    transition: width 0.3s;
  }

  .search-form input { display: none; }

  .search-form:focus-within {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    z-index: 1200;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }

  .search-form:focus-within input { display: block; }

  .menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.97);
    z-index: 1100;
    justify-content: center;
    align-items: center;
  }

  .menu.open { display: flex; }
  .menu ul { flex-direction: column; text-align: center; gap: 25px; }
  .menu ul li a { font-size: 18px; }
}

/* PROMO BANNERS - Colecciones Especiales */
.promo-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 200px;
  display: flex;
  align-items: stretch;
  transition: transform 0.3s, box-shadow 0.3s;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.promo-banner-link:hover .promo-banner {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.14);
}

/* Lado izquierdo: imagen */
.promo-banner-img {
  flex: 0 0 42%;
  position: relative;
  overflow: hidden;
}

.promo-banner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.promo-banner-link:hover .promo-banner-img img {
  transform: scale(1.05);
}

/* Imagen placeholder cuando no hay foto */
.promo-banner-img-placeholder {
  flex: 0 0 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

/* Lado derecho: contenido */
.promo-banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.75rem;
  color: var(--text);
}

.promo-banner-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.promo-banner-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  line-height: 1.2;
  color: var(--text);
}

.promo-banner-desc {
  font-size: 0.88rem;
  margin: 0 0 1rem;
  color: var(--text-light);
  line-height: 1.5;
}

.promo-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  width: fit-content;
  transition: background 0.2s, transform 0.2s;
}

.promo-banner-link:hover .promo-banner-btn {
  background: var(--primary-dark);
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .promo-banner { height: auto; flex-direction: column; }
  .promo-banner-img, .promo-banner-img-placeholder { flex: 0 0 auto; width: 100%; height: 200px; background: #f8f8f8; }
  .promo-banner-img img { width: 100%; height: 200px; object-fit: contain; }
  .promo-banner-content { padding: 1rem 1.1rem; align-items: center; text-align: center; }
  .promo-banner-title { font-size: 1.05rem; }
  .promo-banner-desc { display: none; }
  .promo-banner-btn { font-size: 0.75rem; padding: 6px 12px; }
}
