/* ================= RESET ================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  color: #222;
  padding-top: 86px;
  /* coincide con header fijo */
}
/* ================= HEADER ================= */
/* Si existe en HTML, lo ocultamos */
.header-center {
  display: none !important;
}
/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 86px;
  padding: 12px 40px;
  border-bottom: 1px solid #2f2f2f;
  background: #212122;
  z-index: 1000;
  display: flex;
  align-items: center;
}
/* LOGO */
.logo {
  position: absolute;
  left: 40px;
  display: flex;
  align-items: center;
}
.logo-img {
  height: 58px;
  width: auto;
  display: block;
}
/* ================= NAVBAR ================= */
.nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* centro real */
}
/* Centro (desktop) */
.nav-center {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}
.nav-center a {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  font-size: 14px;
}
/* Search */
.nav-search {
  height: 34px;
  width: 260px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 10px;
  outline: none;
  font-size: 13px;
}
.nav-search::placeholder {
  color: rgba(255, 255, 255, 0.75);
}
/* Dropdown categorías: anclaje correcto */
.dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  max-height: 360px;
  overflow: auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  display: none;
  z-index: 3500;
  padding: 6px;
}
.dropdown-menu.open {
  display: block;
}
/* dropdown items genéricos (por si los usás) */
.dropdown-item {
  width: 100%;
  border: none;
  background: #fff;
  cursor: pointer;
  text-align: left;
  padding: 10px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.dropdown-item:hover {
  background: #f5f5f5;
}
/* ICONO CARRITO */
.cart-icon {
  height: 1em;
  width: auto;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  filter: brightness(0) invert(1);
}
/* Derecha (desktop): CTA + Login o UserBox */
.nav-right {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6000;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
#ctaCliente,
#loginBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  white-space: nowrap;
  line-height: 36px;
  font-size: 14px;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}
/* Botón blanco: "Quiero ser cliente" */
#ctaCliente {
  background: #fff;
  color: #111;
  border: 1px solid #e6e6e6;
}
#ctaCliente:hover {
  background: #f5f5f5;
}
/* Botón negro: "Iniciar sesión" */
#loginBtn {
  background: #0b0b0b;
  color: #fff;
  border: 1px solid #0b0b0b;
}
#loginBtn:hover {
  background: #1a1a1a;
}
/* Caja usuario */
.user-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.hello-nav-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.hello-nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.profile-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  line-height: 0;
}
.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
/* Menu usuario */
.user-menu {
  position: absolute;
  top: 38px;
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  display: none;
  z-index: 4000;
}
.user-menu.open {
  display: block;
}
.user-menu-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
}
.user-menu-item:hover {
  background: #f5f5f5;
}
.user-menu-item.danger {
  color: #b00020;
}
/* ================= SECCIONES ================= */
.section {
  display: none;
}
.section.active {
  display: block;
}
/* TITULO + NOTA */
.section-title-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 20px 0 30px;
  padding: 0 40px;
}
.section-title {
  text-align: center;
  font-size: 32px;
}
.right-note {
  justify-self: end;
  font-size: 13px;
  font-weight: bold;
  color: #222;
}
/* ================= PRODUCTOS ================= */
.category-block {
  margin-bottom: 80px;
}
.category-title {
  font-size: 44px;
  font-weight: bold;
  margin: 60px 40px 30px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 10px;
  scroll-margin-top: 110px;
}
/* Layout Productos con sidebar */
.products-layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  padding: 0 40px;
  align-items: start;
}
/* Sidebar categorías */
.categories-sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
  border: 1px solid #eee;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding-right: 6px;
}
/* scrollbar fino */
.categories-sidebar::-webkit-scrollbar {
  width: 6px;
}
.categories-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.sidebar-title {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 10px;
}
.sidebar-list {
  display: grid;
  gap: 6px;
}
/* toggles (desktop sidebar) */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.toggle-row:hover {
  background: #f5f5f5;
}
.toggle-row.active {
  background: #efefef;
  font-weight: bold;
}
.toggle-text {
  font-size: 13px;
  color: #222;
}
/* oculto checkbox real */
.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
/* UI switch */
.toggle-ui {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d6d6d6;
  position: relative;
  flex: 0 0 auto;
  transition: background 0.15s ease;
}
.toggle-ui::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.toggle-row input:checked + .toggle-ui {
  background: #111;
}
.toggle-row input:checked + .toggle-ui::after {
  transform: translateX(16px);
}
.toggle-sep {
  height: 1px;
  background: #eee;
  margin: 6px 0;
}
/* Productos grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}
/* Card producto */
.product-card {
  position: relative;
  border: 1px solid #eee;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}
.product-card img {
  width: 190px;
  height: 190px;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
  max-width: 100%;
}
.badge-nuevo {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ff0000;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}
.product-info {
  margin: 10px 0;
  line-height: 1.35;
  text-align: center;
}
.product-cod {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 4px;
}
.product-name {
  font-size: 17px;
  font-weight: normal;
}
.product-info span {
  font-weight: bold;
}
.price-hidden {
  display: none;
}
.price-locked {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}
.add-btn {
  margin-top: 10px;
  padding: 10px 20px;
  background: black;
  color: white;
  border: none;
  cursor: pointer;
}
.add-btn.in-cart {
  background: #111;
  opacity: 0.95;
}
/* Qty panel */
.qty-panel {
  margin-top: 12px;
  border-top: 1px solid #eee;
  padding-top: 12px;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.qty-label {
  font-size: 13px;
  font-weight: bold;
  color: #222;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.qty-btn {
  width: 36px;
  height: 34px;
  border: none;
  background: #f6f6f6;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.qty-input {
  width: 54px;
  height: 34px;
  border: none;
  text-align: center;
  outline: none;
  font-size: 14px;
}
/* quitar flechas number */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: #444;
}
.qty-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.chip {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.chip:hover {
  background: #f5f5f5;
}
.qty-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.go-cart-btn {
  border: none;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.go-cart-btn:hover {
  opacity: 0.92;
}
.remove-btn {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.remove-btn:hover {
  background: #f5f5f5;
}
/* Sort row + botón filtros */
.sort-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 6px 0 14px;
}
.sort-label {
  font-size: 14px;
  color: #222;
}
.sort-select {
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.sort-select:focus {
  border-color: #111;
}
/* Filtros: botón visible en tablet/mobile */
.filters-btn {
  display: none;
}
@media (max-width: 1024px) {
  .filters-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #111;
    background: #fff;
    color: #111;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }
}
/* Overlay filtros (única implementación: bottom-sheet) */
.filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 9999;
}
.filters-overlay.open {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.filters-panel {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 14px 14px 18px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
  max-height: 86vh;
  overflow: auto;
}
.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.filters-title {
  font-size: 18px;
  font-weight: 800;
}
.filters-x {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
}
.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px 0 12px;
}
.mf-btn {
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  background: #fff;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.mf-btn.on {
  border-color: #111;
  background: #111;
  color: #fff;
}
.filters-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 10px;
}
.filters-apply {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: #111;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
/* Subtítulos de subcategoría (ÚNICA regla) */
.grid-subtitle {
  grid-column: 1 / -1;
  font-size: 22px;
  font-weight: 800;
  margin: 16px 0 8px;
  padding: 10px 6px 8px;
  border-bottom: 2px solid #e0e0e0;
  background: #fff;
}
/* ================= CARRITO ================= */
/* Separación título */
#carrito .section-title {
  margin-top: 34px;
  margin-bottom: 22px;
}
/* Selector entrega */
.ship-row {
  padding: 0 40px;
  margin: -18px 0 20px;
  display: flex;
  justify-content: center;
}
.ship-card {
  width: min(780px, 100%);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}
.ship-label {
  font-size: 12px;
  color: #444;
  font-weight: bold;
}
.ship-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}
.ship-select:focus {
  border-color: #111;
}
.ship-hint {
  font-size: 12px;
  color: #666;
}
/* Layout carrito */
.cart-layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 40px 10px;
  display: block;
}
/* botonera fija (desktop) */
.pay-card {
  position: fixed;
  left: 10px;
  top: 100px;
  width: 220px;
  z-index: 2500;
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
}
.pay-title {
  font-size: 12px;
  color: #444;
  margin-bottom: 10px;
  font-weight: bold;
}
/* select oculto */
#paymentSelect {
  position: absolute;
  left: -99999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.payment-buttons {
  display: grid;
  gap: 8px;
}
.pay-btn {
  width: 100%;
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  text-align: left;
}
.pay-btn:hover {
  background: #f6f6f6;
}
.pay-btn.active {
  border-color: #111;
  background: #efefef;
}
.pay-name {
  font-size: 13px;
  font-weight: bold;
  line-height: 1.1;
}
.pay-off {
  font-size: 12px;
  color: #444;
  margin-top: 2px;
}
.web-note {
  margin-top: 12px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}
.web-note-title {
  font-size: 12px;
  color: #444;
}
.web-note-value {
  font-size: 13px;
  margin-top: 4px;
}
/* Anchuras */
:root {
  --table-width: 780px;
  --totals-width: 400px;
}
/* tabla centrada */
.cart-column {
  display: flex !important;
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.cart-column #cart {
  width: var(--table-width) !important;
  max-width: 100%;
}
/* tabla */
.cart-table {
  table-layout: fixed !important;
  width: 100% !important;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  overflow: hidden;
}
.cart-table th,
.cart-table td {
  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
  white-space: nowrap;
}
.cart-table th {
  background: #fafafa;
  font-weight: bold;
}
.cart-table th:last-child,
.cart-table td:last-child {
  border-right: none;
}
.split-2line {
  display: inline-block;
  line-height: 1.05;
}
.cart-table td.desc {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* col widths */
.cart-table col.cod {
  width: 45px !important;
}
.cart-table col.desc {
  width: 200px !important;
}
.cart-table col.cajas {
  width: 80px !important;
}
.cart-table col.uni {
  width: 75px !important;
}
.cart-table col.tp {
  width: 85px !important;
}
.cart-table col.total {
  width: 85px !important;
}
/* Totales centrados */
.cart-total {
  width: 100%;
  margin: 8px 0 10px;
  padding: 0;
  display: flex !important;
  justify-content: center !important;
  box-sizing: border-box;
}
.cart-total .totals-inner {
  width: var(--totals-width) !important;
  max-width: 100%;
  box-sizing: border-box;
}
.totals-inner .totals-line {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #ddd;
}
.totals-inner .totals-line strong {
  text-align: right;
  white-space: nowrap;
}
.totals-divider {
  margin: 14px 0;
  border-top: 1px solid #eee;
}
.grand-total {
  text-align: center;
  margin: 16px 0 0;
}
/* Acciones */
.order-actions {
  width: min(var(--table-width), 100%);
  margin: 10px auto 18px !important;
  padding: 0 !important;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.order-status {
  min-height: 18px;
  font-size: 13px;
  color: #444;
  text-align: center;
}
.order-status.ok {
  color: #0a7a2f;
}
.order-status.err {
  color: #b00020;
}
.submit-order {
  padding: 12px 30px;
  background: #0b0b0b;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  width: 240px;
}
.submit-order:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.back {
  padding: 12px 30px;
  cursor: pointer;
  border-radius: 10px;
  width: 240px;
}
.back.back-outline {
  background: #fff !important;
  color: #111 !important;
  border: 1px solid #111 !important;
}
.back.back-outline:hover {
  background: #f5f5f5 !important;
}
#carrito {
  padding-bottom: 120px;
}
/* ================= FOOTER ================= */
.footer {
  background: #111;
  color: white;
  text-align: center;
  padding: 30px;
}
/* ================= MODAL LOGIN ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}
.modal.open {
  display: flex;
}
.modal-content {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #eee;
}
.modal-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}
.modal-body {
  padding: 18px;
  display: grid;
  gap: 10px;
}
.modal-body label {
  font-size: 13px;
  color: #444;
}
.modal-body input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.modal-submit {
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #000;
  color: #fff;
  cursor: pointer;
  margin-top: 6px;
}
.modal-error {
  color: #b00020;
  font-size: 13px;
}
.modal-hint {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}
.modal-cta {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}
/* ================= HAMBURGER MENU (mobile) ================= */
.hamburger {
  display: none;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
}
.mobile-menu {
  display: none;
  position: absolute;
  top: 74px;
  right: 12px;
  width: 240px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  z-index: 5000;
}
.mobile-menu.open {
  display: block;
}
.mobile-item {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.mobile-item:hover {
  background: #f5f5f5;
}
.mobile-item.danger {
  color: #b00020;
}
.mobile-sep {
  height: 1px;
  background: #eee;
}
/* ================= RESPONSIVE ================= */
/* Tablet/desktop chico: 2 por fila */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .product-card {
    padding: 14px;
  }
  .product-card img {
    width: 90%;
    height: auto;
  }
  .products-layout {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }
  .category-title {
    margin: 40px 12px 18px;
  }
  /* Sidebar NO visible en mobile (usás botón filtros) */
  .categories-sidebar {
    display: none !important;
  }
  /* Header mobile: logo centrado, hamburguesa a la derecha */
  .header {
    padding: 12px 12px;
    justify-content: center;
  }
  .logo {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 5;
  }
  .logo-img {
    height: 46px;
  }
  #hamburgerBtn {
    display: inline-flex !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
  }
  /* ocultar nav-center/nav-right en mobile */
  .nav-center {
    display: none !important;
  }
  .nav-right {
    display: none !important;
  }
  /* Cart: botonera deja de ser fixed */
  .pay-card {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    margin: 0 16px 12px;
  }
  .cart-layout {
    padding: 0 16px 10px;
  }
  .cart-column {
    display: block !important;
  }
  #cart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cart-table {
    min-width: 560px;
  }
  .cart-table th,
  .cart-table td {
    padding: 7px 8px;
    font-size: 12px;
  }
  .cart-total {
    padding: 0 16px !important;
  }
  .cart-total .totals-inner {
    width: 100% !important;
  }
  .totals-inner .totals-line {
    grid-template-columns: 1fr 120px;
    gap: 10px;
  }
  .totals-inner .totals-line span {
    min-width: 0;
    white-space: normal;
  }
  .ship-row {
    padding: 0 16px;
  }
}
/* Desktop: ocultar hamburger/menu */
@media (min-width: 901px) {
  #mobileMenu {
    display: none !important;
  }
  #hamburgerBtn {
    display: none !important;
  }
}
/* ===== Botón "Quiero ser cliente" (genérico, incluye el del MODAL) ===== */
.btn-quiero-cliente {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  border: 1px solid #e6e6e6;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 36px;
  box-sizing: border-box;
}
.btn-quiero-cliente:hover {
  background: #f5f5f5;
}
/* En el modal: que sea "cuadrado" y full width */
.modal-cta {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  line-height: 44px;
  margin-top: 10px;
}
/* ========================= MOBILE TOOLBAR (solo <=900px) Reemplaza "Ordenar por" + "Filtros" actuales por: [buscador (50%)] [Filtros][Ordenar] (50%) ========================= */
/* Por defecto (desktop) NO se ve */
.mobile-toolbar {
  display: none;
}
@media (max-width: 900px) {
  /* 1) Mostrar el toolbar mobile */
  .mobile-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* mitad izquierda / mitad derecha */
    gap: 10px;
    width: 100%;
    padding: 0 12px;
    /* mismo padding mobile que venís usando */
    margin: 6px 0 14px;
    align-items: center;
  }
  /* 2) Buscador mobile: ocupa el ancho de 1 columna (mitad izquierda) */
  .mobile-search {
    height: 44px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #111;
    padding: 0 12px;
    outline: none;
    font-size: 14px;
  }
  .mobile-search:focus {
    border-color: #111;
  }
  /* 3) Mitad derecha: dos botones mismo ancho */
  .mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Filtros / Ordenar mismo ancho */
    gap: 10px;
    width: 100%;
  }
  .mtool-btn {
    height: 44px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #c7c7c7;
    background: #fff;
    color: #000000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
  }
  .mtool-btn:hover {
    background: #f5f5f5;
  }
  /* Iconos (sin tocar desktop) */
  .mtool-btn::before {
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
  /* ícono filtro (funnel) */
  .mtool-filters::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18'%3E%3C/path%3E%3Cpath d='M6 12h12'%3E%3C/path%3E%3Cpath d='M10 19h4'%3E%3C/path%3E%3C/svg%3E");
  }
  /* ícono ordenar (arrows) */
  .mtool-sort::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5h10'%3E%3C/path%3E%3Cpath d='M11 9h7'%3E%3C/path%3E%3Cpath d='M11 13h10'%3E%3C/path%3E%3Cpath d='M11 17h7'%3E%3C/path%3E%3Cpath d='M3 7l2-2 2 2'%3E%3C/path%3E%3Cpath d='M5 5v14'%3E%3C/path%3E%3Cpath d='M7 17l-2 2-2-2'%3E%3C/path%3E%3C/svg%3E");
  }
  /* 4) Ocultar los controles viejos SOLO EN MOBILE */
  .sort-row .sort-label {
    display: none !important;
  }
  .sort-row .filters-btn {
    display: none !important;
  }
}
@media (max-width: 900px) {
  /* NO lo escondas con display:none: el select debe existir para abrir el picker */
  .sort-row .sort-wrap {
    position: fixed !important;
    left: -9999px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  /* el select sigue vivo */
  #sortSelect {
    pointer-events: auto !important;
  }
}
@media (max-width: 900px) {
  .mtool-sort-wrap {
    position: relative;
    width: 100%;
  }
  /* el "botón" visual */
  .mtool-sort-wrap .mtool-btn {
    width: 100%;
  }
  /* el select REAL encima, invisible pero tocable */
  .mtool-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 44px;
    opacity: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
  }
}
/* ========================= MOBILE: reemplazo hamburguesa por iconos (solo <=900px) ========================= */
.mobile-icons {
  display: none;
}
@media (max-width: 900px) {
  /* 1) NO hamburguesa ni menú mobile */
  #hamburgerBtn {
    display: none !important;
  }
  #mobileMenu {
    display: none !important;
  }
  /* 2) Mostrar iconos en el header (derecha) */
  .mobile-icons {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
  }
  .micon-btn {
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .micon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
  }
  /* Carrito mobile */
  .micon-cart-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }
  .micon-cart-text {
    font-size: 13px;
    font-weight: 800;
  }
  /* contador */
  #mobileCartCount {
    font-weight: 800;
  }
  /* Avatar (reusa tu .profile-avatar) */
  .micon-profile .profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.35);
  }
  /* Dropdown usuario: anclado a la derecha en mobile */
  #userMenu {
    right: 12px !important;
    top: 74px !important;
    /* debajo del header */
  }
  .user-menu-sep {
    height: 1px;
    background: #e9e9e9;
    margin: 6px 0;
  }
  .user-menu-item.danger {
    color: #b00020;
    font-weight: 800;
  }
}
/* ========================= MOBILE: carrito solo icono + contador ========================= */
@media (max-width: 900px) {
  /* ocultar texto "Pedido" */
  .micon-cart-text {
    display: none !important;
  }
  /* ajustar espacio para que quede compacto */
  .micon-cart {
    gap: 4px;
    padding: 6px;
  }
  /* número un poco más visible */
  #mobileCartCount {
    font-size: 13px;
    font-weight: 800;
  }
}
@media (max-width: 900px) {
  .mobile-user-menu {
    position: fixed !important;
    top: 86px !important;
    /* debajo del header (tu header mide 86px) */
    right: 12px !important;
    left: auto !important;
    z-index: 9999 !important;
    display: none;
    /* se abre con .open */
  }
  .mobile-user-menu.open {
    display: block !important;
  }
}
/* ========================= MOBILE: logo alineado a la izquierda ========================= */
@media (max-width: 900px) {
  /* Header como contenedor relativo */
  .header {
    justify-content: flex-start !important;
  }
  /* Logo a la izquierda */
  .logo {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }
  .logo-img {
    height: 46px !important;
    /* mantiene proporción mobile */
  }
}
/* Placeholder para contenteditable */
.mobile-search-ce:empty:before {
  content: attr(data-placeholder);
  color: #888;
}
.mobile-search-ce {
  outline: none;
  white-space: nowrap;
  overflow: hidden;
}
/* ========================= MOBILE: buscador contenteditable prolijo ========================= */
@media (max-width: 900px) {
  .mobile-search-ce {
    height: 44px;
    /* mismo alto que botones */
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
    display: flex;
    align-items: center;
    /* ✅ centra vertical */
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    outline: none;
    cursor: text;
  }
  /* placeholder cuando está vacío */
  .mobile-search-ce:empty::before {
    content: attr(data-placeholder);
    color: #888;
    pointer-events: none;
  }
  /* cuando tiene texto */
  .mobile-search-ce:not(:empty) {
    color: #111;
  }
  /* foco */
  .mobile-search-ce:focus {
    border-color: #111;
  }
}
/* ========================= CARD CARTBAR — FINAL LIMPIO (mobile/tablet + desktop) ========================= */
/* Contenedor barra inferior */
.card-cartbar {
  margin-top: 10px;
  border-top: 1px solid #eee;
  padding-top: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
}
/* TOP: "Cajas" + Subtotal */
.cartbar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.cartbar-label {
  font-size: 13px;
  font-weight: 800;
  color: #222;
  white-space: nowrap;
}
.cartbar-subtotal {
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
}
.cartbar-subt {
  font-weight: 800;
}
.cartbar-subv {
  font-weight: 900;
}
.cartbar-iva {
  font-size: 12px;
  color: #666;
  font-weight: 700;
  margin-left: 4px;
}
/* CONTROLS: contiene el bloque izquierdo (stepper + chip) */
.cartbar-controls {
  min-width: 0;
}
/* Grupo izquierdo: Stepper + +5 */
.cartbar-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* Stepper */
.cartbar-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.step-btn {
  width: 44px;
  height: 40px;
  border: none;
  background: #f6f6f6;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.step-input {
  width: 64px;
  height: 40px;
  border: none;
  outline: none;
  background: #fff;
  text-align: center;
  font-size: 16px;
}
/* Quitar flechas del input number */
.step-input::-webkit-outer-spin-button,
.step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.step-input {
  -moz-appearance: textfield;
  appearance: textfield;
}
/* Chip +5 (desktop) */
.chip-5 {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Unidades */
.cartbar-units {
  font-size: 12px;
  color: #444;
}
/* Quitar */
.remove-compact {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* ========================= MOBILE/TABLET (<=1024) Orden: Subtotal -> Stepper -> Unidades -> Quitar +5 oculto ========================= */
@media (max-width: 1024px) {
  /* Subtotal pasa a la izquierda si hace falta */
  .cartbar-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .cartbar-subtotal {
    text-align: left;
  }
  /* Stepper ocupa todo el ancho */
  .cartbar-left {
    width: 100%;
  }
  .cartbar-stepper {
    width: 100%;
    justify-content: space-between;
  }
  /* Ocultar +5 */
  .chip-5 {
    display: none;
  }
  /* Quitar al final full width */
  .remove-compact {
    width: 100%;
  }
}
/* ========================= DESKTOP (>=1025) Layout: Stepper+5 | Subtotal (2 líneas) | Quitar Unidades abajo ========================= */
@media (min-width: 1025px) {
  .card-cartbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px max-content;
    grid-template-areas: "controls subtotal remove" "units units units";
    column-gap: 14px;
    row-gap: 6px;
    align-items: center;
  }
  .cartbar-controls {
    grid-area: controls;
  }
  .cartbar-top {
    grid-area: subtotal;
    display: flex;
    flex-direction: column;
    /* 2 líneas */
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
  }
  .cartbar-units {
    grid-area: units;
  }
  /* Quitar a la derecha, dentro del grid */
  .remove-compact {
    grid-area: remove;
    justify-self: end;
    width: auto;
  }
  /* Stepper un poco más ancho en desktop */
  .step-btn {
    width: 50px;
    height: 38px;
  }
  .step-input {
    width: 70px;
    height: 38px;
    font-size: 15px;
  }
  .chip-5 {
    height: 38px;
  }
  .remove-compact {
    height: 38px;
  }
}
/* ========================================================= DESKTOP FIX — Card cartbar estable (como la imagen) - Nada se encima - Nada se sale de la card - Si falta espacio, achica (fonts/sizes) en vez de desbordar ========================================================= */
@media (min-width: 1025px) {
  /* 0) Regla base anti-overflow (clave en grids/flex) */
  .product-card,
  .product-card * {
    box-sizing: border-box;
    min-width: 0;
  }
  /* 1) Evitar “teletransportes” por CSS viejo SOLO dentro del cartbar */
  .product-card .card-cartbar,
  .product-card .card-cartbar * {
    position: static;
    float: none;
    clear: none;
    transform: none;
  }
  /* 2) Barra inferior como grilla segura: fila 1: "Cajas" fila 2: stepper+5 | subtotal | quitar fila 3: unidades */
  .product-card .card-cartbar {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 8px;
    display: grid;
    grid-template-columns: max-content minmax(160px, 1fr) max-content;
    grid-template-areas: "label label label" "left subtotal remove" "units units units";
    column-gap: 14px;
    row-gap: 6px;
    align-items: center;
    width: 100%;
    max-width: 100%;
  }
  /* 3) Áreas (esto coincide con tu CSS histórico: cartbar-label/cartbar-controls/cartbar-top/remove-compact/cartbar-units) */
  .product-card .card-cartbar > .cartbar-label {
    grid-area: label;
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #222;
    text-align: left;
    white-space: nowrap;
  }
  .product-card .card-cartbar > .cartbar-controls {
    grid-area: left;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
    /* evita invadir el subtotal */
  }
  /* stepper + +5 pegados */
  .product-card .card-cartbar .cartbar-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    min-width: 0;
  }
  .product-card .card-cartbar .cartbar-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
  }
  /* 4) Tamaños “seguros” (siempre entra). Si tu card es angosta, esto evita desborde */
  .product-card .card-cartbar .step-btn {
    width: 44px;
    height: 36px;
    border: none;
    background: #f6f6f6;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    flex: 0 0 auto;
  }
  .product-card .card-cartbar .step-input {
    width: 56px;
    height: 36px;
    border: none;
    outline: none;
    background: #fff;
    text-align: center;
    font-size: 14px;
    flex: 0 0 auto;
  }
  /* sin flechas number */
  .product-card .card-cartbar .step-input::-webkit-outer-spin-button,
  .product-card .card-cartbar .step-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .product-card .card-cartbar .step-input {
    -moz-appearance: textfield;
    appearance: textfield;
  }
  .product-card .card-cartbar .chip-5 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  /* 5) Subtotal al centro en 2 líneas (como imagen) */
  .product-card .card-cartbar > .cartbar-top,
  .product-card .card-cartbar > .cartbar-mid {
    grid-area: subtotal;
    justify-self: center;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.1;
    text-align: center;
  }
  .product-card .card-cartbar .cartbar-subtotal {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    font-size: 13px;
  }
  .product-card .card-cartbar .cartbar-iva {
    font-size: 12px;
    color: #666;
    font-weight: 700;
  }
  /* 6) Quitar a la derecha SIEMPRE adentro */
  .product-card .card-cartbar > .remove-compact,
  .product-card .card-cartbar > button.remove-compact,
  .product-card .card-cartbar > button.remove-btn.remove-compact {
    grid-area: remove;
    justify-self: end;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    white-space: nowrap;
    max-width: 100%;
  }
  /* 7) Unidades abajo */
  .product-card .card-cartbar > .cartbar-units {
    grid-area: units;
    font-size: 12px;
    color: #444;
    text-align: left;
    margin: 0;
  }
  /* 8) Desktop angosto: oculto +5 antes de que se rompa todo */
  @media (max-width: 1220px) {
    .product-card .card-cartbar .chip-5 {
      display: none;
    }
  }
}
/* ========================================================= DESKTOP PATCH — Card header + botón Quitar adentro Pegar AL FINAL del styles.css ========================================================= */
@media (min-width: 1025px) {
  /* ---------- 1) Quitar SIEMPRE dentro de la card ---------- */
  /* Ancla para que nada “salte” afuera */
  .product-card {
    position: relative;
    overflow: hidden;
    /* si algo se iba afuera, lo recorta dentro */
  }
  /* Si el botón "Quitar" quedó con position/transform por CSS viejo, lo neutralizo */
  .product-card .remove-compact,
  .product-card button.remove-compact,
  .product-card button.remove-btn.remove-compact {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    max-width: 100%;
    white-space: nowrap;
  }
  /* Si tu cartbar usa grid (como te dejé), lo encajo en el área "remove" */
  .product-card .card-cartbar > .remove-compact,
  .product-card .card-cartbar > button.remove-compact,
  .product-card .card-cartbar > button.remove-btn.remove-compact {
    grid-area: remove !important;
    justify-self: end !important;
    align-self: center !important;
  }
  /* ---------- 2) Cod + UxB en la misma línea ---------- */
  .product-card .card-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 14px;
    flex-wrap: nowrap;
    /* no se apilan */
  }
  /* ---------- 3) Cod más grande y bold ---------- */
  .product-card .card-cod {
    font-weight: 700;
    font-size: 20px;
    /* ajustable */
    line-height: 1.1;
    white-space: nowrap;
  }
  .product-card .card-cod span {
    font-weight: 700;
  }
  /* ---------- 4) Número de UxB en bold ---------- */
  .product-card .card-uxb {
    font-size: 16px;
    color: #333;
    white-space: nowrap;
  }
  .product-card .card-uxb span {
    font-weight: 900;
    /* solo el número */
  }
}
/* ========================================================= DESKTOP AJUSTE — sin botón Quitar + label "Cajas" ========================================================= */
@media (min-width: 1025px) {
  /* 1️⃣ Ocultar botón Quitar en desktop */
  .product-card .remove-compact,
  .product-card button.remove-compact,
  .product-card button.remove-btn.remove-compact {
    display: none !important;
  }
  /* 2️⃣ Agregar "Cajas" arriba del stepper */
  .product-card .card-cartbar .cartbar-controls {
    position: relative;
    padding-top: 14px;
    /* espacio para el texto arriba */
  }
  .product-card .card-cartbar .cartbar-controls::before {
    content: "Cajas";
    position: absolute;
    top: 0;
    left: 0;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    line-height: 1;
  }
  /* Alinear mejor el stepper ahora que tiene label arriba */
  .product-card .card-cartbar .cartbar-left {
    align-items: center;
  }
}
@media (min-width: 1025px) {
  #productsContainer .product-card img {
    max-height: 250px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    height: auto !important;
    width: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }
}
/* ========================================================= ESPACIADO VERTICAL ENTRE BLOQUES DE TEXTO DE LA CARD Cod/UxB → Descripción → Precio Lista → Tu Precio ========================================================= */
/* Contenedor superior de info */
.product-card .card-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* 🔹 espacio general entre renglones */
}
/* Fila Cod + UxB */
.product-card .card-row {
  margin-bottom: 2px;
}
/* Descripción */
.product-card .card-desc {
  margin: 4px 0;
  line-height: 1.25;
  /* mejora legibilidad sin agrandar */
}
/* Bloque de precios */
.product-card .card-prices {
  margin-top: 4px;
  gap: 4px;
  /* espacio entre Precio Lista y Tu Precio */
}
/* Cada línea de precio */
.product-card .card-price-line {
  margin: 2px 0;
}

/* ========================= DESKTOP SORT BUTTONS ========================= */
.desktop-sort-buttons {
  display: none;
}

@media (min-width: 901px) {
  /* En desktop: oculto el select y muestro botones */
  .sort-row .sort-wrap {
    display: none !important;
  }

  .desktop-sort-buttons {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .desktop-sort-buttons .ds-btn {
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  .desktop-sort-buttons .ds-btn:hover {
    background: #f5f5f5;
  }

  .desktop-sort-buttons .ds-btn.active {
    border-color: #111;
    background: #111;
    color: #fff;
    font-weight: 800;
  }
}

/* ========================= PAGO 2 FILAS + 1 ========================= */
.pay-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
}

/* Las primeras 6 opciones ocupan automáticamente
   2 filas (3 columnas x 2 filas) */

.pay-grid .pay-later {
  grid-column: 1 / -1; /* tercera fila completa */
}

/* Las primeras 6 opciones ocupan automáticamente
   2 filas (3 columnas x 2 filas) */

.pay-grid .pay-later {
  grid-column: 1 / -1; /* tercera fila completa */
}

/* En pantallas más chicas, que baje a 2 columnas */
@media (max-width: 901px) {
  .pay-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pay-grid .pay-later {
    grid-column: 1 / -1;
  }
}

/* Ya no existe columna izquierda */
.pay-column {
  display: none !important;
}

/* El select sigue oculto (tu regla actual sirve); la reforzamos */
#paymentSelect {
  position: absolute;
  left: -99999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ========================= PAGO: 6 ARRIBA + 1 ABAJO (DESKTOP) ========================= */
@media (min-width: 901px) {
  .pay-grid {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(
      6,
      minmax(0, 1fr)
    ) !important; /* 6 en una fila */
    align-items: stretch;
  }

  /* “Prefiero decidir después” en segunda fila full width */
  .pay-grid .pay-later {
    grid-column: 1 / -1 !important;
  }

  /* Para que entren cómodos 6 botones en desktop */
  .pay-grid .pay-btn {
    padding: 8px 8px !important;
  }
  .pay-grid .pay-name {
    font-size: 12px !important;
  }
  .pay-grid .pay-off {
    font-size: 11px !important;
  }
}

/* Mobile sigue como estaba (2 columnas) */
@media (max-width: 900px) {
  .pay-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .pay-grid .pay-later {
    grid-column: 1 / -1 !important;
  }
}

.profile-wrap {
  padding: 0 40px 40px;
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}

.profile-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px;
}

.profile-card-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.profile-box {
  font-size: 14px;
  color: #333;
}

.profile-btn {
  margin-top: 12px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  padding: 0 14px;
}

.profile-btn.danger {
  background: #b00020;
  border-color: #b00020;
}

.profile-form {
  display: grid;
  gap: 10px;
}

.profile-form input {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 0 12px;
  outline: none;
}

.profile-status {
  margin-top: 10px;
  font-size: 13px;
  color: #444;
}

/* ===== DESKTOP SORT BUTTONS ===== */
.desktop-sort-buttons {
  display: none;
  gap: 10px;
  align-items: center;
}

.ds-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.ds-btn:hover {
  background: #f5f5f5;
}
.ds-btn.active {
  border-color: #111;
  background: #111;
  color: #fff;
  font-weight: 700;
}

@media (min-width: 901px) {
  .desktop-sort-buttons {
    display: inline-flex;
  }
  /* opcional: ocultar el select en desktop si querés que queden SOLO botones */
  .sort-row .sort-wrap {
    display: none;
  }
}

/* Método de pago debajo de Dirección */
.pay-row {
  margin-top: 14px;
}

.pay-row .pay-card {
  width: 100%;
}

/* El carrito también a ancho completo */
.cart-column {
  margin-top: 14px;
}

.payment-buttons.payment-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.pay-btn-full {
  width: 100%;
  margin-top: 10px;
}

#paymentSelect {
  display: none; /* lo ocultamos, lo usamos como “valor real” */
}

/* si en pantallas chicas no entran 6, bajan a 3x2 */
@media (max-width: 900px) {
  .payment-buttons.payment-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Carrito en una sola columna (evita que "pago" quede al costado) */
.cart-layout.cart-layout-single {
  display: block !important;
}

/* ===============================
   CHECKOUT: 1 columna centrada
   =============================== */

/* Evita que el layout viejo arme sidebar aunque exista */
#carrito .cart-layout {
  grid-template-columns: 1fr !important;
}
#carrito .cart-layout .pay-column {
  display: none !important;
}

/* Entrega y Pago: mismo ancho y centrados */
#carrito .ship-row {
  max-width: 760px;
  margin: 0 auto 14px;
}
#carrito .ship-card {
  width: 100%;
}

/* Carrito (lista de items) centrado y mismo ancho */
#carrito .cart-layout-single {
  max-width: 760px;
  margin: 0 auto;
  display: block !important;
}

/* ===============================
   Pago: 6 botones iguales en 1 fila
   =============================== */
#carrito .payment-buttons.payment-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

#carrito .payment-buttons.payment-6 .pay-btn {
  width: 100%;
  padding: 10px 8px;
  border-radius: 12px;
}

/* Botón “prefiero no decidir ahora” ancho completo */
#carrito .pay-btn-full {
  width: 100%;
  margin-top: 10px;
  border-radius: 12px;
}

/* Ocultar el select (pero queda para JS) */
#carrito #paymentSelect {
  display: none !important;
}

/* =========================================================
   CHECKOUT (#carrito): Pago debajo de Dirección (NO sidebar)
   PEGAR AL FINAL DEL CSS
   ========================================================= */

#carrito .pay-card {
  /* pisa el sidebar fijo */
  position: static !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;

  /* mismo look/ancho que ship-card */
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}

/* Contenedor (Dirección y Pago) centrado y mismo ancho */
#carrito .ship-row {
  padding: 0 40px;
  margin: 0 auto 14px !important;
  display: flex;
  justify-content: center;
}

#carrito .ship-card {
  width: min(780px, 100%) !important;
}

/* Pago: 6 botones en 1 fila (desktop), 3x2 (mobile) */
#carrito .payment-buttons.payment-6 {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 900px) {
  #carrito .payment-buttons.payment-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Botón "Prefiero no decidir ahora" a lo ancho */
#carrito .pay-btn-full {
  width: 100% !important;
  margin-top: 10px !important;
}

/* Ocultar select real (queda para el JS) */
#carrito #paymentSelect {
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.pay-btn.selected,
#payLaterBtn.selected {
  outline: 2px solid #111;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.submit-order.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* =========================
   CARRITO / PAGO NUNCA TAPAN EL NAV
   ========================= */
#carrito,
.ship-row,
.ship-card,
.pay-card,
.payment-buttons,
.payment-buttons * {
  position: relative;
  z-index: 1;
}

/* Si tenés algún overlay (filtros), que sí pueda tapar el nav: */
.filters-overlay {
  z-index: 10000; /* o 20000 si querés estar seguro */
}

/* =========================
   PERFIL (nuevo layout)
   ========================= */

.profile-summary {
  max-width: 760px; /* mismo espíritu que el carrito */
  margin: 0 auto 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}

.profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.profile-row:last-child {
  border-bottom: none;
}

.pf-pass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-card.wide {
  max-width: 760px; /* alineado al carrito */
  margin: 0 auto 16px;
}

.profile-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.profile-btn.subtle {
  background: #f4f4f4;
  color: #111;
  border: 1px solid var(--border);
}

.profile-bottom {
  max-width: 760px;
  margin: 18px auto 0;
  display: flex;
  justify-content: center;
}

.profile-btn.big {
  padding: 14px 18px;
  width: min(520px, 100%);
}

/* Modal (cambiar contraseña) */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-card {
  position: relative;
  max-width: 520px;
  margin: 10vh auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 16px;
}

.modal-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Mobile */
@media (max-width: 720px) {
  .profile-row {
    grid-template-columns: 1fr;
  }
  .pf-pass {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-card.wide,
  .profile-summary,
  .profile-bottom {
    max-width: 100%;
  }
}

.section-header {
  position: relative;
  margin-bottom: 16px;
}

.section-header .back-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.section-header .section-title {
  text-align: center;
}

.back-btn {
  background: #f5f5f5;
  border: 1px solid #e2e2e2;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: translateY(-1px);
}

/* =========================
   ESPACIADO PERFIL / CARRITO
   ========================= */

/* más espacio debajo del header */
.section-header {
  margin-bottom: 28px;
}

/* espacio entre bloques principales */
.profile-summary,
.profile-card.wide,
.profile-bottom {
  margin-bottom: 28px;
}

/* más padding interno en cards */
.profile-card {
  padding: 18px;
}

/* más aire dentro del resumen */
.profile-summary {
  padding: 20px;
}

/* espacio entre filas de datos */
.profile-row {
  padding: 12px 0;
}

/* carrito: aire debajo del header también */
#carrito .section-header {
  margin-bottom: 28px;
}

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.order-row:last-child {
  border-bottom: none;
}

.order-date {
  font-weight: 600;
}

.order-total {
  color: var(--muted);
  font-size: 14px;
}

.profile-btn.small {
  padding: 6px 10px;
  font-size: 13px;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  gap: 10px;
}

.order-col {
  display: flex;
  align-items: center;
  font-size: 16px;
}

.order-date {
  font-weight: 600;
}

.order-total {
  justify-content: center;
  font-weight: 600;
  font-size: 17px;
}

.order-action {
  justify-content: flex-end;
}

.profile-btn.small {
  padding: 8px 14px;
  font-size: 14px;
}

.order-total {
  color: #111;
}

/* Más aire arriba en Perfil y Carrito */
#perfil,
#carrito {
  padding-top: 40px;
}

.iva-tag {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  margin-left: 6px;
  white-space: nowrap;
}

/* =========================
   BLOQUE COMING SOON PREMIUM
   ========================= */

.profile-coming {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid #e8e8e8;
}

.coming-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #111;
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  margin-left: 10px;
  letter-spacing: 0.5px;
}

.coming-content {
  text-align: center;
  padding: 36px 20px 40px;
  color: #666;
}

.coming-icon {
  font-size: 34px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.coming-text {
  max-width: 480px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.5;
}

/* =========================
   NAV CATEGORÍAS (Mega menu)
   ========================= */

.dropdown-wrap {
  position: relative; /* necesario para posicionar el menú */
}

#categoriesMenu.dropdown-menu {
  position: absolute;
  left: 50%;
  translate: -50% 0; /* ✅ centra sin usar transform */
  top: calc(100% + 10px);
  width: min(980px, 90vw);
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  padding: 18px 18px;
  z-index: 9999;
}

/* Si tu menú se llena con labels/checkboxes, los convertimos en grilla */
#categoriesMenu.dropdown-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 22px;
}

/* Item genérico: label, div o a dentro del menú */
#categoriesMenu.dropdown-menu label,
#categoriesMenu.dropdown-menu a,
#categoriesMenu.dropdown-menu .cat-item,
#categoriesMenu.dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
  user-select: none;
}

/* Hover lindo */
#categoriesMenu.dropdown-menu label:hover,
#categoriesMenu.dropdown-menu a:hover,
#categoriesMenu.dropdown-menu .cat-item:hover,
#categoriesMenu.dropdown-menu .dropdown-item:hover {
  background: #f6f6f6;
  transform: translateX(3px);
}

/* Checkbox prolijo */
#categoriesMenu.dropdown-menu input[type="checkbox"] {
  accent-color: #111;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1100px) {
  #categoriesMenu.dropdown-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(780px, 92vw);
  }
}
@media (max-width: 720px) {
  #categoriesMenu.dropdown-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(520px, 94vw);
    padding: 14px;
  }
}

/* =========================
   DROPDOWN CATEGORÍAS (MEGA)
   ========================= */

.dropdown-wrap {
  position: relative;
}

#categoriesMenu.dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: min(980px, 92vw);
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  padding: 16px 16px 18px;
  z-index: 9999;
}

/* Separador */
#categoriesMenu .dd-sep {
  height: 1px;
  background: #eee;
  margin: 12px 0 14px;
}

/* Toggle "Todos los artículos" */
#categoriesMenu .dd-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f6f6;
  border: 1px solid #ededed;
  font-weight: 700;
}

/* ✅ La grilla real de categorías */
#categoriesMenu .dd-cats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 18px; /* más espacio entre palabras */
}

/* Cada chip */
#categoriesMenu label.dd-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease;
  user-select: none;
}

#categoriesMenu label.dd-chip:hover {
  background: #f6f6f6;
  border-color: #e3e3e3;
  transform: translateY(-1px);
}

#categoriesMenu label.dd-chip span {
  font-size: 14px;
  line-height: 1.2;
}

/* Checkbox prolijo */
#categoriesMenu label.dd-chip input[type="checkbox"] {
  accent-color: #111;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1100px) {
  #categoriesMenu.dropdown-menu {
    width: min(820px, 94vw);
  }
  #categoriesMenu .dd-cats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  #categoriesMenu.dropdown-menu {
    width: min(520px, 96vw);
    padding: 12px;
  }
  #categoriesMenu .dd-cats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }
}

/* FIX: evitar chips encimados en categorías */
#categoriesMenu .dd-cats-grid {
  display: grid !important;
  grid-template-columns: repeat(
    5,
    minmax(160px, 1fr)
  ) !important; /* ancho mínimo real */
  gap: 12px 18px !important;
  align-items: stretch !important;
}

#categoriesMenu label.dd-chip {
  position: static !important;
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  white-space: normal !important; /* permite salto de línea */
  overflow: hidden !important;
}

#categoriesMenu label.dd-chip span {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important; /* evita montado */
  line-height: 1.2 !important;
}

#categoriesMenu label.dd-chip input[type="checkbox"] {
  flex: 0 0 auto !important;
  margin-left: 10px !important;
}

/* Responsive */
@media (max-width: 1100px) {
  #categoriesMenu .dd-cats-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
  }
}
@media (max-width: 720px) {
  #categoriesMenu .dd-cats-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
  }
}

#categoriesMenu {
  display: none;
}

#categoriesMenu.open {
  display: block;
}

/* CATEGORÍAS: abrir/cerrar robusto (sin display:none) */
#categoriesMenu.dropdown-menu {
  display: block !important; /* siempre en el flujo del layout */
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(6px) !important;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}

#categoriesMenu.dropdown-menu.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* =========================
   USER TRIGGER (Hola + avatar + flecha)
   ========================= */

.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  background: rgba(0, 0, 0, 0.06); /* un poco más oscuro que el nav */
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 8px 12px;

  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease;
}

.user-trigger:hover {
  background: rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.user-trigger .profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.user-trigger-text {
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.user-trigger-chev {
  font-size: 12px;
  opacity: 0.7;
}

.user-menu.open + .user-trigger-chev {
  opacity: 1;
} /* opcional */

/* Botón combinado usuario (Hola + avatar + flecha) */
.user-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;

  background: #111; /* oscuro */
  color: #fff; /* letras blancas */
  border: 1px solid #000;
  padding: 8px 14px;
  border-radius: 999px;

  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.user-toggle-btn:hover {
  background: #222; /* leve aclarado al hover */
  transform: translateY(-1px);
}

.user-toggle-text {
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}

.user-toggle-caret {
  font-size: 12px;
  opacity: 0.9;
  color: #fff;
}

.user-toggle-btn .profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4); /* aro blanco elegante */
}

/* =========================
   USER MENU: show/hide real
   ========================= */

#userMenu.user-menu {
  position: absolute; /* desktop */
  top: calc(100% + 10px);
  right: 0;

  min-width: 220px;
  background: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  padding: 8px;

  /* cerrado por defecto */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 9999;
}

/* abierto */
#userMenu.user-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* items */
#userMenu .user-menu-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

#userMenu .user-menu-item:hover {
  background: #f6f6f6;
}

/* mobile override (tu regla) */
@media (max-width: 720px) {
  #userMenu.user-menu {
    right: 12px !important;
    top: 74px !important;
  }
}

/* =========================
   PERFIL - NUEVA DISPOSICIÓN
   ========================= */

/* =========================
   PERFIL - CENTRADO PROLIJO
   ========================= */

.profile-summary {
  padding: 34px 28px;
  margin-bottom: 30px;
  text-align: center;
}

.profile-ra {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
}

.profile-row.two {
  display: flex;
  justify-content: center;
  gap: 28px; /* separación prudente */
  margin-bottom: 14px;
  font-size: 14px;
}

.profile-row.two div {
  display: flex;
  gap: 6px;
  align-items: center;
}

.profile-pass-wrap {
  margin-top: 22px;
}

/* Botón filtro NUEVOS (desktop) */
.ds-btn.ds-filter {
  margin-left: 10px;
  border: 1px solid #e2e2e2;
  background: #fff;
}

.ds-btn.ds-filter.on {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ===== PASS MODAL (perfil) ===== */
.modal .modal-backdrop {
  position: absolute;
  inset: 0;
}

.modal .modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  z-index: 1;
  padding: 18px;
}

.modal .modal-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal .modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* =========================
   ANIMACIÓN "VOLAR AL CARRITO"
   ========================= */
.fly-to-cart {
  position: fixed;
  z-index: 30000;
  pointer-events: none;
  will-change: transform, opacity;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  transition:
    transform 650ms cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 650ms ease;
}

/* =========================
   TOAST "VER PEDIDO"
   ========================= */
.view-order-toast {
  position: fixed;
  right: 14px;
  z-index: 35000;
  display: none;
}

.view-order-toast.show {
  display: block;
}

.view-order-btn {
  height: 54px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid #b10000;
  background: #e60000;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.35),
    0 18px 50px rgba(0, 0, 0, 0.22);
  animation: toastPop 0.18s ease-out;
}

.view-order-btn:hover {
  transform: translateY(-1px) scale(1.01);
}
.view-order-btn:active {
  transform: translateY(0) scale(0.99);
}

@keyframes toastPop {
  from {
    transform: translateY(-6px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (min-width: 1024px) {
  #carrito {
    --cart-scale: 1.25;
    font-size: calc(1rem * var(--cart-scale));
  }
}

@media (min-width: 1024px) {
  #carrito {
    zoom: 1.25;
  }
}

#btnFilterNew {
  font-weight: 800;
  font-size: medium;
  border-width: 3px;
  border-color: #e60000;
}

.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ================= FOOTER / CONTACTO ================= */

/* ================================
   FOOTER
================================ */

.main-footer {
  background: #212122;
  color: #fff;
  padding: 50px 0;
}

/* Container interno con aire lateral */
.main-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px; /* 👈 espacio lateral */
}

/* Grid principal */
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

/* Marca */
.footer-brand {
  max-width: 420px;
}

.footer-logo {
  width: 180px;
  margin-bottom: 15px;
}

.footer-brand p {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
}

/* Contacto */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #fff;
}

.footer-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Footer inferior */
.footer-bottom {
  margin-top: 35px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: #aaa;
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-link {
  color: #ddd;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 2px;
  transition: 0.2s ease;
}

.footer-link:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

/* Responsive */
@media (max-width: 900px) {
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }

  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* =========================
   PERFIL - TAMAÑOS MÁS GRANDES
   (PEGAR AL FINAL DEL styles.css)
   ========================= */

#perfil .section-header .section-title{
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
}

#perfil .profile-ra{
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
}

#perfil .profile-row.two{
  font-size: 18px;          /* antes 14px */
  line-height: 1.35;
  gap: 34px;                /* un poco más de aire entre columnas */
}

#perfil .profile-row.two b{
  font-weight: 900;
}

/* Mobile: grande pero que entre bien */
@media (max-width: 720px){
  #perfil .section-header .section-title{ font-size: 26px; }
  #perfil .profile-ra{ font-size: 22px; }
  #perfil .profile-row.two{
    font-size: 16px;
    flex-direction: column; /* evita que quede apretado */
    gap: 10px;
  }
}

/* =========================================
   PERFIL — MODERNO PERO COHERENTE CON LA WEB
   (pegalo al FINAL del styles.css)
   ========================================= */

#perfil .section-header .section-title{
  font-size: 30px !important;
  font-weight: 800 !important;
  margin: 0 !important;
}

/* Card blanca, sutil, premium */
#perfil .profile-summary{
  position: relative !important;
  background: #fff !important;
  border: 1px solid #e7e7ea !important;
  border-radius: 14px !important;
  padding: 18px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.06) !important;
  overflow: hidden !important;
}

/* acento mínimo arriba (sin despegarse del sitio) */
#perfil .profile-summary::before{
  content:"" !important;
  position:absolute !important;
  left:0 !important; top:0 !important; right:0 !important;
  height: 4px !important;
  background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.02)) !important;
}

/* Razón social / nombre */
#perfil .profile-ra{
  font-size: 25px !important;
  font-weight: 800 !important;
  margin: 4px 0 14px 0 !important;
  color: #111 !important;
}

/* Layout de datos: prolijo */
#perfil .profile-row.two{
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px 12px !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
}

/* Items: blanco/grey muy suave (sin “glass”) */
#perfil .profile-row.two p{
  margin: 0 !important;
  padding: 12px 12px !important;
  border-radius: 12px !important;
  background: #fafafa !important;
  border: 1px solid #ededf0 !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
}

/* Etiqueta */
#perfil .profile-row.two p b{
  display: block !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #666 !important;
  margin-bottom: 4px !important;
}

/* Hover leve (solo un toque) */
#perfil .profile-row.two p:hover{
  border-color: #dcdce1 !important;
  box-shadow: 0 10px 18px rgba(0,0,0,.06) !important;
}

/* Mobile */
@media (max-width: 720px){
  #perfil .section-header .section-title{ font-size: 20px !important; }
  #perfil .profile-ra{ font-size: 17px !important; }
  #perfil .profile-row.two{ grid-template-columns: 1fr !important; }
}

/* =====================================
   BOTÓN "VOLVER A PRODUCTOS"
   alineado con el container del nav
   ===================================== */

#volverProductos,
.btn-volver,
.back-btn {
  margin-left: 45px !important; /* mismo padding que el nav */
}

/* si está dentro de un section sin container */
.section > .back-btn,
.section > #volverProductos {
  margin-left: 24px !important;
}

/* mobile más compacto */
@media (max-width: 720px){
  #volverProductos,
  .btn-volver,
  .back-btn{
    margin-left: 16px !important;
  }
}