/* ============================================================
   TORSHOPPING v2 — Bootstrap 5.3 + Bootstrap Icons
   ============================================================ */

/* ---------- VARIABLES (modo claro) ---------- */
:root {
  --brand:            #ff8c00;
  --brand-dark:       #cc7000;
  --brand-soft:       #fff3e0;

  --heading-color:    #1a1a1a;
  --font-color:       #555555;
  --price-tach:       #999999;

  --bg-body:          #f8f9fa;
  --bg-card:          #ffffff;
  --border-color:     #e6e6e6;

  --header-bg:        #ff8c00;
  --header-text:      #ffffff;

  --footer-bg:        #2f2f2f;
  --footer-bglight:   #3a3a3a;
  --footer-text:      #d3d3d3;
}

/* ---------- VARIABLES (modo oscuro) ---------- */
[data-bs-theme="dark"] {
  --heading-color:    #f1f1f1;
  --font-color:       #b8b8b8;
  --price-tach:       #777777;

  --bg-body:          #121212;
  --bg-card:          #1e1e1e;
  --border-color:     #2e2e2e;

  --brand-soft:       #3a2a12;

  --footer-bg:        #0d0d0d;
  --footer-bglight:   #1a1a1a;
  --footer-text:      #b8b8b8;
}

/* ---------- BASE ---------- */
body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--font-color);
  transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3, h4, h5, h6 { color: var(--heading-color); }

a { transition: color .2s ease; }

/* ---------- HEADER / NAVBAR ---------- */
.tor-header {
  background-color: var(--header-bg);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.tor-header .navbar-brand {
  color: var(--header-text) !important;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.5px;
}
.tor-header .nav-link {
  color: var(--header-text) !important;
  font-weight: 600;
  font-size: .95rem;
}
.tor-header .nav-link:hover,
.tor-header .nav-link.active {
  color: #fff !important;
  opacity: .8;
}
.tor-header .navbar-toggler {
  border: none;
  color: #fff;
  padding: .25rem .5rem;
}
.tor-header .navbar-toggler:focus { box-shadow: none; }

.btn-theme-toggle {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.btn-theme-toggle:hover { background: rgba(255,255,255,.3); }

/* ---------- BREADCRUMB ---------- */
.tor-breadcrumb {
  background-color: var(--brand-soft);
  border-radius: .5rem;
  padding: .75rem 1rem;
}
.tor-breadcrumb .breadcrumb { margin: 0; }
.tor-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}
.tor-breadcrumb a:hover { text-decoration: underline; }
.tor-breadcrumb .breadcrumb-item.active { color: var(--font-color); }

/* ---------- TÍTULOS DE SECCIÓN ---------- */
.tor-section-title {
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}
.tor-section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--brand);
  margin: .75rem auto 0;
  border-radius: 3px;
}

/* ---------- CARD DE CATEGORÍA ---------- */
/* ---------- CARD DE CATEGORÍA ---------- */
.tor-cat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  padding: 6px;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.tor-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

/* Bloque de imágenes: 1 grande + 2 miniaturas */
.tor-cat-media {
  display: flex;
  gap: 6px;
  aspect-ratio: 16 / 11;   /* ajusta si quieres más alto/bajo */
}

.tor-cat-main {
  flex: 0 0 65%;
  border-radius: 8px;
  overflow: hidden;
}
.tor-cat-thumbs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tor-cat-main img,
.tor-cat-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.tor-cat-main img { border-radius: 8px; }
.tor-cat-thumbs img { flex: 1; border-radius: 8px; }
.tor-cat-card:hover img { transform: scale(1.05); }

/* Nombre dentro de la card */
.tor-cat-name {
  text-align: center;
  font-weight: 600;
  color: var(--heading-color);
  padding: .75rem .25rem .35rem;
  font-size: 1rem;
  margin: 0;
  line-height: 1.3;
}

/* ---------- CARD DE PRODUCTO ---------- */
.tor-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tor-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.tor-product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--brand-soft);
}
.tor-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.tor-product-card:hover .tor-product-img-wrap img { transform: scale(1.06); }

.tor-badge-discount {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dc3545;
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
  padding: .35rem .55rem;
  border-radius: 50rem;
  z-index: 2;
}
.tor-badge-out {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-weight: 600;
  font-size: .75rem;
  padding: .35rem .55rem;
  border-radius: 50rem;
  z-index: 2;
}

.tor-product-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.tor-product-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 .5rem;
  line-height: 1.35;
}
.tor-product-desc {
  font-size: .85rem;
  color: var(--font-color);
  margin: 0 0 .75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tor-product-price {
  margin-top: auto;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
}
.tor-product-price .tach {
  color: var(--price-tach);
  text-decoration: line-through;
  font-weight: 400;
  font-size: .85rem;
  margin-right: .4rem;
}

/* ---------- DETALLE DE PRODUCTO ---------- */
.tor-detail-img-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}
.tor-detail-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.tor-detail-title {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: .5rem;
}
.tor-detail-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand);
}
.tor-detail-price .tach {
  color: var(--price-tach);
  text-decoration: line-through;
  font-weight: 400;
  font-size: 1rem;
  margin-right: .5rem;
}
.tor-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff !important;
  text-decoration: none;
  transition: transform .2s, opacity .2s;
}
.tor-share-btn:hover { transform: translateY(-2px); opacity: .85; }
.tor-share-fb { background: #3B5998; }
.tor-share-tw { background: #1DA1F2; }
.tor-share-wa { background: #25D366; }

/* ---------- FOOTER ---------- */
.tor-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}
.tor-footer h5 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.tor-footer p,
.tor-footer li,
.tor-footer a {
  color: var(--footer-text);
  font-size: .9rem;
}
.tor-footer a { text-decoration: none; }
.tor-footer a:hover { color: var(--brand); }
.tor-footer ul { list-style: none; padding: 0; }
.tor-footer ul li { margin-bottom: .5rem; }

.tor-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff !important;
  margin-right: .4rem;
  transition: transform .2s, background .2s;
}
.tor-social a:hover {
  transform: translateY(-3px);
  background: var(--brand-dark);
}
.tor-copy {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: .85rem;
  color: #aaa;
}
.tor-copy a { color: var(--brand); text-decoration: underline; }

/* ---------- BOTÓN SCROLL TOP ---------- */
#movetop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1030;
  transition: background .2s, transform .2s;
}
#movetop:hover { background: var(--brand-dark); transform: translateY(-3px); }

/* ---------- UTILIDADES ---------- */
.tor-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- BOTÓN WHATSAPP FLOTANTE ---------- */
#whatsappFloat {
  position: fixed;
  bottom: 80px;          /* queda arriba del botón scroll top */
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .45);
  z-index: 1031;         /* por encima del scroll top */
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
#whatsappFloat:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 211, 102, .65);
  color: #fff;
}

/* Pulso suave para llamar la atención */
#whatsappFloat::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: wa-pulse 2s infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(1.4); opacity: 0;  }
  100% { transform: scale(1.4); opacity: 0;  }
}

/* ---------- AJUSTE MÓVIL NAVBAR ---------- */
@media (max-width: 991.98px) {
  .tor-header .navbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .tor-header .navbar-brand {
    padding-left: .25rem;
  }
  .tor-header .navbar-toggler {
    margin-right: .25rem;
  }
}
