.market-topbar-inner{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 16px;
}

.market-header-logo{
  flex:0 1 auto;
  min-width:0;
  max-width:48%;
}

.market-header-actions{
  flex:1 1 auto;
  min-width:0;
  justify-content:flex-end;
}

.market-topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.market-cart-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 14px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  transition:border-color .18s ease, box-shadow .18s ease;
}

.market-cart-link:hover{
  border-color:#ef3d2f;
  box-shadow:0 0 0 3px rgba(239,61,47,.1);
}

.market-cart-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:#ef3d2f;
  color:#fff;
  font-size:12px;
  font-weight:800;
  line-height:1;
}

.market-cart-badge[hidden]{
  display:none !important;
}

.market-mobile-business-btn{
  display:none;
  align-items:center;
  gap:6px;
  min-height:38px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  text-decoration:none;
  font-size:12px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  flex-shrink:0;
  transition:border-color .18s ease, box-shadow .18s ease;
}

.market-mobile-business-btn:hover{
  border-color:#ef3d2f;
  box-shadow:0 0 0 3px rgba(239,61,47,.1);
  color:#111827;
}

.market-mobile-business-icon{
  font-size:14px;
  line-height:1;
}

.market-header-cabinet--desktop{
  display:inline-flex;
}

.product-buy-controls{
  display:grid;
  gap:8px;
  margin-top:8px;
}

.product-qty-row{
  display:grid;
  grid-template-columns:36px 1fr 36px;
  gap:6px;
  align-items:center;
}

.qty-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
  color:#111827;
  font-size:18px;
  font-weight:700;
  cursor:pointer;
}

.qty-btn:hover{
  border-color:#ef3d2f;
  color:#ef3d2f;
}

.qty-input{
  width:100%;
  height:36px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  text-align:center;
  font-size:14px;
  font-weight:700;
  color:#111827;
  background:#fafafa;
}

.product-buy-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  min-height:38px;
  border:none;
  border-radius:10px;
  background:#ef3d2f;
  color:#fff;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  transition:background .18s ease, transform .18s ease;
}

.product-buy-btn:hover{
  background:#d93628;
}

.product-buy-btn.is-success{
  background:#15803d;
}

.product-buy-btn:disabled{
  opacity:.75;
  cursor:wait;
}

.product-buy-btn-icon{
  font-size:15px;
  line-height:1;
}

.product-detail-buy{
  margin-top:12px;
}

.product-detail-buy .product-buy-controls{
  max-width:320px;
}

@media (max-width:767px){
  .market-topbar-inner,
  .market-header-flex{
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:8px 10px;
  }

  .market-header-logo,
  .market-brand,
  .market-brand-block{
    flex:0 1 auto;
    min-width:0;
    max-width:48%;
  }

  .market-brand-block .market-header-logo,
  .market-brand-block .market-brand{
    max-width:100%;
  }

  .market-brand img,
  .market-header-logo img{
    height:24px !important;
    width:auto !important;
    max-width:100%;
  }

  .market-header-actions,
  .market-topbar-actions{
    flex:1 1 auto;
    min-width:0;
    justify-content:flex-end;
    gap:6px;
    flex-wrap:nowrap;
  }

  .market-cart-label,
  .seller-cabinet-label{
    display:none;
  }

  .market-cart-link{
    min-height:32px;
    padding:6px 8px;
    font-size:12px;
    gap:4px;
  }

  .market-mobile-business-btn{
    display:inline-flex;
    min-height:32px;
    min-width:32px;
    padding:6px 8px;
    justify-content:center;
    gap:0;
  }

  .market-mobile-business-icon{
    font-size:14px;
    line-height:1;
  }

  .market-header-cabinet--desktop{
    display:none !important;
  }

  .seller-cabinet-btn,
  .market-header-cabinet{
    padding:6px 8px !important;
    font-size:12px !important;
    gap:4px !important;
    min-height:32px;
  }

  .topbar-inner{
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:8px 10px !important;
  }

  .topbar-inner .brand{
    flex:0 1 auto;
    min-width:0;
    max-width:42%;
  }

  .topbar-inner .brand img{
    width:auto !important;
    max-width:100% !important;
    height:24px !important;
    margin:0 !important;
  }

  .topbar-inner .market-cart-link span:not(.market-cart-badge):not(.market-cart-icon){
    display:none;
  }
}
