/* ============================================
   TindaVirtual — Custom Stylesheet
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary: #f59e0b;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --dark-3: #334155;
  --text-muted: #94a3b8;
  --surface: #1e293b;
  --border: rgba(255,255,255,.08);
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--dark);
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--dark-3); border-radius: 3px; }

/* ============ NAVBAR ============ */
#mainNavbar {
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.brand-text {
  font-weight: 800;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #a5b4fc, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-icon { font-size: 1.6rem; }

.navbar-search { width: 200px; transition: width .3s; }
.navbar-search:focus-within { width: 260px; }
.navbar-search .form-control {
  background: var(--dark-2);
  color: #e2e8f0;
  border-radius: 8px 0 0 8px !important;
}
.navbar-search .form-control::placeholder { color: var(--text-muted); }
.navbar-search .form-control:focus { box-shadow: none; background: var(--dark-3); }

.nav-link {
  border-radius: 8px;
  font-weight: 500;
  font-size: .875rem;
  transition: background .2s, color .2s;
}
.nav-link:hover, .nav-link.active {
  background: rgba(99,102,241,.2) !important;
  color: var(--primary-light) !important;
}
.nav-link.active { font-weight: 600; }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1a1040 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.2) 0%, transparent 70%);
  top: -200px; right: -100px;
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,.1) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  color: var(--primary-light);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .8rem; font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, #a5b4fc, #6366f1, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats { gap: 2rem; }
.hero-stat strong { font-size: 1.5rem; font-weight: 700; color: #fff; }
.hero-stat small { color: var(--text-muted); font-size: .75rem; }

.hero-img-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-img-wrapper img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-img-badge {
  position: absolute;
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.hero-img-badge.top-left { top: 16px; left: 16px; }
.hero-img-badge.bottom-right { bottom: 16px; right: 16px; }

/* ============ SECTION ============ */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #f1f5f9;
}
.section-sub { color: var(--text-muted); }
.divider-line {
  width: 48px; height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 0 auto 1rem;
}

/* ============ PRODUCT CARD ============ */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
  border-color: rgba(99,102,241,.4);
}
.product-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--dark-2);
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.08); }

.product-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-oferta { background: #ef4444; color: #fff; }
.badge-nuevo { background: #10b981; color: #fff; }
.badge-popular { background: var(--secondary); color: #000; }

.product-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(10px);
  transition: opacity .25s, transform .25s;
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.action-btn {
  width: 34px; height: 34px;
  background: rgba(15,23,42,.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #e2e8f0;
  text-decoration: none;
  font-size: .9rem;
  transition: background .2s, color .2s;
}
.action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.product-body { padding: 1rem 1.1rem 1.25rem; }
.product-category {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: 1px; font-weight: 600;
  color: var(--primary-light); margin-bottom: 4px;
}
.product-name {
  font-weight: 700; font-size: .95rem;
  color: #f1f5f9;
  margin-bottom: .4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-rating { font-size: .78rem; gap: 4px; margin-bottom: .6rem; }
.product-rating .reviews { color: var(--text-muted); }

.product-price .price-current {
  font-size: 1.2rem; font-weight: 800; color: #f1f5f9;
}
.product-price .price-original {
  font-size: .85rem; color: var(--text-muted);
  text-decoration: line-through;
}
.product-price .price-discount {
  font-size: .75rem; font-weight: 700;
  background: rgba(239,68,68,.15);
  color: #f87171;
  padding: 2px 7px; border-radius: 50px;
}

.btn-add-cart {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  padding: 9px 16px;
  width: 100%;
  transition: opacity .2s, transform .15s;
}
.btn-add-cart:hover { opacity: .9; transform: translateY(-1px); }
.btn-add-cart:active { transform: translateY(0); }

/* ============ CATEGORY PILLS ============ */
.cat-pill {
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #e2e8f0;
  font-size: .85rem; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============ FEATURE CARDS ============ */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(99,102,241,.4); }
.feature-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(99,102,241,.05));
  border: 1px solid rgba(99,102,241,.2);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

/* ============ TESTIMONIALS ============ */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}
.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

/* ============ BANNER ============ */
.promo-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), #7c3aed);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  top: -100px; right: -50px;
}

/* ============ CART PAGE ============ */
.cart-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color .2s;
}
.cart-item:hover { border-color: rgba(99,102,241,.3); }
.cart-item-img {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 10px;
}
.qty-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 32px; height: 32px;
  background: var(--dark-2);
  border: none; color: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem;
  transition: background .2s;
}
.qty-btn:hover { background: var(--primary); }
.qty-value {
  width: 36px; height: 32px;
  background: var(--dark-3);
  color: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .9rem;
}

.order-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky; top: 90px;
}

/* ============ FORM ============ */
.form-control, .form-select {
  background: var(--dark-2) !important;
  border: 1px solid var(--border) !important;
  color: #e2e8f0 !important;
  border-radius: 10px !important;
  padding: .65rem 1rem !important;
}
.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 3px rgba(99,102,241,.25) !important;
  border-color: var(--primary) !important;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label { color: #cbd5e1; font-weight: 500; font-size: .875rem; }
textarea.form-control { resize: vertical; min-height: 130px; }

/* ============ BUTTONS ============ */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  font-weight: 600;
  border-radius: 10px;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #3730a3); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary-light); border-radius: 10px; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* ============ BADGES ============ */
.badge.bg-primary { background: var(--primary) !important; }

/* ============ FOOTER ============ */
.footer { background: var(--dark-2); border-top: 1px solid var(--border); }
.footer-top { border-bottom: 1px solid var(--border); }
.footer-links li { margin-bottom: .5rem; }
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--primary-light); }
.social-btn {
  width: 36px; height: 36px;
  background: var(--dark-3);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.social-btn:hover { background: var(--primary); color: #fff; }

/* ============ PRODUCT DETAIL ============ */
.product-detail-img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.thumbnail-btn {
  width: 70px; height: 70px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .2s;
}
.thumbnail-btn:hover, .thumbnail-btn.active { border-color: var(--primary); }
.thumbnail-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ============ NOSOTROS ============ */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform .25s, border-color .25s;
}
.team-card:hover { transform: translateY(-6px); border-color: rgba(99,102,241,.4); }
.team-avatar {
  width: 90px; height: 90px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--primary);
  margin: 0 auto 1rem;
  display: block;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.stat-box strong { font-size: 2rem; font-weight: 800; color: var(--primary-light); }

/* ============ PAGE HEADER ============ */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.page-header h1 { font-weight: 800; }
.breadcrumb-item a { color: var(--primary-light); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ============ TOAST ============ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast-msg {
  background: var(--dark-2);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 14px 18px;
  color: #f1f5f9;
  font-size: .875rem;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px;
  min-width: 260px;
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============ MISC ============ */
.section-divider { border-color: var(--border); }
.bg-surface { background: var(--surface); }
.text-primary-light { color: var(--primary-light); }

@media (max-width: 767px) {
  .hero { padding: 60px 0 50px; }
  .hero-img-wrapper { display: none; }
}
