:root{
  --mayor-bg:#f4f7fb;
  --mayor-surface:#ffffff;
  --mayor-surface-soft:#eef5ff;
  --mayor-line:#d9e1ec;
  --mayor-text:#111827;
  --mayor-muted:#667085;
  --mayor-primary:#183f91;
  --mayor-primary-soft:#eaf3ff;
  --mayor-accent:#2e9b8f;
  --mayor-shadow:0 12px 32px rgba(17,24,39,.08);
}

*{box-sizing:border-box}

html{
  min-height:100%;
  background:var(--mayor-bg);
  -webkit-text-size-adjust:100%;
}

body.mayor-app{
  margin:0;
  min-height:100%;
  background:var(--mayor-bg);
  color:var(--mayor-text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:0;
}

button,input{
  font:inherit;
  letter-spacing:0;
}

button{
  color:inherit;
}

.mayor-shell{
  width:100%;
  min-height:100vh;
  max-width:720px;
  margin:0 auto;
  padding-bottom:calc(90px + env(safe-area-inset-bottom));
  background:var(--mayor-bg);
}

.mayor-topbar{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:82px;
  padding:14px 16px 12px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--mayor-line);
  backdrop-filter:saturate(1.2) blur(12px);
}

.mayor-brand{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
}

.mayor-logo{
  color:#101828;
  font-size:28px;
  line-height:1;
  font-weight:650;
  letter-spacing:8px;
}

.mayor-logo-sub{
  color:#101828;
  font-size:10px;
  line-height:1;
  font-weight:760;
  letter-spacing:4px;
}

.mayor-top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.mayor-icon-button{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 52px;
  width:52px;
  height:52px;
  border:1px solid transparent;
  border-radius:999px;
  background:#fff;
  box-shadow:0 8px 22px rgba(17,24,39,.08);
}

.mayor-menu-button{
  display:none;
  box-shadow:none;
  border-color:var(--mayor-line);
}

.mayor-icon-button svg,
.mayor-bottom-nav svg,
.mayor-back-button svg{
  width:26px;
  height:26px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.mayor-badge,
.mayor-cart-nav i{
  position:absolute;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  color:var(--mayor-primary);
  background:transparent;
  border:0;
  font-size:13px;
  font-style:normal;
  line-height:1;
  font-weight:750;
}

.mayor-badge{
  top:-5px;
  right:-3px;
}

.mayor-main{
  min-height:calc(100vh - 172px);
}

.mayor-view{
  display:none;
  padding:16px;
}

.mayor-view.is-active{
  display:block;
}

.mayor-home-intro{
  padding:8px 0 6px;
}

.mayor-home-intro h1{
  margin:0 0 12px;
  color:#0f172a;
  font-size:42px;
  line-height:1;
  font-weight:760;
}

.mayor-home-intro p{
  margin:0 0 24px;
  max-width:560px;
  color:var(--mayor-muted);
  font-size:20px;
  line-height:1.45;
}

.mayor-search{
  display:flex;
  align-items:center;
  min-width:0;
  min-height:64px;
  gap:12px;
  padding:8px 10px 8px 18px;
  border:1px solid var(--mayor-line);
  border-radius:22px;
  background:#fff;
}

.mayor-search svg{
  flex:0 0 22px;
  width:22px;
  height:22px;
  fill:none;
  stroke:var(--mayor-primary);
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.mayor-search input{
  flex:1 1 auto;
  min-width:0;
  height:44px;
  border:0;
  outline:0;
  color:#111827;
  background:transparent;
  font-size:22px;
  line-height:1.2;
}

.mayor-search input::placeholder{
  color:#667085;
}

.mayor-search button{
  flex:0 0 auto;
  min-width:84px;
  height:48px;
  padding:0 18px;
  border:2px solid #91c3ff;
  border-radius:18px;
  background:#f5fbff;
  color:var(--mayor-primary);
  font-size:18px;
  font-weight:750;
}

.mayor-quick-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:22px 0;
}

.mayor-quick-grid button{
  min-height:96px;
  padding:18px;
  text-align:left;
  border:1px solid var(--mayor-line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 1px 2px rgba(16,24,40,.04);
}

.mayor-quick-grid strong{
  display:block;
  margin-bottom:8px;
  color:var(--mayor-primary);
  font-size:22px;
  line-height:1.1;
}

.mayor-quick-grid span{
  color:var(--mayor-muted);
  font-size:16px;
}

.mayor-section{
  margin-top:10px;
}

.mayor-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.mayor-section-head h2{
  margin:0;
  font-size:22px;
  line-height:1.2;
}

.mayor-section-head button{
  border:0;
  background:transparent;
  color:var(--mayor-primary);
  font-weight:750;
}

.mayor-home-products{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.mayor-products-toolbar{
  position:sticky;
  top:82px;
  z-index:20;
  display:flex;
  align-items:center;
  gap:10px;
  margin:-16px -16px 0;
  padding:10px 12px;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid var(--mayor-line);
  backdrop-filter:saturate(1.2) blur(12px);
}

.mayor-products-search{
  flex:1 1 auto;
  min-height:56px;
  border-radius:999px;
  padding-left:16px;
}

.mayor-products-search input{
  font-size:20px;
}

.mayor-products-toolbar .mayor-icon-button{
  flex-basis:52px;
}

.mayor-category-strip{
  display:flex;
  gap:8px;
  overflow-x:auto;
  margin:14px -16px 10px;
  padding:0 16px 4px;
  scrollbar-width:none;
}

.mayor-category-strip::-webkit-scrollbar{
  display:none;
}

.mayor-category-strip button{
  flex:0 0 auto;
  min-height:38px;
  padding:0 14px;
  border:1px solid var(--mayor-line);
  border-radius:999px;
  background:#fff;
  color:#344054;
  font-weight:650;
}

.mayor-category-strip button.is-active{
  border-color:#8ec5ff;
  background:var(--mayor-primary-soft);
  color:var(--mayor-primary);
}

.mayor-result-line{
  display:flex;
  align-items:baseline;
  gap:5px;
  margin:8px 0 12px;
  color:var(--mayor-muted);
  font-size:14px;
}

.mayor-result-line strong{
  color:#111827;
}

.mayor-products-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.mayor-products-grid.is-tail-enter{
  animation:mayorTailEnter 200ms ease-out;
}

@keyframes mayorTailEnter{
  from{
    opacity:.92;
    transform:translate3d(0,-18px,0);
  }
  to{
    opacity:1;
    transform:translate3d(0,0,0);
  }
}

.mayor-category-banner{
  width:100%;
  aspect-ratio:4 / 1;
  margin:10px 0 12px;
  border:1px solid #d8e0ea;
  border-radius:12px;
  background:#fff;
}

.mayor-category-banner[hidden]{
  display:none !important;
}

.mayor-shell[data-view="productos"] .mayor-category-banner:not([hidden]) + .mayor-products-grid{
  margin-top:0;
}

.mayor-product-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:318px;
  overflow:hidden;
  border:1px solid var(--mayor-line);
  border-radius:18px;
  background:#fff;
  box-shadow:0 1px 2px rgba(16,24,40,.04);
}

.mayor-product-image{
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio:1 / .82;
  padding:10px;
  background:#f8fbff;
  border-bottom:1px solid #edf1f7;
}

.mayor-product-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.mayor-product-image.is-empty::before,
.mayor-detail-image-card.is-empty::before{
  content:"Sin imagen";
  color:#98a2b3;
  font-weight:650;
}

.mayor-product-body{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  min-width:0;
  padding:12px;
}

.mayor-product-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#667085;
  font-size:14px;
  line-height:1.2;
}

.mayor-product-name{
  margin:10px 0 12px;
  min-height:52px;
  color:#111827;
  font-size:17px;
  line-height:1.28;
  font-weight:650;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.mayor-product-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
}

.mayor-product-price{
  color:var(--mayor-primary);
  font-size:23px;
  line-height:1;
  font-weight:760;
}

.mayor-product-add{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 54px;
  width:54px;
  height:54px;
  border:2px solid #9bcaff;
  border-radius:999px;
  background:#eef6ff;
  color:var(--mayor-primary);
  font-size:34px;
  line-height:1;
}

.mayor-load-more{
  display:block;
  width:100%;
  min-height:48px;
  margin:16px 0 4px;
  border:1px solid #d8e0ea;
  border-radius:16px;
  background:#fff;
  color:#111827;
  font-size:15px;
  font-weight:400;
  letter-spacing:0;
}

.mayor-detail-view{
  padding-top:16px;
}

.mayor-detail-head{
  display:grid;
  grid-template-columns:50px 1fr 50px;
  align-items:center;
  min-height:64px;
  border:1px solid var(--mayor-line);
  border-radius:18px 18px 0 0;
  background:#fff;
}

.mayor-back-button{
  display:flex;
  align-items:center;
  justify-content:center;
  width:50px;
  height:50px;
  border:0;
  background:transparent;
  color:#344054;
}

.mayor-detail-head span{
  min-width:0;
  text-align:center;
  color:#344054;
  font-size:20px;
  line-height:1.2;
  font-weight:650;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mayor-detail-image-card{
  display:flex;
  position:relative;
  align-items:center;
  justify-content:center;
  min-height:360px;
  padding:18px 12px 38px;
  border:1px solid var(--mayor-line);
  border-top:0;
  border-radius:0 0 18px 18px;
  background:#fff;
}

.mayor-detail-image-card img{
  display:block;
  width:100%;
  max-height:430px;
  object-fit:contain;
}

.mayor-image-dots{
  position:absolute;
  left:50%;
  bottom:18px;
  display:flex;
  gap:6px;
  transform:translateX(-50%);
}

.mayor-image-dots span{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#d6dde8;
}

.mayor-image-dots span:first-child{
  width:34px;
  background:#344054;
}

.mayor-detail-body{
  padding:18px 0 0;
}

.mayor-detail-body h1{
  margin:0 0 14px;
  color:#111827;
  font-size:28px;
  line-height:1.18;
  font-weight:720;
}

.mayor-detail-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:16px;
}

.mayor-detail-tags span{
  min-height:36px;
  padding:8px 13px;
  border:1px solid var(--mayor-line);
  border-radius:999px;
  background:#fff;
  color:#344054;
  font-size:15px;
  line-height:1.15;
  font-weight:650;
}

.mayor-detail-buy{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px;
  border:1px solid var(--mayor-line);
  border-radius:20px;
  background:#fff;
}

.mayor-detail-buy strong{
  display:block;
  color:#111827;
  font-size:42px;
  line-height:1;
  font-weight:660;
}

.mayor-detail-buy span{
  display:block;
  margin-top:7px;
  color:var(--mayor-muted);
  font-size:15px;
}

.mayor-qty-control{
  display:flex;
  align-items:center;
  overflow:hidden;
  flex:0 0 auto;
  height:58px;
  border:1px solid var(--mayor-line);
  border-radius:999px;
  background:#fff;
}

.mayor-qty-control button{
  width:58px;
  height:58px;
  border:0;
  background:#fff;
  color:var(--mayor-primary);
  font-size:32px;
  line-height:1;
}

.mayor-qty-control button:last-child{
  background:#eef6ff;
}

.mayor-qty-control output{
  min-width:42px;
  text-align:center;
  color:#111827;
  font-size:22px;
  font-weight:760;
}

.mayor-page-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.mayor-page-title h1{
  margin:0;
  color:#111827;
  font-size:36px;
  line-height:1;
  font-weight:760;
}

.mayor-page-title button{
  min-height:48px;
  padding:0 22px;
  border:1px solid var(--mayor-line);
  border-radius:999px;
  background:#fff;
  color:var(--mayor-primary);
  font-size:18px;
  font-weight:750;
}

.mayor-page-title.compact{
  margin:0 0 16px;
}

.mayor-page-title.compact h1{
  font-size:34px;
}

.mayor-cart-card,
.mayor-order-summary,
.mayor-page-card,
.mayor-empty-state,
.mayor-account-card,
.mayor-account-list{
  border:1px solid var(--mayor-line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 1px 2px rgba(16,24,40,.04);
}

.mayor-cart-card{
  overflow:hidden;
}

.mayor-cart-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px;
  border-bottom:1px solid var(--mayor-line);
}

.mayor-cart-card-head h2,
.mayor-order-summary h2{
  margin:0 0 5px;
  font-size:22px;
}

.mayor-cart-card-head span{
  color:var(--mayor-muted);
}

.mayor-cart-card-head strong{
  color:#111827;
  font-size:22px;
}

.mayor-cart-items{
  display:flex;
  flex-direction:column;
}

.mayor-cart-empty{
  padding:22px 16px;
  color:var(--mayor-muted);
  text-align:center;
}

.mayor-cart-item{
  display:grid;
  grid-template-columns:84px 1fr;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--mayor-line);
}

.mayor-cart-item img{
  width:84px;
  height:92px;
  object-fit:contain;
  border-radius:14px;
  background:#f8fbff;
  border:1px solid #edf1f7;
}

.mayor-cart-item h3{
  margin:0 30px 8px 0;
  color:#111827;
  font-size:17px;
  line-height:1.25;
  font-weight:650;
}

.mayor-cart-item-meta{
  display:flex;
  gap:8px;
  color:var(--mayor-muted);
  font-size:15px;
}

.mayor-cart-item-price{
  margin-top:8px;
  color:#111827;
  font-size:22px;
  font-weight:720;
}

.mayor-cart-line{
  position:relative;
}

.mayor-remove-line{
  position:absolute;
  top:0;
  right:0;
  width:34px;
  height:34px;
  border:1px solid var(--mayor-line);
  border-radius:999px;
  background:#fff;
  color:#667085;
  font-size:24px;
  line-height:1;
}

.mayor-cart-line .mayor-qty-control{
  width:max-content;
  height:42px;
  margin-top:10px;
  border-radius:14px;
}

.mayor-cart-line .mayor-qty-control button{
  width:44px;
  height:42px;
  font-size:24px;
}

.mayor-cart-line .mayor-qty-control output{
  min-width:42px;
  font-size:18px;
}

.mayor-add-more{
  display:block;
  width:calc(100% - 32px);
  min-height:58px;
  margin:16px;
  border:1px dashed #c9d3df;
  border-radius:18px;
  background:#fff;
  color:#111827;
  font-size:20px;
  font-weight:720;
}

.mayor-order-summary{
  margin-top:16px;
  padding:18px;
}

.mayor-order-summary dl{
  display:grid;
  grid-template-columns:1fr auto;
  gap:14px 20px;
  margin:18px 0;
}

.mayor-order-summary dt{
  color:var(--mayor-muted);
  font-size:20px;
}

.mayor-order-summary dd{
  margin:0;
  color:#111827;
  font-size:20px;
  font-weight:720;
}

.mayor-order-summary dt:last-of-type,
.mayor-order-summary dd:last-of-type{
  color:#111827;
  font-weight:760;
}

.mayor-discount-box{
  padding:16px;
  border:1px solid var(--mayor-line);
  border-radius:18px;
  background:#f8fbff;
}

.mayor-discount-box div:first-child{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--mayor-muted);
}

.mayor-discount-box div:first-child span{
  font-size:13px;
  font-weight:760;
  letter-spacing:5px;
}

.mayor-discount-box div:first-child strong{
  color:var(--mayor-primary);
  font-size:18px;
}

.mayor-discount-box p{
  margin:13px 0;
  color:#111827;
  font-size:18px;
  font-weight:650;
}

.mayor-progress{
  height:12px;
  overflow:hidden;
  border-radius:999px;
  background:#e6edf7;
}

.mayor-progress span{
  display:block;
  width:0;
  height:100%;
  border-radius:inherit;
  background:var(--mayor-primary);
}

.mayor-primary-action{
  display:block;
  width:100%;
  min-height:58px;
  margin-top:16px;
  border:0;
  border-radius:18px;
  background:var(--mayor-primary);
  color:#fff;
  font-size:19px;
  font-weight:760;
}

.mayor-page-card{
  padding:18px;
}

.mayor-stats-row{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
}

.mayor-stats-row div{
  min-width:0;
  padding:13px 12px;
  border-radius:14px;
  background:#f5f8fc;
}

.mayor-stats-row span{
  display:block;
  margin-bottom:8px;
  color:var(--mayor-muted);
  font-size:12px;
  font-weight:760;
  letter-spacing:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mayor-stats-row strong{
  color:var(--mayor-primary);
  font-size:28px;
}

.mayor-empty-state{
  margin-top:14px;
  padding:22px 18px;
}

.mayor-empty-state h2{
  margin:0 0 8px;
  font-size:24px;
}

.mayor-empty-state p{
  margin:0;
  color:var(--mayor-muted);
  font-size:17px;
  line-height:1.45;
}

.mayor-account-card{
  padding:28px 20px 20px;
}

.mayor-account-card h1{
  margin:0 0 14px;
  font-size:38px;
}

.mayor-account-card span{
  display:inline-flex;
  min-height:34px;
  align-items:center;
  padding:0 16px;
  border-radius:999px;
  background:var(--mayor-primary-soft);
  color:var(--mayor-primary);
  font-weight:750;
}

.mayor-account-card button{
  display:block;
  width:100%;
  min-height:58px;
  margin-top:24px;
  border:2px solid #8ec5ff;
  border-radius:16px;
  background:#eef6ff;
  color:var(--mayor-primary);
  font-size:20px;
  font-weight:760;
}

.mayor-account-list{
  overflow:hidden;
  margin-top:16px;
  border-radius:0;
}

.mayor-account-list button{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:78px;
  padding:0 20px;
  border:0;
  border-bottom:1px solid var(--mayor-line);
  background:#fff;
  text-align:left;
  font-size:22px;
  font-weight:700;
}

.mayor-account-list button:last-child{
  border-bottom:0;
}

.mayor-account-list b{
  color:#98a2b3;
  font-size:32px;
}

.mayor-bottom-nav{
  position:fixed;
  left:50%;
  bottom:0;
  z-index:40;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  width:100%;
  max-width:720px;
  min-height:82px;
  padding:8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top:1px solid var(--mayor-line);
  background:rgba(255,255,255,.98);
  transform:translateX(-50%);
  backdrop-filter:saturate(1.2) blur(12px);
}

.mayor-bottom-nav button{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:0;
  min-height:64px;
  border:0;
  border-radius:18px;
  background:transparent;
  color:#667085;
}

.mayor-bottom-nav button.is-active{
  color:var(--mayor-primary);
}

.mayor-bottom-nav button.is-active svg{
  background:var(--mayor-primary-soft);
}

.mayor-bottom-nav svg{
  width:42px;
  height:42px;
  padding:7px;
  border-radius:999px;
}

.mayor-bottom-nav span{
  font-size:13px;
  line-height:1.1;
}

.mayor-cart-nav i{
  top:0;
  right:16px;
}

body.mayor-loading .mayor-products-grid::before,
body.mayor-loading .mayor-home-products::before{
  content:"Cargando productos...";
  grid-column:1 / -1;
  padding:20px;
  color:var(--mayor-muted);
  text-align:center;
}

.mayor-toast{
  position:fixed;
  left:50%;
  bottom:calc(96px + env(safe-area-inset-bottom));
  z-index:60;
  max-width:min(420px,calc(100% - 32px));
  padding:12px 16px;
  border-radius:999px;
  background:#111827;
  color:#fff;
  box-shadow:var(--mayor-shadow);
  transform:translateX(-50%);
  font-weight:650;
}

@media (max-width:420px){
  .mayor-view{
    padding:14px 10px;
  }

  .mayor-topbar{
    padding-left:14px;
    padding-right:14px;
  }

  .mayor-logo{
    font-size:25px;
    letter-spacing:7px;
  }

  .mayor-logo-sub{
    letter-spacing:3.4px;
  }

  .mayor-icon-button{
    flex-basis:48px;
    width:48px;
    height:48px;
  }

  .mayor-home-intro h1{
    font-size:38px;
  }

  .mayor-home-intro p{
    font-size:19px;
  }

  .mayor-search{
    min-height:58px;
    border-radius:20px;
  }

  .mayor-search input{
    font-size:19px;
  }

  .mayor-search button{
    min-width:74px;
    height:44px;
    padding:0 14px;
    font-size:17px;
  }

  .mayor-quick-grid{
    gap:10px;
  }

  .mayor-quick-grid button{
    min-height:88px;
    padding:15px;
  }

  .mayor-quick-grid strong{
    font-size:20px;
  }

  .mayor-products-grid,
  .mayor-home-products{
    gap:10px;
  }

  .mayor-product-card{
    min-height:292px;
    border-radius:16px;
  }

  .mayor-product-body{
    padding:10px;
  }

  .mayor-product-name{
    font-size:16px;
    min-height:48px;
  }

  .mayor-product-price{
    font-size:22px;
  }

  .mayor-product-add{
    flex-basis:50px;
    width:50px;
    height:50px;
  }

  .mayor-products-toolbar{
    margin-left:-10px;
    margin-right:-10px;
    top:78px;
  }

  .mayor-category-strip{
    margin-left:-10px;
    margin-right:-10px;
    padding-left:10px;
    padding-right:10px;
  }

  .mayor-detail-image-card{
    min-height:330px;
  }

  .mayor-detail-body h1{
    font-size:26px;
  }

  .mayor-detail-buy{
    align-items:flex-start;
    flex-direction:column;
  }

  .mayor-detail-buy strong{
    font-size:40px;
  }

  .mayor-qty-control{
    width:100%;
    justify-content:space-between;
  }

  .mayor-qty-control output{
    flex:1 1 auto;
  }

  .mayor-cart-item{
    grid-template-columns:74px 1fr;
    padding:12px;
  }

  .mayor-cart-item img{
    width:74px;
    height:86px;
  }

  .mayor-bottom-nav span{
    font-size:12px;
  }
}

/* Product-list compact pass requested after first mobile review. */
.mayor-shell{
  padding-bottom:calc(64px + env(safe-area-inset-bottom));
}

.mayor-shell[data-view="productos"] .mayor-topbar,
.mayor-shell[data-view="detalle"] .mayor-topbar{
  display:none !important;
}

.mayor-shell[data-view="productos"] #view-productos{
  padding-top:0;
}

.mayor-shell[data-view="productos"] .mayor-products-toolbar{
  top:0;
}

.mayor-products-toolbar{
  min-height:54px;
  gap:8px;
  padding:6px 10px;
}

.mayor-category-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 40px;
  width:40px;
  height:40px;
  border:1px solid var(--mayor-line);
  border-radius:999px;
  background:#fff;
  color:#111827;
}

.mayor-category-toggle svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.35;
  stroke-linecap:round;
}

.mayor-products-search{
  min-height:42px;
  padding:4px 10px 4px 12px;
  border-radius:18px;
}

.mayor-products-search svg{
  width:19px;
  height:19px;
  stroke-width:1.55;
}

.mayor-products-search input{
  height:34px;
  font-size:18px;
}

.mayor-products-toolbar .mayor-icon-button{
  flex-basis:40px;
  width:40px;
  height:40px;
  box-shadow:none;
}

.mayor-products-toolbar .mayor-icon-button svg{
  width:22px;
  height:22px;
  stroke-width:1.35;
}

.mayor-products-toolbar .mayor-badge{
  top:-6px;
  right:-5px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  font-size:12px;
}

.mayor-result-line,
.mayor-category-strip{
  display:none !important;
}

.mayor-category-panel{
  position:fixed;
  top:56px;
  bottom:calc(74px + env(safe-area-inset-bottom));
  left:max(10px,calc(50% - 350px));
  z-index:45;
  width:min(330px,calc(100vw - 20px));
  max-height:none;
  overflow:auto;
  padding:10px;
  border:1px solid var(--mayor-line);
  border-radius:18px;
  background:#fff;
  box-shadow:0 18px 42px rgba(17,24,39,.18);
  overscroll-behavior:contain;
}

.mayor-category-panel[hidden]{
  display:none !important;
}

.mayor-category-search{
  display:flex;
  gap:8px;
  margin-bottom:8px;
}

.mayor-category-search input{
  width:100%;
  min-height:44px;
  padding:0 14px;
  border:1px solid var(--mayor-line);
  border-radius:14px;
  outline:0;
  color:#111827;
  background:#fff;
  font-size:16px;
}

.mayor-category-tree{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.mayor-cat-row,
.mayor-cat-group summary,
.mayor-cat-children button{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:44px;
  gap:12px;
  padding:0 12px;
  border:1px solid var(--mayor-line);
  border-radius:12px;
  background:#fff;
  color:#344054;
  text-align:left;
  font-size:16px;
  font-weight:600;
}

.mayor-cat-row span,
.mayor-cat-group summary span,
.mayor-cat-children button span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mayor-cat-row b,
.mayor-cat-group summary b,
.mayor-cat-children button b{
  flex:0 0 auto;
  color:#667085;
  font-weight:650;
}

.mayor-cat-row.is-active,
.mayor-cat-group summary.is-active,
.mayor-cat-children button.is-active{
  border-color:#0969da;
  color:#111827;
  box-shadow:inset 0 0 0 1px #0969da;
}

.mayor-cat-children button.is-active{
  border-color:#0969da;
  box-shadow:none;
}

.mayor-cat-group{
  border:1px solid #edf1f7;
  border-radius:14px;
  padding:0;
}

.mayor-cat-group summary{
  cursor:pointer;
  list-style:none;
}

.mayor-cat-group summary::-webkit-details-marker{
  display:none;
}

.mayor-cat-children{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:6px 10px 10px 26px;
}

.mayor-cat-children button{
  min-height:36px;
  border-radius:999px;
  font-size:15px;
  font-weight:500;
}

.mayor-product-card{
  min-height:266px;
  border-radius:14px;
}

.mayor-product-image{
  aspect-ratio:10 / 8;
  padding:0;
  background:#fff;
}

.mayor-product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.mayor-product-body{
  padding:10px;
}

.mayor-product-meta{
  font-size:14px;
}

.mayor-product-name{
  min-height:38px;
  margin:8px 0 10px;
  font-size:15px;
  line-height:1.25;
  font-weight:500;
  -webkit-line-clamp:2;
}

.mayor-product-price{
  color:#111827;
  font-size:21px;
  font-weight:620;
}

.mayor-product-add{
  flex:0 0 42px;
  width:42px;
  height:42px;
  border:1px solid #111827;
  background:#fff;
  color:#111827;
  font-size:28px;
  font-weight:300;
}

.mayor-bottom-nav{
  min-height:58px;
  padding:4px 6px calc(4px + env(safe-area-inset-bottom));
}

.mayor-bottom-nav button{
  min-height:50px;
  gap:1px;
  border-radius:12px;
}

.mayor-bottom-nav svg{
  width:30px;
  height:30px;
  padding:4px;
  stroke-width:1.35;
}

.mayor-bottom-nav span{
  font-size:12px;
}

.mayor-cart-nav i{
  top:-2px;
  right:14px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  font-size:12px;
}

@media (max-width:420px){
  .mayor-products-toolbar{
    top:0;
    min-height:52px;
    margin-left:-10px;
    margin-right:-10px;
    padding:5px 8px;
  }

  .mayor-products-search{
    min-height:40px;
  }

  .mayor-products-search input{
    height:32px;
    font-size:17px;
  }

  .mayor-category-toggle,
  .mayor-products-toolbar .mayor-icon-button{
    flex-basis:38px;
    width:38px;
    height:38px;
  }

  .mayor-category-panel{
    top:52px;
    bottom:calc(72px + env(safe-area-inset-bottom));
    left:8px;
    width:min(320px,calc(100vw - 16px));
  }

  .mayor-product-card{
    min-height:254px;
  }

  .mayor-product-name{
    min-height:38px;
    font-size:15px;
  }

  .mayor-product-price{
    font-size:20px;
  }

  .mayor-product-add{
    flex-basis:40px;
    width:40px;
    height:40px;
    font-size:27px;
  }
}

/* Product detail compact pass. */
.mayor-shell[data-view="detalle"] #view-detalle{
  padding-top:8px;
}

.mayor-detail-view{
  touch-action:pan-y;
}

.mayor-detail-head{
  grid-template-columns:42px 1fr 42px;
  min-height:48px;
  border-radius:14px 14px 0 0;
  cursor:pointer;
}

.mayor-back-button{
  width:42px;
  height:42px;
}

.mayor-back-button svg{
  width:24px;
  height:24px;
  stroke-width:1.45;
}

.mayor-detail-head span[data-detail-category]{
  font-size:18px;
  font-weight:400;
}

.mayor-detail-image-card{
  min-height:330px;
  padding:12px 8px 30px;
  cursor:zoom-in;
}

.mayor-detail-image-card img{
  max-height:390px;
}

.mayor-image-dots{
  bottom:12px;
}

.mayor-detail-body{
  padding-top:14px;
}

.mayor-detail-body h1{
  display:-webkit-box;
  margin-bottom:10px;
  overflow:hidden;
  color:#111827;
  font-size:24px;
  font-weight:500;
  line-height:1.18;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.mayor-detail-tags{
  display:grid;
  grid-template-columns:auto auto auto minmax(0,1fr);
  align-items:center;
  gap:6px;
  overflow:hidden;
  margin-bottom:12px;
}

.mayor-detail-tags span{
  min-width:0;
  min-height:28px;
  padding:5px 9px;
  overflow:hidden;
  border-radius:999px;
  color:#344054;
  font-size:14px;
  font-weight:400;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mayor-detail-buy{
  align-items:center;
  flex-direction:row;
  padding:12px;
  border-radius:16px;
}

.mayor-detail-buy strong{
  font-size:34px;
  font-weight:560;
}

.mayor-detail-buy span{
  margin-top:4px;
  font-size:14px;
}

.mayor-detail-buy .mayor-qty-control{
  width:auto;
  height:auto;
  gap:9px;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
}

.mayor-detail-buy .mayor-qty-control button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #111827;
  border-radius:999px;
  background:#fff;
  color:#111827;
  font-weight:300;
  line-height:1;
}

.mayor-detail-buy .mayor-qty-control button[data-detail-minus]{
  width:34px;
  height:34px;
  font-size:23px;
}

.mayor-detail-buy .mayor-qty-control button[data-detail-plus]{
  width:42px;
  height:42px;
  font-size:28px;
}

.mayor-detail-buy .mayor-qty-control output{
  min-width:24px;
  font-size:18px;
  font-weight:500;
}

.mayor-image-viewer{
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(8,13,24,.94);
}

.mayor-image-viewer[hidden]{
  display:none !important;
}

.mayor-image-viewer-close{
  position:absolute;
  top:calc(12px + env(safe-area-inset-top));
  right:14px;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border:1px solid rgba(255,255,255,.36);
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:30px;
  font-weight:300;
  line-height:1;
}

.mayor-image-viewer-stage{
  width:100%;
  height:100%;
  overflow:auto;
  padding:64px 12px 28px;
  touch-action:pinch-zoom pan-x pan-y;
  -webkit-overflow-scrolling:touch;
}

.mayor-image-viewer-stage img{
  display:block;
  width:100%;
  max-width:none;
  min-height:60vh;
  margin:auto;
  object-fit:contain;
  transform-origin:center center;
}

body.mayor-viewer-open{
  overflow:hidden;
}

@media (max-width:420px){
  .mayor-shell[data-view="detalle"] #view-detalle{
    padding-top:6px;
  }

  .mayor-detail-head{
    min-height:46px;
  }

  .mayor-detail-head span[data-detail-category]{
    font-size:17px;
  }

  .mayor-detail-image-card{
    min-height:310px;
    padding-top:10px;
  }

  .mayor-detail-body h1{
    font-size:22px;
  }

  .mayor-detail-tags{
    grid-template-columns:auto auto auto minmax(92px,1fr);
  }

  .mayor-detail-tags span{
    padding-left:8px;
    padding-right:8px;
    font-size:13px;
  }

  .mayor-detail-buy strong{
    font-size:32px;
  }

  .mayor-detail-buy .mayor-qty-control{
    gap:7px;
  }

  .mayor-detail-buy .mayor-qty-control button[data-detail-minus]{
    width:32px;
    height:32px;
    font-size:22px;
  }

  .mayor-detail-buy .mayor-qty-control button[data-detail-plus]{
    width:40px;
    height:40px;
    font-size:27px;
  }
}

/* Product/detail white background and detail interaction pass. */
.mayor-shell[data-view="productos"],
.mayor-shell[data-view="detalle"],
.mayor-shell[data-view="productos"] .mayor-main,
.mayor-shell[data-view="detalle"] .mayor-main,
.mayor-shell[data-view="productos"] #view-productos,
.mayor-shell[data-view="detalle"] #view-detalle{
  background:#fff;
}

.mayor-shell[data-view="detalle"]{
  padding-bottom:env(safe-area-inset-bottom);
}

.mayor-shell[data-view="detalle"] .mayor-bottom-nav{
  display:none !important;
}

.mayor-detail-view{
  will-change:transform;
}

.mayor-detail-view.is-dragging,
.mayor-detail-view.is-sliding{
  position:relative;
  z-index:5;
}

.mayor-detail-body h1{
  font-size:22px;
  font-weight:460;
}

.mayor-detail-buy span{
  font-size:14px;
  line-height:1.25;
}

.mayor-detail-buy .mayor-qty-control{
  gap:12px;
}

.mayor-detail-buy .mayor-qty-control button[data-detail-minus]{
  width:43px;
  height:43px;
  font-size:27px;
}

.mayor-detail-buy .mayor-qty-control button[data-detail-plus]{
  width:53px;
  height:53px;
  font-size:34px;
}

.mayor-detail-buy .mayor-qty-control output{
  min-width:30px;
}

@media (max-width:420px){
  .mayor-detail-body h1{
    font-size:20px;
  }

  .mayor-detail-buy .mayor-qty-control{
    gap:10px;
  }

  .mayor-detail-buy .mayor-qty-control button[data-detail-minus]{
    width:40px;
    height:40px;
    font-size:25px;
  }

  .mayor-detail-buy .mayor-qty-control button[data-detail-plus]{
    width:50px;
    height:50px;
    font-size:32px;
  }
}

/* Product-list quantity controls. */
.mayor-shell[data-view="productos"] .mayor-products-grid{
  margin-top:20px;
}

.mayor-product-image{
  position:relative;
}

.mayor-product-qty-badge{
  position:absolute;
  top:7px;
  left:7px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 7px;
  border:1px solid #111827;
  border-radius:999px;
  background:#fff;
  color:#111827;
  font-size:14px;
  font-weight:350;
  line-height:1;
}

.mayor-product-name{
  min-height:28px;
  height:28px;
  max-height:28px;
  display:-webkit-box;
  overflow:hidden;
  font-size:11px;
  line-height:1.18;
  font-weight:460;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.mayor-product-foot{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  min-width:0;
}

.mayor-product-price{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  color:#111827;
  font-size:19px;
  font-weight:560;
  line-height:1;
  white-space:nowrap;
}

.mayor-product-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
  gap:5px;
  min-width:0;
}

.mayor-product-add{
  flex:0 0 32px;
  width:32px;
  height:32px;
  font-size:22px;
}

.mayor-product-step{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 27px;
  width:27px;
  height:27px;
  border:1px solid #111827;
  border-radius:999px;
  background:#fff;
  color:#111827;
  font-size:19px;
  font-weight:300;
  line-height:1;
}

.mayor-product-qty-badge{
  border-color:#d92d20;
  background:#fff;
  color:#d92d20;
}

.mayor-detail-buy .mayor-qty-control output.has-qty{
  color:#d92d20;
}

.mayor-product-card.is-qty-shake{
  animation:mayorProductQtyShake 240ms ease;
}

@keyframes mayorProductQtyShake{
  0%,100%{transform:translate3d(0,0,0)}
  25%{transform:translate3d(-2px,0,0)}
  50%{transform:translate3d(2px,0,0)}
  75%{transform:translate3d(-1px,0,0)}
}

@media (max-width:420px){
  .mayor-shell[data-view="productos"] .mayor-products-grid{
    margin-top:18px;
  }

  .mayor-product-name{
    min-height:27px;
    height:27px;
    max-height:27px;
    display:-webkit-box;
    overflow:hidden;
    font-size:11px;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
  }

  .mayor-product-price{
    font-size:18px;
  }

  .mayor-product-qty-badge{
    min-width:26px;
    height:26px;
    font-size:13px;
  }

  .mayor-product-actions{
    gap:5px;
  }

  .mayor-product-add{
    flex-basis:30px;
    width:30px;
    height:30px;
    font-size:21px;
  }

  .mayor-product-step{
    flex-basis:26px;
    width:26px;
    height:26px;
    font-size:18px;
  }
}

/* Product detail fixed viewport and adaptive metadata row. */
html.mayor-view-detalle,
body.mayor-view-detalle{
  height:100%;
  overflow:hidden;
  overscroll-behavior:none;
  background:#fff;
}

body.mayor-view-detalle .mayor-shell{
  height:100dvh;
  min-height:100dvh;
  overflow:hidden;
}

body.mayor-view-detalle .mayor-main{
  height:100dvh;
  min-height:0;
  overflow:hidden;
}

body.mayor-view-detalle #view-detalle{
  height:100dvh;
  max-height:100dvh;
  overflow:hidden;
  touch-action:pan-x;
}

body.mayor-view-detalle .mayor-detail-view,
body.mayor-view-detalle .mayor-detail-body{
  touch-action:pan-x;
}

body.mayor-view-detalle .mayor-detail-tags{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:space-between;
  width:100%;
  gap:6px;
}

body.mayor-view-detalle .mayor-detail-tags span{
  flex:0 0 auto;
  width:auto;
  min-width:auto;
  max-width:none;
  padding:5px 8px;
}

body.mayor-view-detalle .mayor-detail-tags span[data-detail-tag="brand"]{
  text-align:left;
}

body.mayor-view-detalle .mayor-detail-tags span[data-detail-tag="barcode"]{
  text-align:right;
}

@media (max-width:420px){
  body.mayor-view-detalle .mayor-detail-tags{
    gap:5px;
  }

  body.mayor-view-detalle .mayor-detail-tags span{
    padding-right:7px;
    padding-left:7px;
    font-size:12px;
  }
}

/* Product detail framed meta and buy areas. */
body.mayor-view-detalle .mayor-detail-tags span{
  min-height:28px;
  padding:5px 8px;
  border:1px solid var(--mayor-line);
  border-radius:999px;
  background:#fff;
}

body.mayor-view-detalle .mayor-detail-buy{
  padding:12px;
  border:1px solid var(--mayor-line);
  border-radius:16px;
  background:#fff;
}

/* Product list hard two-line name clamp. */
.mayor-shell[data-view="productos"] .mayor-product-name,
.mayor-home-products .mayor-product-name{
  display:-webkit-box;
  height:26px;
  min-height:26px;
  max-height:26px;
  margin:6px 0 8px;
  overflow:hidden;
  color:#111827;
  font-size:11px;
  font-weight:460;
  line-height:13px;
  text-overflow:ellipsis;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
}

@media (max-width:420px){
  .mayor-shell[data-view="productos"] .mayor-product-name,
  .mayor-home-products .mayor-product-name{
    height:26px;
    min-height:26px;
    max-height:26px;
    font-size:11px;
    line-height:13px;
  }
}

/* Product detail square image and final list action sizing. */
body.mayor-view-detalle .mayor-detail-image-card{
  aspect-ratio:1 / 1;
  min-height:0;
  height:auto;
  align-items:center;
  justify-content:center;
  padding:10px 8px 30px;
}

body.mayor-view-detalle .mayor-detail-image-card img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

body.mayor-view-detalle .mayor-detail-tags{
  gap:5px;
}

body.mayor-view-detalle .mayor-detail-tags span{
  padding-right:10px;
  padding-left:10px;
}

.mayor-shell[data-view="productos"] .mayor-product-price,
.mayor-home-products .mayor-product-price{
  font-size:17px;
}

.mayor-shell[data-view="productos"] .mayor-product-add,
.mayor-home-products .mayor-product-add{
  flex-basis:40px;
  width:40px;
  height:40px;
  font-size:26px;
}

.mayor-shell[data-view="productos"] .mayor-product-step,
.mayor-home-products .mayor-product-step{
  flex-basis:34px;
  width:34px;
  height:34px;
  font-size:22px;
}

@media (max-width:420px){
  body.mayor-view-detalle .mayor-detail-tags span{
    padding-right:9px;
    padding-left:9px;
  }

  .mayor-shell[data-view="productos"] .mayor-product-price,
  .mayor-home-products .mayor-product-price{
    font-size:16px;
  }

  .mayor-shell[data-view="productos"] .mayor-product-add,
  .mayor-home-products .mayor-product-add{
    flex-basis:38px;
    width:38px;
    height:38px;
    font-size:25px;
  }

  .mayor-shell[data-view="productos"] .mayor-product-step,
  .mayor-home-products .mayor-product-step{
    flex-basis:33px;
    width:33px;
    height:33px;
    font-size:21px;
  }
}
