:root {
  --site-bg: #f3f4f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text-main: #232f3e;
  --text-soft: #5b6470;
  --text-muted: #8a94a3;
  --border-soft: #e5e7eb;
  --shadow-soft: 0 1px 2px rgba(35, 47, 62, 0.05);
  --shadow-hover: 0 10px 26px rgba(35, 47, 62, 0.10);
  --header-bg: #232f3e;
  --primary: #e07a1f;
  --primary-hover: #c96a14;
  --success: #2f9e44;
  --radius-main: 8px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--site-bg);
  color: var(--text-main);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  text-decoration: none;
}

.site-main {
  padding-top: 0;
  padding-bottom: 24px;
  flex: 1 0 auto;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 18px rgba(35, 47, 62, 0.18);
}

.site-header-inner {
  padding-top: 12px;
  padding-bottom: 10px;
}

.site-logo {
  display: inline-block;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.site-logo:hover {
  color: #ffffff;
}

.site-search {
  position: relative;
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid rgba(224, 122, 31, 0.25);
  border-radius: var(--radius-main);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.site-search-input {
  border: 0;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  padding-left: 1rem;
  padding-right: 1rem;
  box-shadow: none !important;
  color: var(--text-main);
}

.site-search-input::placeholder {
  color: var(--text-muted);
}

.site-search-button {
  min-width: 58px;
  border: 0;
  border-left: 1px solid var(--border-soft);
  background: #ffffff;
  color: var(--text-soft);
}

.site-search-button:hover {
  background: #fff7ef;
  color: var(--primary);
}

.site-user-nav a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  margin-left: 1rem;
}

.site-user-nav a:hover {
  color: #ffffff;
}

.header-subnav {
  margin-top: 10px;
}

.site-sections-nav {
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.site-sections-nav a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  margin-right: 1rem;
}

.site-sections-nav a:hover {
  color: #ffffff;
}

/* SECTIONS */

.section-shell {
  margin-bottom: 20px;
}

.section-header {
  margin-bottom: 14px;
}

.section-header-with-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  margin: 0;
  color: #4b5563;
  font-size: 1.5rem;
  font-weight: 400;
}

.section-link {
  color: var(--primary);
  font-size: 0.95rem;
}

.section-link:hover {
  color: var(--primary-hover);
}

/* HERO */

.hero-home {
  margin-bottom: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
  background: linear-gradient(180deg, #2b394a 0%, #f3f4f6 100%);
}

.hero-home-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(35, 47, 62, 0.10);
}

.hero-eyebrow {
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-title {
  margin: 0 0 10px 0;
  color: var(--text-main);
  font-size: 2rem;
  line-height: 2.25rem;
  font-weight: 400;
}

.hero-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.55rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-highlight {
  background: #f8fafc;
  border: 1px solid rgba(35, 47, 62, 0.08);
  border-radius: 10px;
  padding: 16px;
}

.hero-highlight-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.hero-highlight-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5rem;
}

/* BUTTONS */

.btn-primary-main {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  font-weight: 600;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
}

.btn-primary-main:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary-soft {
  background: #fff7ef;
  border: 1px solid #f7cfa6;
  color: var(--primary);
  font-weight: 600;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
}

.btn-secondary-soft:hover {
  background: #ffedd8;
  border-color: #efbc85;
  color: var(--primary-hover);
}

/* CATEGORY TILES */

.category-tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-main);
  text-align: center;
  padding: 16px 12px;
  height: 100%;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.category-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(224, 122, 31, 0.30);
}

.category-tile-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px auto;
  border-radius: 50%;
  background: #fff7ef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.category-tile-name {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.25rem;
}

/* PRODUCT CARD */

.product-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-main);
  overflow: hidden;
  height: 100%;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(224, 122, 31, 0.25);
}

.product-card-image {
  height: 230px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.product-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-body {
  padding: 14px 16px 16px 16px;
}

.product-card-price {
  color: var(--text-main);
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: 400;
  margin-bottom: 4px;
}

.product-card-installments {
  color: var(--success);
  font-size: 0.92rem;
  margin-bottom: 7px;
}

.product-card-title {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.32rem;
  min-height: 2.64rem;
  margin-bottom: 8px;
}

.product-card-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* FEATURE CARD */

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-main);
  padding: 16px;
  height: 100%;
  box-shadow: var(--shadow-soft);
}

.feature-card-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card-text {
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.48rem;
}

/* FOOTER */

.site-footer {
  margin-top: 26px;
  padding-top: 28px;
  padding-bottom: 28px;
  background: #ffffff;
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.footer-brand {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-text {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.footer-link {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.footer-link:hover {
  color: var(--primary);
}

/* RESPONSIVE */

@media (max-width: 991.98px) {
  .site-header-inner {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-user-nav {
    margin-top: 4px;
  }

  .site-user-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .hero-title {
    font-size: 1.6rem;
    line-height: 1.85rem;
  }

  .product-card-image {
    height: 200px;
  }
}

@media (max-width: 575.98px) {
  .site-logo {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.28rem;
  }

  .hero-home-card {
    padding: 16px;
  }

  .hero-title {
    font-size: 1.35rem;
    line-height: 1.58rem;
  }

  .hero-text {
    font-size: 0.95rem;
    line-height: 1.42rem;
  }

  .product-card-price {
    font-size: 1.38rem;
  }

  .product-card-image {
    height: 180px;
  }

  .section-header-with-link {
    align-items: flex-start;
    flex-direction: column;
  }
}

.category-hero {
  margin-bottom: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
  background: linear-gradient(180deg, #2b394a 0%, #f3f4f6 100%);
}

.category-hero-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(35, 47, 62, 0.10);
}

.category-breadcrumbs {
  margin-bottom: 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.category-breadcrumbs a {
  color: var(--primary);
}

.category-breadcrumbs a:hover {
  color: var(--primary-hover);
}

.category-breadcrumbs span {
  margin-right: 6px;
}

.category-hero-eyebrow {
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.category-hero-title {
  margin: 0 0 10px 0;
  color: var(--text-main);
  font-size: 2rem;
  line-height: 2.2rem;
  font-weight: 400;
}

.category-hero-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.55rem;
  max-width: 680px;
}

.category-hero-box {
  background: #f8fafc;
  border: 1px solid rgba(35, 47, 62, 0.08);
  border-radius: 10px;
  padding: 16px;
}

.category-hero-box-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-hero-box-text {
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.5rem;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-main);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.filter-panel-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group-title {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.filter-group a {
  display: block;
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.filter-group a:hover {
  color: var(--primary);
}

.listing-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-main);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  margin-top: 30px;
}

.listing-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.listing-title {
  margin: 0 0 4px 0;
  color: var(--text-main);
  font-size: 1.3rem;
  line-height: 1.5rem;
  font-weight: 400;
}

.listing-count {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.listing-sort-select {
  min-width: 210px;
  border-color: var(--border-soft);
  color: var(--text-main);
}

.listing-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding-left: 12px;
  padding-right: 12px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.92rem;
}

.pagination-link:hover {
  border-color: rgba(224, 122, 31, 0.35);
  color: var(--primary);
}

.pagination-link-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.pagination-link-active:hover {
  color: #ffffff;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.pagination-link-disabled {
  color: var(--text-muted);
  pointer-events: none;
  background: #fafafa;
}

.product-card-price-old {
  font-size: 0.95rem;
  color: #888;
  text-decoration: line-through;
  line-height: 1.1;
  margin-bottom: 0.15rem;
}

.product-card-price {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
}

.product-detail-price-old {
  font-size: 1.05rem;
  color: #888;
  text-decoration: line-through;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.product-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.header-user-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.header-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
}

.header-user-link {
  font-size: 0.92rem;
  text-decoration: none;
}

/* visual de zona usuario */

.site-user-nav-compact {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.header-user-link {
    text-decoration: none;
    white-space: nowrap;
    color: #e5e7eb;
}

.header-user-menu {
    position: relative;
    display: inline-block;
}

.header-user-menu-toggle {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    color: #e5e7eb;
    line-height: 1.2;
    white-space: nowrap;
}

.header-user-menu-toggle:hover {
    text-decoration: underline;
}

.header-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    z-index: 1000;
}

.header-user-menu:hover .header-user-dropdown,
.header-user-menu:focus-within .header-user-dropdown {
    display: block;
}

.header-user-dropdown-link {
    display: block;
    padding: 10px 14px;
    color: #1f2d3d;
    text-decoration: none;
    font-size: 0.95rem;
}

.header-user-dropdown-link:hover {
    background: #f5f7fa;
}


.header-cart-text {
    line-height: 1;
}

@media (max-width: 991.98px) {
    .site-user-nav-compact {
        justify-content: flex-start;
        margin-top: 8px;
    }

    .header-user-dropdown {
        right: auto;
        left: 0;
    }
}

.header-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.header-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.header-cart-svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

.header-user-menu-toggle,
.header-cart-link {
    font-size: 0.95rem;
}

/* fin zona usuario */

@media (max-width: 991.98px) {
  .listing-toolbar {
    flex-direction: column;
  }

  .listing-sort-select {
    min-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .category-hero-card {
    padding: 16px;
  }

  .category-hero-title {
    font-size: 1.45rem;
    line-height: 1.7rem;
  }

  .category-hero-text {
    font-size: 0.95rem;
    line-height: 1.42rem;
  }
}

.site-scan-button {
  border: 0;
  background: #f2f2f2;
  padding: 0 12px;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.barcode-scanner-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.barcode-scanner-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
}

.barcode-scanner-title {
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.barcode-scanner-reader {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.barcode-scanner-close {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: #333;
  color: #fff;
}

.barcode-scanner-msg {
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
}

.site-scan-button {
  border: 0;
  background: #f2f2f2;
  color: #222;
  padding: 0 11px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.site-scan-button:hover {
  background: #e5e5e5;
}