/* Goat Hub — store page + cart panel */

.store-banner{
  border-radius: var(--radius-sm); padding: 12px 18px; font-weight:600; font-size:.9rem;
  margin-bottom: 24px; background: #fbe9e2; color: var(--terracotta-dark); border: 1px solid #f0c6b3;
  text-align:center;
}

.store-empty{
  text-align:center; max-width:480px; margin:0 auto; padding: 40px 0;
}
.store-empty h2{ font-size:1.5rem; }

.store-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 26px;
}
.product-card{
  background:#fff; border-radius: var(--radius-md); overflow:hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display:flex; flex-direction:column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-card .thumb{
  aspect-ratio: 4/3; background: var(--cream-dark); overflow:hidden;
  display:flex; align-items:center; justify-content:center;
}
.product-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.product-card .body{ padding: 20px 20px 22px; display:flex; flex-direction:column; gap:8px; flex:1; }
.product-card .cat{ font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color: var(--terracotta); }
.product-card h3{ font-size:1.08rem; margin:0; }
.product-card p{ font-size:.88rem; margin:0; flex:1; }
.product-card .price-row{ display:flex; align-items:baseline; justify-content:space-between; margin-top:6px; }
.product-card .price{ font-family: var(--font-display); font-size:1.3rem; color: var(--forest-dark); }
.product-card .stock-note{ font-size:.76rem; color: var(--ink-soft); }
.product-card .stock-note.low{ color: var(--terracotta-dark); font-weight:700; }
.product-card .out-badge{
  display:inline-block; background: var(--ink); color:#fff; font-size:.7rem; font-weight:700;
  padding:3px 9px; border-radius:50px; text-transform:uppercase; letter-spacing:.04em;
}
.product-card .add-row{ display:flex; gap:8px; margin-top:10px; }
.product-card .qty-input{
  width:56px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  text-align:center; font-family: var(--font-body); font-size:.95rem; padding:8px 4px;
}
.product-card .add-row .btn{ flex:1; }

/* ---- cart overlay + panel ---- */
.cart-overlay{
  position: fixed; inset:0; background: rgba(28,46,38,.5); z-index: 1200;
}
.cart-panel{
  position: fixed; top:0; right:0; bottom:0; width: min(400px, 92vw);
  background:#fff; z-index: 1201; box-shadow: -12px 0 40px rgba(28,46,38,.25);
  display:flex; flex-direction:column;
  transform: translateX(0);
}
.cart-panel-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.cart-panel-head h3{ margin:0; font-size:1.2rem; }
.cart-panel-head button{ background:none; border:none; cursor:pointer; color: var(--ink); padding:4px; }
.cart-items{ flex:1; overflow-y:auto; padding: 16px 22px; display:flex; flex-direction:column; gap:16px; }
.cart-empty-msg{ padding: 40px 22px; text-align:center; color: var(--ink-soft); }
.cart-line{ display:flex; gap:12px; align-items:flex-start; }
.cart-line .thumb{
  width:56px; height:56px; border-radius: var(--radius-sm); background: var(--cream-dark);
  overflow:hidden; flex-shrink:0; display:flex; align-items:center; justify-content:center;
}
.cart-line .thumb img{ width:100%; height:100%; object-fit:cover; }
.cart-line .info{ flex:1; min-width:0; }
.cart-line .info h4{ margin:0 0 2px; font-size:.92rem; }
.cart-line .info .unit-price{ font-size:.8rem; color: var(--ink-soft); }
.cart-line .qty-row{ display:flex; align-items:center; gap:8px; margin-top:6px; }
.cart-line .qty-row button{
  width:24px; height:24px; border-radius:50%; border:1px solid var(--line); background:#fff;
  cursor:pointer; display:flex; align-items:center; justify-content:center; font-weight:700; color: var(--forest);
}
.cart-line .qty-row span{ min-width:20px; text-align:center; font-weight:600; font-size:.88rem; }
.cart-line .remove-btn{ background:none; border:none; color: var(--terracotta-dark); font-size:.78rem; font-weight:700; cursor:pointer; margin-top:4px; padding:0; }
.cart-line .line-total{ font-weight:700; color: var(--forest-dark); font-size:.9rem; white-space:nowrap; }

.cart-panel-foot{ border-top: 1px solid var(--line); padding: 18px 22px 22px; }
.cart-subtotal{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px; font-size:1rem; }
.cart-subtotal strong{ font-family: var(--font-display); font-size:1.3rem; color: var(--forest-dark); }

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