/* =============================================
   LOIMEX Online2 — Styles
   ============================================= */

/* --- Variables --- */
:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --line: #243041;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --brand: #f59e0b;
  --brand-2: #fbbf24;
  --ok: #10b981;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(0,0,0,.22);
  --radius: 18px;
  --max: 1280px;
}

/* --- Reset --- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; background: #f7f8fb; color: #0f172a; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Layout --- */
.container {
  width: calc(100% - 32px);
  max-width: var(--max);
  margin: 0 auto;
}
.topbar-inner,
.header-inner,
.hero,
.section,
.cta,
.footer-inner {
  display: block;
}

/* --- Topbar --- */
.topbar {
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar-inner {
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar .muted { color: #cbd5e1; }

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, .96);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}
.header-inner {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
}
.logo {
  color: var(--white);
  font-weight: bold;
  font-size: 28px;
  letter-spacing: 1px;
}
.logo span { color: var(--brand); }
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* --- Search --- */
.search {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  padding: 14px 18px;
  font-size: 15px;
}
.search input::placeholder { color: #aeb8c7; }
.search button {
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  padding: 14px 22px;
  font-weight: bold;
  cursor: pointer;
}

/* --- Header Actions --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill {
  color: var(--white);
  border: 1px solid rgba(255,255,255,.14);
  padding: 12px 14px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}
.pill.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  border-color: transparent;
  font-weight: bold;
}

/* --- Navigation --- */
.nav {
  background: #0b1220;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: wrap;
}
.nav ul::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  color: #dbe4f0;
  padding: 11px 14px;
  font-size: 14px;
  white-space: nowrap;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover {
  color: var(--brand-2);
  background: rgba(255,255,255,.06);
}

/* --- Hero --- */
.hero-wrap {
  background:
    radial-gradient(circle at top right, rgba(245,158,11,.22), transparent 24%),
    linear-gradient(180deg, #5b5e64 0%, #111827 100%);
  color: var(--white);
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 30px;
  align-items: center;
  padding: 58px 0 48px;
}
.eyebrow {
  display: inline-block;
  background: rgba(245,158,11,.14);
  color: #fde68a;
  border: 1px solid rgba(245,158,11,.25);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.hero p {
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.6;
  max-width: 720px;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.btn {
  display: inline-block;
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: bold;
  font-size: 15px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  box-shadow: var(--shadow);
}
.btn-secondary {
  background: rgba(255,255,255,.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.12);
}
.hero-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.stat {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  padding: 16px 18px;
  border-radius: 16px;
  min-width: 150px;
}
.stat strong {
  display: block;
  font-size: 24px;
  margin-bottom: 6px;
}
.stat span {
  color: #cbd5e1;
  font-size: 13px;
}

/* --- Hero Card --- */
.hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.hero-card img {
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0b1220;
}
.hero-card-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mini-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 14px;
  color: #dbe4f0;
  font-size: 14px;
}
.mini-card strong {
  display: block;
  color: var(--white);
  margin-bottom: 6px;
}

/* --- Content --- */
.content {
  padding: 42px 0 70px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -.02em;
}
.section-head p {
  margin: 8px 0 0;
  color: #64748b;
  max-width: 700px;
  line-height: 1.6;
}

/* --- Categories Grid --- */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 48px;
}
.category {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.category:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15,23,42,.08);
}
.category .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.category .icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.category h3 {
  margin: 0 0 8px;
  font-size: 19px;
}
.category p {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}
a.category {
  display: block;
  text-decoration: none;
  color: inherit;
}
.cat-link {
  color: #d97706;
  font-weight: bold;
  font-size: 14px;
}
.subcategory-count {
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 12px;
}

/* --- Toolbar --- */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar select,
.toolbar input {
  border: 1px solid #dbe2ea;
  background: var(--white);
  border-radius: 12px;
  padding: 13px 14px;
  min-width: 180px;
  font-size: 14px;
}
.toolbar input { min-width: 260px; }

/* --- Products Grid --- */
.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 54px;
}
.product {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  display: flex;
  flex-direction: column;
}
.product-media {
  position: relative;
  background: #ffffff;
  padding: 20px;
  display: block;
  cursor: pointer;
}
.product h3 a {
  color: inherit;
  text-decoration: none;
}
.product h3 a:hover {
  color: var(--brand);
}
.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #111827;
  color: var(--white);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: bold;
}
.badge-variants {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
  color: #111827 !important;
}
.product-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.product-body {
  padding: 18px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sku {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Consolas', 'Courier New', monospace;
  letter-spacing: .03em;
  margin-bottom: 8px;
  border-left: 3px solid #f59e0b;
  padding-left: 8px;
}
.product h3 {
  font-size: 18px;
  margin: 0 0 10px;
  line-height: 1.35;
  min-height: 48px;
}
.meta {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  min-height: 66px;
  margin-bottom: 14px;
}
.stock {
  color: var(--ok);
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 14px;
}
.stock.no-stock {
  color: #ef4444;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.price {
  font-size: 28px;
  font-weight: bold;
  color: #0f172a;
}
.price small {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  font-weight: normal;
}
.buy-btn {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  padding: 12px 16px;
  font-weight: bold;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
.buy-btn:hover {
  opacity: .9;
  color: #111827;
}

/* --- Benefits --- */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 52px;
}
.benefit {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px;
}
.benefit h4 {
  margin: 0 0 8px;
  font-size: 17px;
}
.benefit p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
  font-size: 14px;
}

/* --- Ficha de producto --- */
.ficha {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
.ficha-img {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ficha-img img {
  max-height: 500px;
  object-fit: contain;
}
.ficha-img-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ficha-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.ficha-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 4px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease;
}
.ficha-thumb.active,
.ficha-thumb:hover {
  border-color: var(--brand);
}
.ficha-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ficha-info {
  padding: 10px 0;
}
/* --- Ficha: Badges partner/certificacion --- */
.prod-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.prod-badge--cert {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.prod-badge--partner {
  background: #0f172a;
  color: #fff;
  border: 1px solid #1e293b;
}
.prod-badge--partner img {
  display: inline-block;
}

/* --- Ficha: Descripcion (estilo new2) --- */
.ficha-desc {
  font-size: 17px;
  line-height: 1.8;
  color: #444;
  max-width: 760px;
  margin-bottom: 28px;
}
.ficha-desc p, .ficha-desc .headdesc {
  font-size: 17px;
  line-height: 1.8;
  color: #444;
  margin: 0 0 20px;
}
.ficha-desc dl {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  padding: 18px 22px;
  margin: 0 0 14px;
}
.ficha-desc dt {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--brand);
  margin: 0 0 8px;
}
.ficha-desc dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: #444;
}
.ficha-desc ul, .ficha-desc .headlines ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ficha-desc li, .ficha-desc .headlines li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}
.ficha-desc li::before, .ficha-desc .headlines li::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  background-color: var(--brand);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* --- Ficha: Tabla de especificaciones (estilo new2) --- */
.ficha-specs {
  margin-bottom: 24px;
}
.ficha-specs-full {
  margin-top: 32px;
}
.ficha-specs h3 {
  font-size: 18px;
  margin: 0 0 14px;
  color: #0f172a;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.spec-table thead th {
  padding: 14px 18px;
  color: #fff;
  font-size: 14px;
  text-align: center;
}
.spec-table thead th:first-child {
  background: linear-gradient(90deg, #1f2937, #374151);
  text-align: left;
  width: 240px;
}
.spec-table thead th:not(:first-child) {
  background: linear-gradient(180deg, var(--brand), #d97706);
}
.spec-table tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid #ececf0;
  font-size: 14px;
  text-align: center;
  color: #475569;
}
.spec-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
  color: #0f172a;
}
.spec-table tbody tr:nth-child(odd) td { background: #f8fafc; }
.spec-table tbody tr:nth-child(even) td { background: #fff; }
.spec-table tbody td:not(:first-child) { font-weight: 700; color: #0f172a; }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.sv-yes { color: #10b981; font-size: 18px; font-weight: 900; }
.sv-opt { color: #f59e0b; font-size: 16px; font-weight: 700; }
.sv-no  { color: #aaa; font-size: 18px; font-weight: 400; }
.spec-table tbody tr.spec-hd td {
  background: #f1f5f9 !important;
  border-top: 2px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
  padding: 9px 18px;
}
/* Columnas de variante clicables */
.spec-table .var-link { padding: 0; position: relative; cursor: pointer; }
.spec-table .var-link a {
  display: block;
  padding: 12px 18px;
  color: inherit;
  text-decoration: none;
  width: 100%;
  height: 100%;
}
.spec-table .var-link:hover { background: #fee2e2 !important; }
.spec-table .var-link:hover a { color: #991b1b; }
.spec-table thead .var-link a { padding: 14px 18px; }
.spec-table thead .var-link:hover { background: rgba(255,255,255,.2) !important; }

/* Columna seleccionada (producto actual) */
.spec-table thead th.col-sel {
  background: linear-gradient(180deg, #b45309, #92400e) !important;
  box-shadow: inset 0 -3px 0 rgba(255,255,255,.25);
}
.spec-table tbody td.col-sel { background: #fffbeb !important; }
.spec-table tbody tr:nth-child(odd) td.col-sel { background: #fef3c7 !important; }
.spec-table colgroup col.col-sel { background: #fffbeb; }
/* Link en cabecera de variante */
.spec-table thead th a {
  color: #fff;
  text-decoration: none;
  opacity: .9;
}
.spec-table thead th a:hover {
  opacity: 1;
  text-decoration: underline;
}
@media (max-width: 760px) {
  .spec-table thead th:first-child { width: 140px; }
  .spec-table { font-size: 13px; }
}
.ficha-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 28px;
}
.ficha-extra p { color: #475569; line-height: 1.7; font-size: 15px; }
.product a { color: inherit; text-decoration: none; display: block; }

@media (max-width: 760px) {
  .ficha { grid-template-columns: 1fr; }
  .ficha-extra { grid-template-columns: 1fr; }
}

/* --- CTA --- */
.cta {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: var(--white);
  border-radius: 28px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow);
}
.cta h3 {
  margin: 0 0 8px;
  font-size: 30px;
}
.cta p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 760px;
}

/* --- Footer --- */
.footer {
  background: #0b1220;
  color: #cbd5e1;
  margin-top: 60px;
}
.footer-inner {
  padding: 34px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
}
.footer h4 {
  color: var(--white);
  margin: 0 0 12px;
  font-size: 15px;
}
.footer p,
.footer a {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
  display: block;
}
.copyright {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0 26px;
  color: #94a3b8;
  font-size: 13px;
}

/* --- Pagination --- */
.pager {
  text-align: center;
  padding: 20px 0 10px;
}
.pager a, .pager span {
  display: inline-block;
  padding: 10px 16px;
  margin: 3px;
  border-radius: 10px;
  font-weight: bold;
}
.pager a {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #0f172a;
}
.pager a:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.pager span.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
}

/* =============================================
   Paginas de contenido
   ============================================= */
.page-header {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: var(--white);
  padding: 20px 0;
}
.page-header h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -.02em;
}
.page-header p {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 16px;
}
.page-body {
  padding: 40px 0 60px;
}
.page-body h2 {
  font-size: 24px;
  margin: 32px 0 12px;
  color: #0f172a;
}
.page-body h2:first-child { margin-top: 0; }
.page-body p, .page-body li {
  color: #475569;
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 12px;
}
.page-body ul { padding-left: 20px; }
.page-body a { color: #d97706; font-weight: bold; }
.page-body a:hover { text-decoration: underline; }

.page-card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  margin-bottom: 18px;
}
.page-card h3 { margin: 0 0 8px; font-size: 20px; }
.page-card p { margin: 0; color: #64748b; line-height: 1.6; font-size: 14px; }

.page-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.page-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* --- Brand Cards --- */
.brand-card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15,23,42,.08);
}
.brand-card img {
  max-height: 60px;
  margin: 0 auto 14px;
  object-fit: contain;
}
.brand-card h3 { margin: 0 0 6px; font-size: 18px; }
.brand-card p { margin: 0; color: #64748b; font-size: 14px; }

/* --- Info & Message Boxes --- */
.info-box {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.info-box strong { color: #92400e; }

.msg-box {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 48px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}
.msg-box h2 { font-size: 26px; margin: 0 0 12px; }
.msg-box p { color: #64748b; margin: 0 0 20px; }

/* --- Admin Dashboard (ficha producto) --- */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.admin-kpi {
  background: linear-gradient(135deg, #111827, #1e293b);
  border: 1px solid #243041;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.admin-kpi-value {
  font-size: 32px;
  font-weight: bold;
  color: #f59e0b;
  line-height: 1;
  margin-bottom: 6px;
}
.admin-kpi-label {
  font-size: 13px;
  color: #94a3b8;
}
.admin-bars {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}
.admin-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.admin-bar-row:last-child { margin-bottom: 0; }
.admin-bar-label {
  width: 120px;
  font-size: 13px;
  color: #475569;
  flex-shrink: 0;
}
.admin-bar-track {
  flex: 1;
  height: 24px;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
}
.admin-bar-fill {
  height: 100%;
  border-radius: 8px;
  min-width: 4px;
  transition: width .4s ease;
}
.admin-bar-stock { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.admin-bar-venta { background: linear-gradient(135deg, #10b981, #34d399); }
.admin-bar-venta-ant { background: linear-gradient(135deg, #6ee7b7, #a7f3d0); }
.admin-bar-compra { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.admin-bar-compra-ant { background: linear-gradient(135deg, #fcd34d, #fde68a); }
.admin-bar-val {
  width: 50px;
  text-align: right;
  font-size: 14px;
  font-weight: bold;
  color: #0f172a;
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .admin-kpis { grid-template-columns: repeat(2, 1fr); }
  .admin-bar-label { width: 90px; font-size: 12px; }
}

/* --- Data Tables --- */
.orders-table {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}
.data-table thead {
  background: #f1f5f9;
}
.data-table th {
  padding: 14px 18px;
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.data-table td {
  padding: 14px 18px;
  font-size: 14px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: #f8fafc;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* --- Status Badges --- */
.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
}
.status-completed {
  background: #ecfdf5;
  color: #065f46;
}
.status-processing {
  background: #eff6ff;
  color: #1e40af;
}
.status-pending {
  background: #fffbeb;
  color: #92400e;
}
.status-cancelled {
  background: #fef2f2;
  color: #991b1b;
}

/* --- Filtros Page --- */
.filtros-layout {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  gap: 28px;
  align-items: start;
}
.filtros-panel {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  position: sticky;
  top: 100px;
}
.filtro-group {
  margin-bottom: 14px;
}
.filtro-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}
.filtros-results {
  min-width: 0;
}
.filtros-results .products {
  grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 1080px) {
  .filtros-layout { grid-template-columns: 240px 1fr !important; gap: 20px; }
  .filtros-results .products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 760px) {
  .filtros-layout { grid-template-columns: 1fr !important; }
  .filtros-panel { position: static; }
  .filtros-results .products { grid-template-columns: repeat(2, 1fr) !important; }
}

/* --- Contact Page --- */
.ctt-pill {
  display: inline-block;
  background: #0f172a;
  color: #f59e0b;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ctt-maps-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #111827;
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.ctt-maps-btn:hover { background: #000; color: #fff; }
.ctt-maps-btn svg { flex-shrink: 0; }
.ctt-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.ctt-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.4) 20%, transparent 100%),
    url('https://www.loimex.com/img/Loimex CORP 2026.webp') center center / cover no-repeat;
}
.ctt-offices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ctt-office {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  border: 1px solid #e5e7eb;
}
.ctt-office__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.ctt-office__body {
  padding: 20px 22px 24px;
}
.ctt-office__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.ctt-office__name {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
}
.ctt-office__addr {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.8;
}
.ctt-office__addr a {
  color: var(--brand);
  text-decoration: none;
}
.ctt-office__addr a:hover { text-decoration: underline; }

.ctt-form-wrap {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 44px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  border: 1px solid #e5e7eb;
  max-width: 720px;
  margin: 0 auto;
}
.ctt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ctt-full { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .ctt-offices { grid-template-columns: 1fr 1fr; }
  .ctt-form-grid { grid-template-columns: 1fr; }
  .ctt-full { grid-column: 1; }
  .ctt-form-wrap { padding: 28px 24px; }
}
@media (max-width: 560px) {
  .ctt-offices { grid-template-columns: 1fr; }
}

/* --- Forms --- */
.form-row {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 14px;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
  transition: border-color .15s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1080px) {
  .header-inner,
  .hero,
  .cta,
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .categories,
  .products,
  .benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  /* Header: logo centrado, busqueda debajo, acciones compactas */
  .header-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0;
  }
  .logo-img { height: 28px; }
  .search input { padding: 12px 14px; font-size: 14px; }
  .search button { padding: 12px 16px; font-size: 13px; }
  .header-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  .pill { padding: 8px 12px; font-size: 13px; }

  /* Topbar: ocultar en movil */
  .topbar { display: none; }

  /* Nav: scroll horizontal compacto */
  .nav a { padding: 9px 10px; font-size: 13px; }

  /* Hero: mas compacto */
  .hero { padding: 32px 0 28px; gap: 20px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero-card { display: none; }
  .hero-stats { gap: 10px; }
  .stat { padding: 12px 14px; min-width: 100px; }
  .stat strong { font-size: 20px; }
  .stat span { font-size: 12px; }
  .hero-buttons .btn { padding: 12px 16px; font-size: 14px; }
  .eyebrow { font-size: 12px; padding: 6px 12px; }

  /* Contenido */
  .content { padding: 24px 0 40px; }
  .section-head { display: block; }
  .section-head h2 { font-size: 24px; }

  /* Grids */
  .categories,
  .products,
  .benefits {
    grid-template-columns: 1fr;
  }
  .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Product cards compactas en movil */
  .product-media { padding: 12px; }
  .product-body { padding: 12px; }
  .product h3 { font-size: 14px; min-height: auto; margin: 0 0 6px; }
  .meta { display: none; }
  .sku { font-size: 11px; margin-bottom: 4px; }
  .stock { font-size: 12px; margin-bottom: 8px; }
  .price { font-size: 20px; }
  .price small { font-size: 11px; }
  .buy-btn { padding: 8px 12px; font-size: 12px; }

  /* Toolbar */
  .toolbar { gap: 8px; }
  .toolbar input,
  .toolbar select {
    width: 100%;
    min-width: 100%;
  }

  /* CTA */
  .cta { padding: 20px; border-radius: 16px; }
  .cta h3 { font-size: 22px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 16px; }
  .copyright { font-size: 12px; }

  /* Paginas de contenido */
  .page-header { padding: 14px 0; }
  .page-header h1 { font-size: 26px; }
  .page-grid-2, .page-grid-3 { grid-template-columns: 1fr; }
  .page-card { padding: 20px; }

  /* Ficha de producto */
  .ficha { grid-template-columns: 1fr; gap: 20px; }
  .ficha-img { padding: 16px; }
  .ficha-img img { max-height: 300px; }
  .ficha-thumbs { gap: 6px; }
  .ficha-thumb { width: 56px; height: 56px; }
  .ficha-desc { font-size: 15px; }
  .ficha-extra { grid-template-columns: 1fr; padding: 20px; }
  .ficha-specs-full { margin-top: 20px; }

  /* Tablas */
  .data-table th, .data-table td { padding: 10px 12px; font-size: 13px; }
  .spec-table thead th { padding: 10px 12px; font-size: 12px; }
  .spec-table tbody td { padding: 10px 12px; font-size: 13px; }
  .spec-table thead th:first-child { width: 120px; }

  /* Admin KPIs */
  .admin-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .admin-kpi { padding: 14px; }
  .admin-kpi-value { font-size: 24px; }
}