:root{
  --bg:#f4f8ff;
  --surface:#ffffff;
  --surface-2:#eef5ff;
  --border:#d8e5ff;
  --text:#10233f;
  --muted:#5f738f;
  --primary:#0a66ff;
  --primary-2:#0e4fc9;
  --success:#1ba97f;
  --danger:#ff4d6d;
  --shadow:0 12px 30px rgba(18, 68, 160, .10);
  --radius:18px;
}

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
}

body{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:linear-gradient(180deg,#f9fbff 0%,#eef5ff 100%);
  color:var(--text);
}

a{
  text-decoration:none;
  color:inherit;
}

button,
input,
select{
  font:inherit;
}

.container{
  width:min(1400px,calc(100% - 32px));
  margin:0 auto;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}

.nav{
  min-height:84px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:20px;
  align-items:center;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand__logo{
  width:46px;
  height:46px;
  border-radius:14px;
  background:linear-gradient(135deg,#fff,#fff);
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:800;
  box-shadow:var(--shadow);
}

.brand__name{
  font-size:1.4rem;
  font-weight:800;
}

.brand__tag{
  font-size:.82rem;
  color:var(--muted);
}

.nav__links{
  display:flex;
  gap:24px;
  justify-content:center;
}

.nav__links a{
  font-weight:600;
  color:#2a3f5f;
}

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

.search{
  background:#f2f7ff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:0 14px;
  display:flex;
  align-items:center;
  min-height:48px;
}

.search input{
  border:none;
  background:transparent;
  outline:none;
  min-width:340px;
  color:var(--text);
}

.icon-btn{
  width:46px;
  height:46px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:1.1rem;
}

.cart-btn{
  position:relative;
}

.badge{
  position:absolute;
  top:-6px;
  right:-6px;
  background:var(--danger);
  color:#fff;
  width:24px;
  height:24px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-size:.78rem;
  font-weight:700;
  border:2px solid #fff;
}

.page{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:28px;
  padding:30px 0 42px;
}

.filters,
.catalog,
.cart-drawer{
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

.filters{
  border-radius:24px;
  padding:22px;
  align-self:start;
  position:sticky;
  top:108px;
}

.filters__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.filters__header h2{
  margin:0;
  font-size:1.4rem;
}

.filter-block{
  padding:18px 0;
  border-top:1px solid #edf3ff;
}

.filter-block:first-of-type{
  border-top:none;
}

.filter-block__title{
  font-weight:800;
  margin-bottom:14px;
  font-size:1rem;
}

.filter-block label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:11px 0;
  color:#233b5e;
  font-weight:500;
}

.filter-block input[type="checkbox"],
.filter-block input[type="radio"]{
  width:18px;
  height:18px;
  accent-color:var(--primary);
  margin-right:10px;
  flex:0 0 auto;
}

.filter-block label span{
  color:var(--muted);
  font-size:.92rem;
}

.range-box{
  padding-top:4px;
}

.range-box input[type="range"]{
  width:100%;
  accent-color:var(--primary);
}

.range-values{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:8px;
  color:var(--muted);
}

.range-values strong{
  color:var(--primary);
}

.filters__actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:6px;
}

.catalog{
  border-radius:24px;
  padding:24px;
}

.catalog__toolbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:22px;
}

.catalog__toolbar h1{
  margin:0 0 6px;
  font-size:2rem;
}

.catalog__toolbar p{
  margin:0;
  color:var(--muted);
}

.toolbar-actions select{
  min-width:240px;
  height:50px;
  border-radius:14px;
  padding:0 14px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  outline:none;
}

.promo-banner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:22px;
  border-radius:22px;
  margin-bottom:24px;
  background:linear-gradient(135deg,#0a66ff,#08378f);
  color:#fff;
}

.promo-banner h3{
  margin:8px 0 8px;
  font-size:1.4rem;
}

.promo-banner p{
  margin:0;
  opacity:.88;
}

.promo-badge{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.15);
  font-size:.85rem;
  font-weight:700;
}

.brands-strip{
  border:1px solid var(--border);
  background:linear-gradient(180deg,#f8fbff,#eff5ff);
  border-radius:20px;
  padding:18px;
  margin-bottom:24px;
}

.brands-strip__header h3{
  margin:0 0 6px;
  font-size:1.1rem;
}

.brands-strip__header p{
  margin:0 0 14px;
  color:var(--muted);
}

.brands-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:12px;
}

.brand-pill{
  min-height:58px;
  display:grid;
  place-items:center;
  border-radius:16px;
  border:1px solid #d9e7ff;
  background:#fff;
  font-weight:800;
  color:#1e4da1;
  letter-spacing:.08em;
}

.products-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}

.product-card{
  border:1px solid var(--border);
  border-radius:22px;
  overflow:hidden;
  background:#fff;
  transition:transform .2s ease, box-shadow .2s ease;
}

.product-card:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 28px rgba(20,78,172,.12);
}

.product-card__media{
  position:relative;
  height:220px;
  padding:18px;
  background:linear-gradient(180deg,#dff0ff,#f7fbff);
}

.product-card__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:18px;
}

.tag-row{
  position:absolute;
  left:18px;
  top:18px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tag{
  padding:7px 10px;
  border-radius:999px;
  font-size:.8rem;
  font-weight:800;
  color:#fff;
}

.tag--sale{
  background:var(--danger);
}

.tag--new{
  background:var(--success);
}

.favorite-btn{
  position:absolute;
  right:18px;
  top:18px;
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.6);
  background:rgba(255,255,255,.92);
  cursor:pointer;
}

.product-card__body{
  padding:18px;
}

.product-card__title{
  font-size:1.15rem;
  font-weight:800;
  margin:0 0 8px;
}

.product-card__meta{
  color:var(--muted);
  font-size:.95rem;
  line-height:1.5;
  margin-bottom:10px;
}

.rating{
  color:#ffb400;
  font-size:.95rem;
  font-weight:700;
  margin-bottom:12px;
}

.price-row{
  display:flex;
  align-items:flex-end;
  gap:10px;
  margin-bottom:14px;
}

.price{
  font-size:1.6rem;
  font-weight:800;
}

.old-price{
  color:#8a99b2;
  text-decoration:line-through;
  font-weight:600;
}

.specs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:16px;
}

.spec{
  padding:8px 10px;
  background:#f3f7ff;
  border:1px solid #e2ecff;
  border-radius:10px;
  font-size:.82rem;
  font-weight:700;
  color:#33507d;
}

.card-actions{
  display:flex;
  gap:10px;
}

.btn{
  border:none;
  border-radius:14px;
  min-height:46px;
  padding:0 18px;
  font-weight:700;
  cursor:pointer;
  transition:transform .15s ease, opacity .15s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn--primary{
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;
}

.btn--primary:disabled,

.btn--primary.disabled {

    background: #b8b8b8;
    color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.btn--secondary{
  background:#eef4ff;
  color:#1e4da1;
  border:1px solid var(--border);
}

.btn--danger{
  background:#f83b64;
  color:#feffff;
  border:1px solid var(--border);
}

.btn--white{
  background:#fff;
  color:#0b4dbe;
}

.btn--full{
  width:100%;
}

.drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(6,22,52,.45);
  opacity:0;
  pointer-events:none;
  transition:.25s ease;
  z-index:80;
}

.drawer-overlay.is-open{
  opacity:1;
  pointer-events:auto;
}

.cart-drawer{
  position:fixed;
  right:0;
  top:0;
  height:100vh;
  width:min(420px,100%);
  z-index:90;
  transform:translateX(100%);
  transition:.28s ease;
  display:flex;
  flex-direction:column;
  border-radius:0;
}

.cart-drawer.is-open{
  transform:translateX(0);
}

.cart-drawer__header,
.cart-drawer__footer{
  padding:20px;
  border-bottom:1px solid #edf3ff;
}

.cart-drawer__footer{
  border-top:1px solid #edf3ff;
  border-bottom:none;
  margin-top:auto;
}

.cart-drawer__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.cart-drawer__header h2{
  margin:0;
}

.cart-drawer__body{
  padding:18px;
  overflow:auto;
}

.empty-cart{
  min-height:260px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
}

.empty-cart__icon{
  font-size:3rem;
}

.cart-item{
  display:grid;
  grid-template-columns:84px 1fr auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  margin-bottom:12px;
}

.cart-item img{
  width:84px;
  height:84px;
  object-fit:cover;
  border-radius:14px;
}

.cart-item h4{
  margin:0 0 5px;
  font-size:1rem;
}

.cart-item p{
  margin:0;
  color:var(--muted);
  font-size:.9rem;
}

.qty-box{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}

.qty-btn{
  width:28px;
  height:28px;
  border:none;
  border-radius:8px;
  background:#edf4ff;
  cursor:pointer;
  font-weight:800;
}

.qty-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.stock-limit-note{
  display:block;
  margin-top:6px;
  color:#b42318;
  font-size:.78rem;
  font-weight:700;
}

.remove-link{
  margin-top:10px;
  display:inline-block;
  color:#c53454;
  font-size:.88rem;
  font-weight:700;
  cursor:pointer;
}

.cart-total{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}

.cart-total span{
  color:var(--muted);
}

.cart-total strong{
  font-size:1.4rem;
}

.whatsapp-float{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:70;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-radius:999px;
  background:linear-gradient(135deg,#27d366,#129c4a);
  color:#fff;
  box-shadow:0 18px 35px rgba(18,156,74,.28);
  font-weight:800;
}

.whatsapp-float span{
  font-size:1.2rem;
}

.whatsapp-float small{
  font-size:.92rem;
}

.mobile-only,
.search--mobile{
  display:none;
}

@media (max-width: 1180px){
  .products-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .nav__links{
    display:none;
  }

  .search input{
    min-width:240px;
  }

  .brands-grid{
    grid-template-columns:repeat(3,1fr);
  }
}

@media (max-width: 900px){
  .page{
    grid-template-columns:1fr;
  }

  .filters{
    position:fixed;
    left:0;
    top:0;
    height:100vh;
    width:min(380px,92vw);
    z-index:95;
    border-radius:0;
    transform:translateX(-100%);
    transition:.28s ease;
    overflow:auto;
  }

  .filters.is-open{
    transform:translateX(0);
  }

  .mobile-only,
  .search--mobile{
    display:block;
  }

  .search--desktop{
    display:none;
  }

  .catalog{
    padding:18px;
  }

  .catalog__toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .toolbar-actions select{
    width:100%;
  }

  .promo-banner{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width: 640px){
  .container{
    width:min(100% - 20px,1400px);
  }

  .nav{
    grid-template-columns:1fr auto;
    gap:10px;
    padding:10px 0;
  }

  .brand__tag{
    display:none;
  }

  .products-grid{
    grid-template-columns:1fr;
  }

  .product-card__media{
    height:200px;
  }

  .catalog__toolbar h1{
    font-size:1.55rem;
  }

  .brands-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .whatsapp-float small{
    display:none;
  }

  .whatsapp-float{
    padding:14px;
  }
}

.btn-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.product-card__media-link,
.product-card__body a{
  text-decoration:none;
  color:inherit;
}

.breadcrumb{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.95rem;
  margin-bottom:18px;
}

.breadcrumb a{
  color:#2a5cb8;
}

.no-image-placeholder{
  width:100%;
  height:100%;
  min-height:400px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:42px;
  font-weight:700;
  letter-spacing:2px;
  color:#b7b7b7;
  background:#f5f5f5;
  border-radius:20px;
  text-align:center;
}

.ccha{
  max-width:50%;
  margin-left:27%;
  margin-bottom:10px;
  margin-top:10px;
}

.user-menu{
  position:relative;
  display:flex;
  align-items:center;
}

.user-btn{
  position:relative;
}

.user-btn.user-logged{
  color:#1769e8;
  border-color:rgba(23, 105, 232, 0.35);
  background:#f4f8ff;
}

.user-btn.user-not-logged{
  color:#7b8794;
}

.user-status{
  position:absolute;
  top:7px;
  right:7px;
  width:10px;
  height:10px;
  border-radius:50%;
  background-color:#ef4444;
  border:2px solid #ffffff;
}

.user-btn.user-logged .user-status{
  background-color:#22c55e;
}

.user-dropdown{
  position:absolute;
  top:58px;
  right:0;
  width:245px;
  background:#ffffff;
  border:1px solid #e2eaf5;
  border-radius:18px;
  box-shadow:0 18px 45px rgba(15, 43, 77, 0.16);
  padding:10px;
  z-index:9999;
  display:none;
}

.user-dropdown.active{
  display:block;
}

.user-dropdown__header{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-bottom:1px solid #eef3f9;
  margin-bottom:6px;
}

.user-dropdown__icon{
  width:40px;
  height:40px;
  border-radius:14px;
  background:#eef5ff;
  color:#1769e8;
  display:flex;
  align-items:center;
  justify-content:center;
}

.user-dropdown__header strong{
  display:block;
  font-size:14px;
  color:#10213d;
}

.user-dropdown__header small{
  display:block;
  font-size:12px;
  color:#7b8794;
  margin-top:2px;
}

.user-dropdown__item{
  width:100%;
  border:0;
  background:transparent;
  padding:11px 10px;
  border-radius:12px;
  color:#24364f;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  text-align:left;
  display:flex;
  align-items:center;
  gap:10px;
}

.user-dropdown__item:hover{
  background:#f3f7fd;
  color:#1769e8;
}

.user-dropdown__item--danger{
  color:#dc2626;
}

.user-dropdown__item--danger:hover{
  background:#fff1f2;
  color:#dc2626;
}

.user-dropdown__item--login{
  color:#1769e8;
}

body.user-logged-in #loginBtn{
  display:none;
}

body.user-logged-out #viewAccountBtn,
body.user-logged-out #changeUserBtn,
body.user-logged-out #logoutMenuBtn{
  display:none;
}

@media (max-width: 768px){
  .user-dropdown{
    right:-52px;
    width:230px;
  }
}

/* ============================= */
/* ACCOUNT MENU */
/* ============================= */

.account-mobile-main-menu {
  display: none;
}

.account-menu-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-menu-item {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #24364f;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all .22s ease;
  position: relative;
  overflow: hidden;
}

.account-menu-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,102,255,.12), rgba(14,79,201,.04));
  opacity: 0;
  transition: opacity .22s ease;
}

.account-menu-item span {
  position: relative;
  z-index: 1;
}

.account-menu-item:hover {
  transform: translateX(4px);
  border-color: rgba(10, 102, 255, .35);
  box-shadow: 0 12px 24px rgba(18, 68, 160, .10);
  color: var(--primary);
}

.account-menu-item:hover::before {
  opacity: 1;
}

.account-menu-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 26px rgba(10, 102, 255, .22);
}

.account-menu-item.active::before {
  opacity: 0;
}

.account-menu-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #eef5ff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.account-menu-item.active .account-menu-icon {
  background: rgba(255,255,255,.18);
}

.account-panel {
  animation: accountFade .25s ease;
}

@keyframes accountFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.account-field label {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.account-field input,
.account-field select,
.account-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.account-field textarea {
  min-height: 90px;
  padding-top: 12px;
  resize: vertical;
}

.account-field input:focus,
.account-field select:focus,
.account-field textarea:focus {
  border-color: rgba(10, 102, 255, .55);
  box-shadow: 0 0 0 4px rgba(10, 102, 255, .08);
}

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

.account-empty-box {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: #f8fbff;
  color: var(--muted);
}

body.user-logged-out #viewAccountBtn,
body.user-logged-out #changeUserBtn,
body.user-logged-out #logoutMenuBtn {
  display: none;
}

/* ============================= */
/* ACCOUNT RESPONSIVE */
/* ============================= */

@media (max-width: 980px) {

  .account-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .account-card {
    width: 100%;
    max-width: 100%;
  }

  .side-card.account-side-card {
    width: 100%;
    max-width: 100%;
  }

  .account-top {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
  }

  .account-top > div:last-child {
    width: 100%;
  }

  .account-top .btn,
  .account-top .btn-link {
    flex: 1;
    min-width: 160px;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {

  body {
    overflow-x: hidden;
  }

  .container {
    width: min(100% - 18px, 1400px);
  }

  .topbar {
    z-index: 2000;
  }

  .nav {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
  }

  .brand__logo {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
  }

  .brand__name {
    font-size: 1.35rem;
    line-height: 1.08;
    word-break: normal;
  }

  .brand__tag {
    display: none;
  }

  .nav__actions {
    gap: 8px;
  }

  .mobile-only {
    display: grid;
  }

  .account-page {
    padding-top: 18px;
  }

  .account-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .side-card.account-side-card {
    order: 1;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    position: static;
  }

  .account-card {
    order: 2;
    padding: 16px;
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .account-profile-box {
    display: block;
    margin-top: 0 !important;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .account-mobile-main-menu {
    display: none;
  }

  .account-menu-box {
    display: none;
  }

  .account-side-card.account-mobile-menu-open {
    position: fixed;
    top: 84px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1500;
    display: block;
    padding: 12px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 22px 55px rgba(15, 43, 77, 0.24);
    overflow-y: auto;
    animation: accountMobileMenu .22s ease;
  }

  .account-side-card.account-mobile-menu-open .account-profile-box {
    display: none;
  }

  .account-side-card.account-mobile-menu-open .account-mobile-main-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #edf3ff;
  }

  .account-side-card.account-mobile-menu-open .account-menu-box {
    display: flex;
    position: static;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    border: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .account-mobile-main-link {
    min-height: 52px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #f8fbff;
    color: #24364f;
    font-weight: 800;
    text-decoration: none;
    transition: all .2s ease;
  }

  .account-mobile-main-link span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef5ff;
    flex: 0 0 auto;
  }

  .account-mobile-main-link:active {
    transform: scale(.98);
  }

  @keyframes accountMobileMenu {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .account-menu-item {
    width: 100%;
    min-width: 100%;
    flex: initial;
    min-height: 52px;
    font-size: .95rem;
  }

  .account-menu-item:hover {
    transform: none;
  }

  .account-top {
    gap: 14px;
  }

  .account-top > div:first-child {
    align-items: flex-start !important;
  }

  .account-top h1 {
    font-size: 1.55rem;
    line-height: 1.1;
  }

  #accountSubtitle {
    font-size: .92rem;
    line-height: 1.45;
  }

  .profile-badge {
    width: 52px;
    height: 52px;
    min-width: 52px;
  }

  .account-top > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 9px !important;
  }

  .account-top .btn,
  .account-top .btn-link {
    width: 100%;
    min-width: 100%;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .kpi-card {
    min-height: 74px;
  }

  .account-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .account-field[style] {
    grid-column: auto !important;
  }

  .account-form-actions {
    flex-direction: column;
  }

  .account-form-actions .btn {
    width: 100%;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card-head h2 {
    font-size: 1.25rem;
  }

  .card-head p {
    font-size: .92rem;
  }

  .data-item__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .inline-tags {
    gap: 7px;
  }

  .pill {
    font-size: .78rem;
  }

  .info-line strong {
    word-break: break-word;
  }
}

@media (max-width: 430px) {

  .brand__name {
    font-size: 1.18rem;
  }

  .brand__logo {
    width: 42px;
    height: 42px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .breadcrumb {
    font-size: .86rem;
    margin-bottom: 12px;
  }

  .account-card {
    padding: 14px;
  }

  .notice-box {
    padding: 14px;
  }

  .account-field input,
  .account-field select,
  .account-field textarea {
    min-height: 46px;
    font-size: .92rem;
  }

  .section-stack {
    gap: 22px;
  }

  .data-item {
    padding: 14px;
  }
}

/* ============================= */
/* INDEX FILTERS MOBILE FIX */
/* No afecta account.html */
/* ============================= */

.filters-mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .filters {
    padding: 18px;
    width: min(350px, 88vw);
  }

  .filters-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #edf3ff;
  }

  .filters-mobile-menu__link {
    min-height: 52px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #f8fbff;
    color: #24364f;
    font-weight: 800;
    text-decoration: none;
  }

  .filters-mobile-menu__link span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef5ff;
    flex: 0 0 auto;
  }

  .filters .filter-block label {
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
    font-size: .95rem;
  }

  .filters .filter-block label span {
    color: #233b5e;
    font-size: .95rem;
    font-weight: 600;
  }

  .filters .filter-block input[type="checkbox"],
  .filters .filter-block input[type="radio"] {
    margin-right: 0;
    flex: 0 0 auto;
  }

  .filters .filter-block__title {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }

  .filters .range-values {
    font-size: .95rem;
  }

  .filters .range-values strong {
    font-size: 1.05rem;
  }
}

@media (max-width: 430px) {
  .filters {
    width: min(340px, 88vw);
  }
}
/* ============================= */
/* INDEX MOBILE FILTERS POSITION FIX */
/* Baja el panel para que no quede pegado al header */
/* ============================= */

@media (max-width: 900px) {
  .filters {
    top: 90px;
    height: calc(100vh - 112px);
    padding-top: 22px;
    border-radius: 22px 22px 0 0;
  }
}

@media (max-width: 640px) {
  .filters {
    top: 90px;
    height: calc(100vh - 122px);
  }
}

@media (max-width: 430px) {
  .filters {
    top: 90px;
    height: calc(100vh - 132px);
  }
}

/* ============================= */
/* LOADER */
/* ============================= */


.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loader-overlay.active {
    display: flex;
}

.loader-box {
    text-align: center;
    padding: 28px 34px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(0, 84, 180, 0.18);
    animation: fadeScale 0.25s ease;
}

.modern-loader {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0 auto 14px auto;
    border: 5px solid rgba(32, 101, 199, 0.16);
    border-top-color: #2065c7;
    border-right-color: #10a5db;
    animation: spinLoader 0.85s linear infinite;
}

.loader-box p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #2065c7;
    letter-spacing: 0.3px;
}

@keyframes spinLoader {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@media (max-width: 480px) {
    .loader-box {
        width: calc(100% - 40px);
        max-width: 280px;
        padding: 24px 22px;
        border-radius: 18px;
    }

    .modern-loader {
        width: 48px;
        height: 48px;
        border-width: 4px;
    }

    .loader-box p {
        font-size: 14px;
    }
}

/* ============================= */
/* fin LOADER */
/* ============================= */


/* ============================= */
/* Inicio modal detalles doc */
/* ============================= */

.order-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 35, 63, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 22px;
}

.order-detail-overlay.is-open {
  display: flex;
}

.order-detail-card {
  width: min(920px, 100%);
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 24px 70px rgba(18, 68, 160, 0.18);
  overflow: hidden;
  animation: orderDetailShow 0.18s ease-out;
}

@keyframes orderDetailShow {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.order-detail-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--border);
}

.order-detail-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(10, 102, 255, 0.10);
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.order-detail-card__head h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 850;
}

.order-detail-card__head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.order-detail-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(18, 68, 160, 0.08);
  transition: 0.18s ease;
}

.order-detail-close:hover {
  color: var(--primary);
  border-color: rgba(10, 102, 255, 0.35);
  background: #f8fbff;
  transform: translateY(-1px);
}

.order-detail-card__body {
  padding: 24px 28px 28px;
  max-height: calc(90vh - 122px);
  overflow: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.order-detail-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.order-detail-loading__circle {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border: 4px solid var(--surface-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: orderSpin 0.8s linear infinite;
}

@keyframes orderSpin {
  to {
    transform: rotate(360deg);
  }
}

.order-detail-content {
  display: grid;
  gap: 18px;
}

.order-detail-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.order-detail-table-wrap {
  overflow-x: auto;
}

.order-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.order-detail-table th {
  background: var(--surface-2);
  color: var(--muted);
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.order-detail-table td {
  padding: 16px;
  color: var(--text);
  vertical-align: middle;
  border-bottom: 1px solid rgba(216, 229, 255, 0.75);
}

.order-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.order-detail-table tbody tr:hover {
  background: #f8fbff;
}

.order-detail-product {
  min-width: 280px;
}

.order-detail-product strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.order-detail-product small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.order-detail-money {
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

.order-detail-muted-money {
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.order-detail-footer {
  display: flex;
  justify-content: flex-end;
}

.order-detail-summary {
  width: min(370px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.order-detail-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 14px;
}

.order-detail-summary-row strong {
  color: var(--text);
  font-weight: 850;
}

.order-detail-summary-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.order-detail-summary-total strong {
  color: var(--primary-2);
}

.order-detail-empty,
.order-detail-error {
  padding: 22px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 700;
}

.order-detail-empty {
  background: var(--surface-2);
  color: var(--primary-2);
  border: 1px solid var(--border);
}

.order-detail-error {
  background: rgba(255, 77, 109, 0.10);
  color: var(--danger);
  border: 1px solid rgba(255, 77, 109, 0.25);
}

@media (max-width: 700px) {
  .order-detail-overlay {
    padding: 12px;
  }

  .order-detail-card {
    border-radius: 20px;
    max-height: 94vh;
  }

  .order-detail-card__head {
    padding: 20px;
  }

  .order-detail-card__head h3 {
    font-size: 21px;
  }

  .order-detail-card__body {
    padding: 18px;
    max-height: calc(94vh - 118px);
  }

  .order-detail-footer {
    justify-content: stretch;
  }

  .order-detail-summary {
    width: 100%;
  }

  .order-detail-table th,
  .order-detail-table td {
    padding: 13px 12px;
  }
}

/* ============================= */
/* Fin modal detalles doc */
/* ============================= */