.pos-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:20px;
  align-items:start;
}

.pos-main{
  display:grid;
  gap:18px;
  min-width:0;
}

.search-bar{
  display:flex;
  gap:12px;
  min-width:0;
}

.search-bar input{
  flex:1;
  min-width:0;
}

.category-row{
  display:flex;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
  min-width:0;
  padding:2px 2px 10px;
  scrollbar-width:thin;
  scrollbar-color:#bddac8 #edf7f0;
}

.category-row::-webkit-scrollbar{
  height:8px;
}

.category-row::-webkit-scrollbar-track{
  background:#edf7f0;
  border-radius:999px;
}

.category-row::-webkit-scrollbar-thumb{
  background:#bddac8;
  border-radius:999px;
}

.category-pill{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:56px;
  padding:0 16px;
  border-radius:18px;
  background:rgba(255,255,255,0.94);
  border:1px solid var(--line);
  font-weight:700;
  color:var(--muted);
  text-align:center;
  white-space:nowrap;
  box-shadow:0 8px 18px rgba(86,150,109,.06);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease,background .18s ease;
}

.category-pill:hover{
  transform:translateY(-1px);
  border-color:#b7dcc4;
  box-shadow:0 12px 22px rgba(86,150,109,.10);
  color:var(--accent-dark);
}

.category-pill.active{
  background:linear-gradient(180deg,#f7fcf8 0%,#eef9f1 100%);
  color:var(--accent-dark);
  border-color:#b7dcc4;
  box-shadow:0 14px 24px rgba(107,191,143,.13);
}

.category-pill-icon{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:12px;
  background:#f3fbf5;
  border:1px solid #d7ecdd;
  font-size:18px;
  line-height:1;
  flex:0 0 32px;
}

.category-pill.active .category-pill-icon{
  background:#fff;
  border-color:#bddfca;
}

.category-pill-label{
  display:block;
  font-size:14px;
  line-height:1;
}

.product-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:18px;
  align-items:start;
}

.product-card{
  overflow:hidden;
}

.product-visual{
  height:132px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:22px;
  background:linear-gradient(135deg,#f4fcf6 0%,#e4f6e8 100%);
  border-bottom:1px solid #d8eadc;
}

.product-avatar{
  width:64px;
  height:64px;
  border-radius:20px;
  display:grid;
  place-items:center;
  font-size:28px;
  font-weight:800;
  color:var(--accent-dark);
  background:#ffffff;
  border:1px solid #d8eadc;
  box-shadow:0 10px 20px rgba(86,150,109,.08);
}

.product-tag{
  padding:8px 12px;
  border-radius:999px;
  background:#ffffff;
  color:var(--accent-dark);
  border:1px solid #d8eadc;
  font-size:13px;
  font-weight:700;
}

.product-copy{
  padding:16px;
  display:grid;
  gap:10px;
}

.product-copy p{
  color:var(--muted);
  font-size:14px;
  min-height:40px;
}

.product-meta{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
}

.product-meta strong{
  font-size:22px;
}

.cart-panel{
  padding:22px;
  height:fit-content;
  position:sticky;
  top:24px;
  z-index:2;
}

.cart-panel h2{
  font-size:28px;
  margin-bottom:14px;
}

.cart-items{
  display:grid;
  gap:12px;
  max-height:330px;
  overflow:auto;
  padding-right:4px;
}

.cart-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  background:var(--soft);
  border-radius:18px;
}

.cart-item span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-top:4px;
}

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

.qty-actions button{
  width:28px;
  height:28px;
  border:none;
  border-radius:50%;
  background:#fff;
  color:var(--accent-dark);
  cursor:pointer;
}

.cart-totals{
  display:grid;
  gap:12px;
  padding:18px 0;
  border-top:1px dashed var(--line);
  border-bottom:1px dashed var(--line);
  margin:18px 0;
}

.cart-totals div{
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.cart-totals .grand strong,
.cart-totals .grand span{
  font-size:22px;
  font-weight:800;
}

.checkout-form{
  display:grid;
  gap:14px;
}

.checkout-form label{
  display:grid;
  gap:8px;
  font-weight:600;
}


.form-split{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

@media (max-width: 720px){
  .form-split{
    grid-template-columns:1fr;
  }
}


.appointment-datetime-row{
  align-items:end;
}

.appointment-datetime-row label{
  min-width:0;
}

.appointment-datetime-row input[type="date"],
.appointment-datetime-row input[type="time"]{
  min-width:0;
}
