*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:#f5f8fc;color:#111827}.header{min-height:76px;display:flex;align-items:center;gap:28px;padding:14px 28px;background:#fff;border-bottom:1px solid #e6edf7;position:sticky;top:0;z-index:10}.logo{display:flex;align-items:center;gap:10px;min-width:250px}.logo img{width:36px;height:36px}.logo strong{display:block;color:#0b63f6;font-size:22px;line-height:1}.logo span{display:block;font-size:10px;color:#667085;text-transform:uppercase;margin-top:3px}.menu{display:flex;gap:20px;flex:1}.menu a{color:#111827;text-decoration:none;font-size:14px;font-weight:700}.search{width:340px;padding:12px 14px;border:1px solid #d5deeb;border-radius:10px;outline:none}.page{display:grid;grid-template-columns:280px 1fr;gap:24px;padding:24px 28px}.sidebar{background:#fff;border:1px solid #e6edf7;border-radius:18px;padding:18px;align-self:start;position:sticky;top:100px}.sidebar h3{margin:0 0 12px;font-size:14px;text-transform:uppercase}.sidebar label{display:flex;align-items:center;gap:8px;margin:9px 0;font-size:14px;cursor:pointer}.filter-row{display:flex;justify-content:space-between;gap:10px}.count{color:#667085}.hero{display:grid;grid-template-columns:1fr 420px;gap:32px;background:#fff;border:1px solid #e6edf7;border-radius:24px;padding:36px;margin-bottom:22px;overflow:hidden}.hero h1{max-width:720px;font-size:44px;line-height:1.1;margin:0 0 16px}.hero p{color:#475467;font-size:18px;margin:0;max-width:720px}.hero img{width:100%;object-fit:contain}.stats{display:flex;gap:18px;margin-top:30px;flex-wrap:wrap}.stats div{background:#f4f8ff;border:1px solid #e0ebff;border-radius:16px;padding:14px 18px;min-width:170px}.stats strong{display:block;color:#0b63f6;font-size:28px}.stats span{color:#667085;font-size:13px}.toolbar{display:flex;align-items:center;justify-content:space-between;margin:6px 0 16px}.toolbar h2{margin:0}button{background:#0b63f6;color:#fff;border:0;border-radius:10px;padding:11px 16px;font-weight:700;cursor:pointer}.status{color:#667085;margin-bottom:14px}.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:18px}.card{background:#fff;border:1px solid #e6edf7;border-radius:20px;padding:14px;box-shadow:0 10px 24px rgba(16,24,40,.04);display:flex;flex-direction:column;transition:.2s}.card:hover{transform:translateY(-3px);box-shadow:0 16px 34px rgba(16,24,40,.08)}.product-img{height:170px;background:#f4f7fb;border-radius:16px;display:flex;align-items:center;justify-content:center;margin-bottom:16px;overflow:hidden}.product-img img{width:100%;height:100%;object-fit:cover}.card-type{color:#0b63f6;font-size:12px;font-weight:800;text-transform:uppercase;margin-bottom:8px;letter-spacing:.03em}.card h3{margin:0 0 18px;font-size:20px;line-height:1.25;min-height:50px}.shop-row{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-top:auto}.stock span,.price-wrap span{display:block;color:#667085;font-size:13px;margin-bottom:4px}.stock strong{font-size:18px;color:#15803d}.price{font-size:22px;color:#0b63f6}.request-btn{margin-top:16px;width:100%;padding:13px}.error{background:#fff1f1;border:1px solid #fecaca;color:#991b1b;padding:14px;border-radius:12px}@media(max-width:1100px){.page{grid-template-columns:1fr}.sidebar{position:static}.hero{grid-template-columns:1fr}.menu{display:none}.search{width:100%}}@media(max-width:700px){.header{flex-wrap:wrap}.hero h1{font-size:34px}.page{padding:16px}}

/* Hard mobile layout fix */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

.header,
.page,
.sidebar,
main,
.products,
.card,
.product-img,
.toolbar,
.hero {
  min-width: 0;
  max-width: 100%;
}
.request-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.request-modal.active {
  display: flex;
}

.request-box {
  background: #fff;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border-radius: 18px;
  position: relative;
}

.request-box input {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.request-box button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.request-close {
  position: absolute;
  right: 12px;
  top: 8px;
  width: auto !important;
  background: none;
  font-size: 24px;
}

@media (max-width: 760px) {
  body {
    background: #f5f8fc;
  }

  .header {
    position: static !important;
    width: 100%;
    display: block;
    padding: 18px 16px 14px;
    border-bottom: 1px solid #e6edf7;
  }

  .logo {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
  }

  .logo img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .logo strong {
    font-size: 28px;
    line-height: 1;
  }

  .logo span {
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
  }

  .menu {
    display: none !important;
  }

  .search {
    width: 100% !important;
    max-width: 100%;
    display: block;
    font-size: 16px;
    padding: 15px 16px;
    border-radius: 14px;
  }

  .page {
    display: block !important;
    width: 100%;
    padding: 14px 12px 28px !important;
  }

  .sidebar {
    display: none !important;
  }

  main {
    width: 100%;
    display: block;
  }

  .hero {
    display: none !important;
  }

  .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 12px 0 12px;
  }

  .toolbar h2 {
    font-size: 20px;
    line-height: 1.2;
  }

  .toolbar button {
    white-space: nowrap;
    padding: 10px 12px;
  }

  .status {
    margin: 0 0 12px;
    font-size: 14px;
  }

  .products {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    padding: 14px !important;
    margin: 0 !important;
    border-radius: 18px;
    overflow: visible !important;
  }

  .product-img {
    width: 100% !important;
    height: 165px !important;
    min-height: 165px;
    max-height: 165px;
    margin: 0 0 14px !important;
    overflow: hidden !important;
    border-radius: 16px;
  }

  .product-img img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
  }

  .card-type {
    font-size: 12px;
    line-height: 1.2;
    margin: 0 0 8px !important;
  }

  .card h3 {
    width: 100%;
    min-height: 0 !important;
    font-size: 23px !important;
    line-height: 1.18 !important;
    margin: 0 0 24px !important;
    overflow: visible !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .shop-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin: 0 !important;
  }

  .stock,
  .price-wrap {
    min-width: 0;
  }

  .stock span,
  .price-wrap span {
    font-size: 15px;
    line-height: 1.2;
  }

  .stock strong,
  .price {
    font-size: 28px !important;
    line-height: 1.1;
  }

  .request-btn {
    width: 100% !important;
    display: block;
    margin-top: 16px !important;
    padding: 15px 16px !important;
    border-radius: 14px;
    font-size: 16px;
  }
}



/* FINAL MOBILE OVERRIDE — keep this at the very end */
@media screen and (max-width: 760px) {
  body {
    overflow-x: hidden !important;
  }

  .header {
    position: static !important;
    display: block !important;
    padding: 18px 16px 14px !important;
  }

  .logo {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 18px !important;
  }

  .menu {
    display: none !important;
  }

  .search {
    width: 100% !important;
    max-width: 100% !important;
  }

  .page {
    display: block !important;
    padding: 14px 12px 28px !important;
  }

  main {
    display: block !important;
    width: 100% !important;
  }

  .hero {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 22px 18px !important;
    margin: 0 0 18px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
  }

  .hero > div {
    display: block !important;
  }

  .hero h1 {
    display: block !important;
    font-size: 30px !important;
    line-height: 1.12 !important;
    margin: 0 0 12px !important;
  }

  .hero p {
    display: block !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }

  .hero img {
    display: none !important;
  }

  .stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 18px !important;
  }

  .stats div {
    display: block !important;
    min-width: 0 !important;
    padding: 12px !important;
  }

  .stats strong {
    font-size: 24px !important;
  }

  .stats span {
    font-size: 12px !important;
  }

  .sidebar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px !important;
    margin: 0 0 18px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
  }

  .sidebar h3 {
    display: block !important;
    font-size: 15px !important;
    margin: 0 0 12px !important;
  }

  #categoryFilters {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 4px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #categoryFilters .filter-row {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #f4f8ff !important;
    border: 1px solid #dbe8ff !important;
    border-radius: 999px !important;
    padding: 9px 12px !important;
    white-space: nowrap !important;
    font-size: 13px !important;
  }

  #categoryFilters .filter-row input {
    display: none !important;
  }

  #categoryFilters .filter-row:has(input:checked) {
    background: #0b63f6 !important;
    color: #ffffff !important;
    border-color: #0b63f6 !important;
  }

  #categoryFilters .filter-row:has(input:checked) .count {
    color: #ffffff !important;
  }

  .toolbar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 14px !important;
  }

  .toolbar h2 {
    display: block !important;
    font-size: 24px !important;
    font-weight: 800 !important;
  }

  .products {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 16px !important;
  }
}


/* Header like marketplace */
.header{display:none!important}
.top-header{background:#fff;border-bottom:1px solid #e6edf7;position:sticky;top:0;z-index:50;padding:12px 20px}
.brand-row{display:flex;align-items:center;margin-bottom:12px}
.shopbar{display:flex;align-items:center;gap:16px}
.catalog-btn{height:44px;background:#fff;color:#0094e8;border:2px solid #00a7f5;border-radius:8px;padding:0 22px;font-size:16px;font-weight:800;display:flex;align-items:center;gap:10px;white-space:nowrap}
.grid-icon{font-size:24px;line-height:1}
.search-wrap{position:relative;flex:1;min-width:260px}
.search-wrap .search{width:100%;height:44px;background:#f8fafc;border:1px solid #d9e2ef;border-radius:8px;padding:0 52px 0 22px;font-size:15px}
.search-icon{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:30px;color:#111827;line-height:1}
.top-link,.top-phone{color:#111827;text-decoration:underline;font-weight:800;white-space:nowrap}
.icon-btn{position:relative;background:#fff;color:#111827;border:0;font-size:24px;padding:6px 8px;border-radius:8px}
.counter{position:absolute;right:-4px;top:-2px;background:#98a2b3;color:white;border-radius:50%;font-size:11px;min-width:18px;height:18px;display:flex;align-items:center;justify-content:center}
.counter.active{background:#ef4444}
.card .request-btn{background:#0b63f6}
.added{background:#15803d!important}

.cart-panel{position:fixed;right:20px;top:120px;width:380px;max-width:calc(100vw - 40px);max-height:calc(100vh - 150px);background:#fff;border:1px solid #dbe5f2;border-radius:20px;box-shadow:0 24px 60px rgba(15,23,42,.18);z-index:100;display:none;overflow:hidden}
.cart-panel.open{display:block}
.cart-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #edf2f7}
.cart-head h3{margin:0;font-size:20px}
.cart-head button{background:#f1f5f9;color:#111827;border-radius:10px;font-size:22px;padding:4px 12px}
.cart-items{max-height:420px;overflow:auto;padding:12px}
.cart-item{display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px;border:1px solid #eef2f7;border-radius:14px;margin-bottom:10px}
.cart-title{font-weight:800}
.cart-meta{font-size:13px;color:#667085;margin-top:4px}
.qty{display:flex;align-items:center;gap:8px}
.qty button{padding:4px 9px;border-radius:8px}
.remove{background:#fff1f1!important;color:#b91c1c!important}
.cart-footer{padding:14px;border-top:1px solid #edf2f7;display:grid;gap:10px}
.clear-cart{background:#f1f5f9!important;color:#111827!important}

@media(max-width:760px){
  .top-header{position:static;padding:18px 16px 14px}
  .brand-row{margin-bottom:18px}
  .shopbar{display:grid;grid-template-columns:1fr;gap:12px}
  .catalog-btn{width:100%;justify-content:center}
  .search-wrap{min-width:0;width:100%}
  .top-link,.top-phone,.icon-btn:not(.cart-toggle){display:none}
  .cart-toggle{position:fixed;right:16px;bottom:16px;background:#0b63f6!important;color:#fff!important;width:58px;height:58px;border-radius:50%;box-shadow:0 12px 30px rgba(11,99,246,.35);z-index:120}
  .cart-panel{left:12px;right:12px;top:auto;bottom:88px;width:auto;max-width:none;max-height:70vh;border-radius:18px}
  .cart-items{max-height:45vh}
}


/* Sticky desktop header + filters */
@media (min-width: 761px) {
  .top-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  }

  .sidebar {
    position: sticky !important;
    top: 118px !important;
    max-height: calc(100vh - 140px) !important;
    overflow-y: auto !important;
  }

  .cart-panel {
    top: 132px !important;
  }
}


/* Compact desktop header like reference */
@media (min-width: 761px) {
  .top-header.compact-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 6px 12px !important;
    display: grid !important;
    grid-template-columns: 230px 180px 1fr 52px !important;
    align-items: center !important;
    gap: 12px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e6edf7 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
  }

  .brand-row,
  .shopbar {
    display: contents !important;
  }

  .compact-logo {
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    gap: 8px !important;
  }

  .compact-logo img {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }

  .compact-logo strong {
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .compact-logo span {
    font-size: 9px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .catalog-btn {
    height: 38px !important;
    padding: 0 16px !important;
    border-radius: 7px !important;
    font-size: 15px !important;
    justify-content: center !important;
  }

  .grid-icon {
    font-size: 18px !important;
  }

  .search-wrap {
    width: 100% !important;
    min-width: 0 !important;
  }

  .search-wrap .search {
    height: 38px !important;
    border-radius: 6px !important;
    padding: 0 44px 0 18px !important;
    font-size: 14px !important;
  }

  .search-icon {
    right: 12px !important;
    font-size: 24px !important;
  }

  .top-link,
  .top-phone,
  .icon-btn:not(.cart-toggle) {
    display: none !important;
  }

  .cart-toggle {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 21px !important;
    background: #ffffff !important;
  }

  .cart-toggle .counter {
    right: -2px !important;
    top: -2px !important;
  }

  .sidebar {
    top: 76px !important;
    max-height: calc(100vh - 92px) !important;
  }

  .cart-panel {
    top: 76px !important;
  }
}

/* Mobile keeps previous layout */
@media (max-width: 760px) {
  .top-header.compact-header {
    display: block !important;
  }

  .compact-logo {
    margin-bottom: 18px !important;
  }
}


@media (min-width: 761px) {
  .top-header.compact-header {
    grid-template-columns: 260px 190px minmax(320px, 1fr) 52px !important;
    gap: 18px !important;
    padding: 6px 16px !important;
  }

  .compact-logo {
    padding-right: 8px !important;
  }

  .search-wrap {
    max-width: 1400px !important;
  }
}


/* Mobile spacing between catalog button and search */
@media (max-width: 760px) {
  .catalog-btn {
    margin-bottom: 14px !important;
  }

  .search-wrap {
    margin-top: 6px !important;
  }
}


/* Light add-to-cart button */
.request-btn {
  width: auto !important;
  min-width: 46px !important;
  height: 42px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #0094e8 !important;
  border: 1.5px solid #0094e8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
  margin-top: 16px !important;
}

.request-btn::before {
  content: "🛍";
  font-size: 20px;
  line-height: 1;
}

.request-btn.added {
  background: #41b833 !important;
  color: #ffffff !important;
  border-color: #41b833 !important;
}

.request-btn.added::before {
  content: "✓";
  font-size: 20px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .request-btn {
    width: 46px !important;
    height: 42px !important;
    padding: 0 !important;
  }
}


/* Cart button: right-bottom, light with glow */
.card {
  position: relative !important;
}

.shop-row {
  margin-bottom: 8px !important;
}

.request-btn {
  align-self: flex-end !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  margin-top: 14px !important;
  width: 46px !important;
  min-width: 46px !important;
  height: 42px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #0094e8 !important;
  border: 1.5px solid #0094e8 !important;
  box-shadow: 0 8px 20px rgba(0, 148, 232, 0.16) !important;
}

.request-btn:hover {
  background: #f0f9ff !important;
  box-shadow: 0 10px 24px rgba(0, 148, 232, 0.24) !important;
}

.request-btn.added {
  background: #41b833 !important;
  border-color: #41b833 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(65, 184, 51, 0.28) !important;
}

.request-btn.added:hover {
  background: #36a82c !important;
  box-shadow: 0 12px 28px rgba(65, 184, 51, 0.34) !important;
}

@media (max-width: 760px) {
  .request-btn {
    align-self: flex-end !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}


/* Final cart button style from mockup */
.request-btn {
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  padding: 0 !important;
  margin-top: 16px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  align-self: flex-end !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  border: 1.5px solid #0077ff !important;
  color: #0077ff !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
}

.request-btn::before {
  content: "" !important;
  width: 26px !important;
  height: 26px !important;
  display: block !important;
  background-color: #0077ff !important;
  -webkit-mask: url("../images/bag-icon.svg") center / contain no-repeat !important;
  mask: url("../images/bag-icon.svg") center / contain no-repeat !important;
}

.request-btn:hover {
  background: #f5fbff !important;
  border-color: #0077ff !important;
  box-shadow: 0 6px 18px rgba(0, 119, 255, 0.12) !important;
}

.request-btn.added {
  background: #41b833 !important;
  border-color: #41b833 !important;
  color: #ffffff !important;
}

.request-btn.added::before {
  background-color: #ffffff !important;
}

.request-btn.added:hover {
  background: #36a82c !important;
  border-color: #36a82c !important;
}

@media (max-width: 760px) {
  .request-btn {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
  }
}
