/* ============================================
   IDEPAL B2B — CSS Principal
   Color oficial: #8b0d31
   ============================================ */

:root {
  --brand:      #8b0d31;
  --brand-d:    #6b0926;
  --brand-h:    #a01038;
  --dark:       #0d0205;
  --text:       #1a1a1a;
  --muted:      #888;
  --cream:      #f5f3f0;
  --white:      #ffffff;
  --border:     #e8e3dc;
  --border-d:   #e0d8cc;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Barlow', sans-serif;
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
address { font-style: normal; }

/* ---- Animaciones ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { opacity: 0.4; }
  50%  { opacity: 0.7; }
  100% { opacity: 0.4; }
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  background: var(--brand);
  padding: 7px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-l {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.4px;
}

.topbar-l strong {
  color: #fff;
  font-weight: 600;
}

.topbar-r {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.3px;
}

.topbar-r i {
  font-size: 12px;
  vertical-align: -1px;
  color: rgba(255,255,255,0.45);
}

.topbar-r .sep {
  color: rgba(255,255,255,0.15);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--brand);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.logo-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text);
}

.logo-b2b {
  font-size: 9px;
  background: var(--brand);
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 2.5px;
  margin-left: 4px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 0;
}

.nav-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  height: 62px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover  { color: var(--text); }
.nav-link.active { color: var(--brand); border-bottom-color: var(--brand); }

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

.nav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #666;
  font-size: 17px;
  cursor: pointer;
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-icon:hover { border-color: var(--brand); color: var(--brand); }

.nav-cart { position: relative; }

.cart-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 50%;
  border: 1.5px solid #fff;
}

.btn-login {
  background: var(--brand);
  color: #fff;
  padding: 9px 22px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
}

.btn-login:hover { background: var(--brand-h); }

/* ============================================
   HERO
   ============================================ */
.hero {
  background: var(--brand);
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 56px 28px;
  position: relative;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.025) 0,
    rgba(255,255,255,0.025) 1px,
    transparent 0,
    transparent 50%
  );
  background-size: 20px 20px;
  pointer-events: none;
}

.hero-circle {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 340px;
  height: 340px;
  border: 70px solid rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero-circle2 {
  position: absolute;
  right: 80px;
  top: 60px;
  width: 180px;
  height: 180px;
  border: 40px solid rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero-line {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}

.hero-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 3px;
  background: #fff;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  animation: fadeUp 0.6s ease both;
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-tag-bar {
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,0.45);
}

.hero-tag-text {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  font-weight: 700;
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 58px;
  line-height: 0.92;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -1px;
  margin-bottom: 18px;
}

.hero h1 em {
  color: rgba(255,255,255,0.35);
  font-style: normal;
}

.hero p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 30px;
}

.hero-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hbtn-p {
  background: #fff;
  color: var(--brand);
  padding: 13px 28px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
}

.hbtn-p:hover { opacity: 0.92; }

.hbtn-s {
  background: transparent;
  color: rgba(255,255,255,0.6);
  padding: 13px 22px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
}

.hbtn-s:hover {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.85);
}

/* ============================================
   SECCIONES
   ============================================ */
.section { padding: 0; }

.sec-head {
  padding: 32px 28px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.sec-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
}

.sec-link {
  font-size: 11px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sec-link:hover { opacity: 0.75; }

/* ============================================
   GRILLA CATEGORÍAS — Vision Cards
   ============================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 28px;
}

.cat-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1.5px solid #ebebeb;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  transition: box-shadow 0.25s, transform 0.25s;
  /* reset clases heredadas */
  position: relative;
  height: auto;
}

.cat-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  transform: translateY(-3px);
  border-color: #ddd;
}

/* Área de imagen */
.cat-media {
  position: relative;
  inset: auto;
  width: 100%;
  aspect-ratio: 1;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  padding: 24px;
  flex-shrink: 0;
}

.cat-card.cat-small .cat-media {
  position: relative;
  inset: auto;
  height: auto;
}

.cat-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  transition: transform 0.3s ease;
}

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

/* Sin overlay */
.cat-ov { display: none; }

/* Pestaña de nombre — fondo burdeo */
.cat-body {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  width: 100%;
  padding: 14px 12px 16px;
  background: #8b0d31;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-shrink: 0;
}

.cat-card.cat-small .cat-body {
  position: relative;
  inset: auto;
  grid-row: unset;
  background: #8b0d31;
  border: none;
}

.cat-pill { display: none; }

.cat-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: none;
  text-align: center;
  line-height: 1.2;
}

.cat-name.big { font-size: 16px; }

.cat-sub { display: none; }

/* ============================================
   GRILLA PRODUCTOS — estilo Hyper/Shopify
   ============================================ */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 28px;
}

.prod-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid #ebebeb;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}

.prod-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.09);
  transform: translateY(-2px);
  border-color: #ddd;
}

/* Área de imagen */
.prod-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  padding: 20px;
  position: relative;
}

.prod-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.prod-img-wrap i {
  font-size: 44px;
  color: #ccc;
}

/* Área de imagen bloqueada */
.prod-img-lock {
  flex-direction: column;
  gap: 12px;
  background: #f9f0f2;
}

.prod-img-lock i {
  font-size: 32px;
  color: #8b0d31;
  opacity: 0.4;
}

.prod-lock-text {
  font-size: 11px;
  color: #aaa;
  text-align: center;
  line-height: 1.5;
  max-width: 120px;
}

/* Badge */
.prod-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #8b0d31;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 1;
}

/* Info */
.prod-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}

.prod-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #aaa;
}

.prod-name {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 4px;
}

.prod-name.muted { color: #bbb; }

.prod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}

.prod-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.prod-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #8b0d31;
  line-height: 1;
}

.prod-price-old {
  font-size: 13px;
  color: #bbb;
  text-decoration: line-through;
  font-family: 'Barlow', sans-serif;
}

.prod-price-login {
  font-size: 12px;
  font-weight: 600;
  color: #8b0d31;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-bottom: 1px solid rgba(139,13,49,0.3);
  padding-bottom: 1px;
}

.prod-btn {
  background: #8b0d31;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.prod-btn:hover:not(:disabled) { background: #6b0926; }
.prod-btn:disabled { opacity: 0.5; cursor: default; }
.prod-btn-lock { background: #f0e8ea; }
.prod-btn-lock i { color: #8b0d31; }
.prod-btn-lock:hover { background: #e8d8db; }

.skeleton-card .prod-img-wrap { animation: shimmer 1.5s ease-in-out infinite; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--dark);
  color: #fff;
  margin-top: 36px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 28px 40px;
}

.ft-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ft-brand-mark {
  width: 34px;
  height: 34px;
  background: var(--brand);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.ft-brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 2px;
  color: #fff;
}

.ft-brand-b2b {
  font-size: 8px;
  background: rgba(139,13,49,0.3);
  color: rgba(255,255,255,0.6);
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 2px;
  margin-left: 4px;
  font-weight: 700;
  border: 1px solid rgba(139,13,49,0.4);
}

.ft-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  line-height: 1.8;
  max-width: 220px;
  margin-bottom: 20px;
}

.ft-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ft-ci {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

.ft-ci i {
  color: rgba(139,13,49,0.9);
  font-size: 14px;
  flex-shrink: 0;
}

.ft-col-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(139,13,49,0.9);
  margin-bottom: 14px;
}

.ft-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ft-link {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: color 0.2s;
}

.ft-link:hover { color: rgba(255,255,255,0.75); }

.footer-mid {
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ft-cert {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.ft-ci2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(255,255,255,0.25);
}

.ft-ci2 i {
  font-size: 14px;
  color: rgba(139,13,49,0.7);
}

.ft-social { display: flex; gap: 8px; }

.ft-soc {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ft-soc:hover {
  border-color: var(--brand);
  color: rgba(255,255,255,0.7);
}

.footer-bottom {
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ft-copy {
  font-size: 10px;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.3px;
}

.ft-legal { display: flex; gap: 20px; }

.ft-legal-link {
  font-size: 10px;
  color: rgba(255,255,255,0.18);
  cursor: pointer;
  transition: color 0.2s;
}

.ft-legal-link:hover { color: rgba(255,255,255,0.5); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .topbar-l { display: none; }
  .topbar   { justify-content: flex-end; }

  .cat-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px;
    gap: 3px;
  }
  .cat-card.span2 {
    grid-row: auto;
    grid-column: 1 / 3;
    height: 200px;
  }

  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 600px) {
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .hero { padding: 40px 16px; }
  .hero h1 { font-size: 42px; }

  .cat-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 0 16px;
    gap: 3px;
  }

  .cat-card {
    height: 180px;
  }

  .cat-card.span2 {
    grid-column: auto;
    height: 220px;
  }

  .prod-grid { grid-template-columns: 1fr 1fr; padding: 0 16px; }
  .sec-head  { padding: 24px 16px 12px; }

  .footer-top    { grid-template-columns: 1fr; padding: 32px 16px 24px; }
  .footer-mid    { padding: 12px 16px; }
  .footer-bottom { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .ft-cert       { gap: 12px; }
}