/* ════════════════════════════════════════════════════════
   TecnoAdvance — Perfumes Árabes | styles.css
   ════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #b8962e;
  --gold-lt: #d4af54;
  --black: #111111;
  --dark: #1e1e1e;
  --mid: #555555;
  --soft: #888888;
  --border: #e8e8e8;
  --bg: #fafafa;
  --white: #ffffff;
  --wa-green: #25d366;
  --radius: 10px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --shadow-h: 0 6px 28px rgba(0, 0, 0, 0.14);
  --font-disp: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--black);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; }

/* ─── HEADER ─────────────────────────────────────────── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  width: 178px;
  height: auto;
  max-height: 38px;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav a {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--mid);
  transition: background 0.18s, color 0.18s;
}

.nav a:hover, .nav a.active {
  background: var(--bg);
  color: var(--black);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-btn-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--wa-green);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.wa-btn-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

/* ─── BREADCRUMB ─────────────────────────────────────── */
.breadcrumb {
  max-width: 1380px;
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 0.82rem;
  color: var(--soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb span { color: var(--black); font-weight: 500; }

/* ─── BANNER CAROUSEL ────────────────────────────────── */
.banner-carousel {
  max-width: 100%;
  margin: 0 auto 28px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.carousel-container {
  width: 100%;
  height: 0;
  padding-bottom: 33.33%;
  position: relative;
  overflow: hidden;
  background: #f0eee9;
}

.carousel-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  z-index: 10;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.carousel-btn:hover { background: rgba(0, 0, 0, 0.8); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active { background: rgba(255, 255, 255, 0.9); }

/* ─── MAIN LAYOUT ────────────────────────────────────── */
.main-layout {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 0 24px 60px;
  align-items: start;
}

/* ─── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 84px;
}

.sidebar-title {
  font-family: var(--font-disp);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.filter-section { margin-bottom: 24px; }

.filter-section h4 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--soft);
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-option label {
  font-size: 0.9rem;
  color: var(--dark);
  cursor: pointer;
  flex: 1;
  display: flex;
  justify-content: space-between;
}

.filter-option label .count {
  color: var(--soft);
  font-size: 0.8rem;
}

.filter-option:hover label { color: var(--gold); }

.price-range { margin-top: 4px; }

.price-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.price-inputs input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--dark);
  outline: none;
}

.price-inputs input:focus { border-color: var(--gold); }

.price-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) 60%, var(--border) 60%);
  border-radius: 4px;
  outline: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.clear-filters {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.84rem;
  color: var(--mid);
  font-weight: 500;
  transition: all 0.15s;
  margin-top: 8px;
}

.clear-filters:hover {
  border-color: var(--black);
  color: var(--black);
}

.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ─── CATALOG ────────────────────────────────────────── */
.catalog { min-width: 0; }

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.catalog-meta {
  font-size: 0.88rem;
  color: var(--soft);
}

.catalog-meta strong {
  color: var(--black);
  font-weight: 600;
}

.catalog-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sort-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--dark);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}

.sort-select:focus { border-color: var(--gold); }

/* ─── PRODUCT GRID ───────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ─── PRODUCT CARD ───────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.22s, transform 0.22s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-h);
  transform: translateY(-3px);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-new { background: var(--black); color: var(--white); }
.badge-hot { background: #e74c3c; color: var(--white); }
.badge-oferta { background: var(--gold); color: var(--white); }

.product-img-wrap {
  position: relative;
  overflow: hidden;
  background: #f5f2ee;
  aspect-ratio: 1 / 1.1;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform 0.35s ease;
}

.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.quick-wa {
  position: absolute;
  bottom: -48px;
  left: 0;
  right: 0;
  background: rgba(37, 211, 102, 0.92);
  color: #fff;
  text-align: center;
  padding: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: bottom 0.22s ease;
  cursor: pointer;
}

.product-card:hover .quick-wa { bottom: 0; }

.product-info {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.product-brand {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
}

.product-name {
  font-family: var(--font-disp);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--black);
}

.product-pricing { margin-top: 2px; }

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--black);
}

.product-installment {
  font-size: 0.78rem;
  color: #1a7a4a;
  font-weight: 600;
  margin-top: 2px;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 6px;
  border-left: 3px solid var(--gold);
}

.payment-methods span {
  font-size: 0.75rem;
  color: var(--black);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.payment-methods span:first-child {
  color: #0066cc;
}

.payment-methods span:last-child {
  color: #27ae60;
}
.btn-wa {
  width: 100%;
  padding: 10px;
  background: var(--black);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s, transform 0.15s;
}

.btn-wa:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

.category-banner {
  background: linear-gradient(135deg, var(--black) 0%, #2a2318 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.category-banner::after {
  content: '🕌';
  position: absolute;
  right: 120px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  opacity: 0.08;
}

.banner-text h2 {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 4px;
}

.banner-text p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

.banner-badge {
  background: var(--gold);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--black);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.filter-tag button {
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.15s;
}

.filter-tag button:hover { color: #fff; }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--soft);
}

.no-results h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--mid);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}

.page-btn {
  width: 38px;
  height: 38px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
}

.page-btn.active {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}

.page-btn:hover:not(.active) {
  border-color: var(--gold);
  color: var(--gold);
}

.mobile-filter-toggle {
  display: none;
  width: 100%;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  z-index: 15;
  display: grid;
  place-items: center;
  transition: background 0.2s;
  cursor: pointer;
  font-size: 1.2rem;
}

.img-nav:hover { background: rgba(0, 0, 0, 0.9); }
.img-nav.prev { left: 10px; }
.img-nav.next { right: 10px; }

.img-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 15;
}

/* ─── CHATBOT ────────────────────────────────────────── */
.chatbot-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wa-green);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s;
}

.chatbot-toggle:hover { transform: scale(1.1); }
.chatbot-toggle.hidden { display: none; }

.chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 28px;
  z-index: 999;
  width: 380px;
  height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-container.open { display: flex; }

.chatbot-header {
  background: linear-gradient(135deg, var(--black) 0%, #2a2318 100%);
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.chatbot-close {
  background: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f9f9f9;
}

.chatbot-message {
  display: flex;
  gap: 10px;
}

.chatbot-message.user { justify-content: flex-end; }
.chatbot-message.bot { justify-content: flex-start; }

.chatbot-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.chatbot-message.user .chatbot-bubble {
  background: var(--black);
  color: white;
}

.chatbot-message.bot .chatbot-bubble {
  background: #e8e8e8;
  color: var(--dark);
}

.chatbot-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid var(--border);
}

.chatbot-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.chatbot-input:focus { border-color: var(--gold); }

.chatbot-send {
  width: 40px;
  height: 40px;
  background: var(--black);
  color: white;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.chatbot-send:hover { background: var(--gold); }

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.6);
  padding: 48px 24px 28px;
}

.footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  color: var(--white);
  font-family: var(--font-disp);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.87rem;
  line-height: 1.7;
  max-width: 280px;
}

.import-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(184, 150, 46, 0.15);
  border: 1px solid rgba(184, 150, 46, 0.3);
  color: var(--gold-lt);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 14px;
}

.footer h5 {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer ul li a {
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer ul li a:hover { color: var(--gold-lt); }

.socials {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: all 0.15s;
  color: rgba(255, 255, 255, 0.6);
}

.social-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.footer-bottom {
  max-width: 1380px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a:hover { color: var(--gold-lt); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .sidebar.open { display: block; }
  .mobile-filter-toggle { display: flex; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 16px; }
  .nav { display: none; }
  .wa-btn-header span { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .category-banner { flex-direction: column; gap: 16px; text-align: center; }
  .chatbot-container { width: calc(100% - 24px); height: 60vh; right: 12px; bottom: 80px; }
}
