*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;color:#1f2937;background:#ffffff;line-height:1.6}

.shop-header{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:12px 20px;background:rgba(255,255,255,.75);backdrop-filter:blur(8px);border-bottom:1px solid #e5e7eb}
.logo{font-weight:700;color:#111827;text-decoration:none}
.shop-nav a{margin-left:16px;color:#374151;text-decoration:none;padding:6px 10px;border-radius:8px}
.shop-nav a.active,.shop-nav a:hover{background:#f3f4f6;color:#111827}
.badge{display:inline-block;min-width:20px;padding:2px 6px;margin-left:6px;border-radius:999px;background:#111827;color:#fff;font-size:12px;text-align:center}

.shop-container{max-width:1100px;margin:0 auto;padding:20px}
.shop-hero{display:flex;flex-direction:column;gap:10px;margin:10px 0 20px}
.shop-hero h1{font-size:clamp(1.6rem,3vw,2.2rem);line-height:1.2}
.shop-hero p{color:#6b7280}
.filters{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.input{border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px;min-width:200px;background:#fff}
.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;border-radius:10px;padding:10px 14px;background:#fff;color:#111827;text-decoration:none;cursor:pointer}
.btn.primary{background:#1a73e8;border-color:#1a73e8;color:#fff}
.btn:disabled{opacity:.6;cursor:not-allowed}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.card{border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.product-card{display:flex;flex-direction:column;overflow:hidden}
.product-image{aspect-ratio:4/3;background:#f3f4f6;display:block;width:100%;object-fit:cover}
.product-body{padding:12px}
.title{font-weight:600;margin-bottom:6px}
.muted{color:#6b7280;font-size:.95rem}
.price{font-weight:700}
.row{display:flex;justify-content:space-between;align-items:center;margin-top:10px}

.product-detail{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.product-hero{width:100%;aspect-ratio:4/3;border-radius:12px;border:1px solid #e5e7eb;object-fit:cover}
.back{display:inline-block;margin-bottom:16px;color:#374151;text-decoration:none}

.cart-layout{display:grid;grid-template-columns:2fr 1fr;gap:24px;margin-top:10px}
.cart-items{display:flex;flex-direction:column;gap:12px}
.cart-item{display:grid;grid-template-columns:96px 1fr auto;gap:12px;align-items:center;border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#fff}
.cart-thumb{width:96px;height:72px;object-fit:cover;border-radius:8px;background:#f3f4f6}
.qty{display:inline-flex;align-items:center;border:1px solid #e5e7eb;border-radius:10px}
.qty button{border:0;background:#fff;padding:8px 10px;cursor:pointer}
.qty input{width:42px;border:0;text-align:center}
.cart-summary{position:sticky;top:72px;display:flex;flex-direction:column;gap:10px;border:1px solid #e5e7eb;border-radius:12px;padding:14px;background:#fff;height:max-content}
.summary-line{display:flex;justify-content:space-between;color:#374151}
.summary-line.total{font-weight:700}

.checkout-grid{display:grid;grid-template-columns:2fr 1fr;gap:24px;margin-top:10px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
label{display:flex;flex-direction:column;gap:6px;color:#374151}
input{border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px}
.order-summary .order-items{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.success{border:1px solid #16a34a;background:#ecfdf5;color:#065f46;border-radius:12px;padding:16px;margin-top:16px}
.hidden{display:none}

.toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#111827;color:#fff;padding:10px 14px;border-radius:999px;box-shadow:0 10px 30px rgba(0,0,0,.2);opacity:0;pointer-events:none;transition:opacity .2s, transform .2s}
.toast.show{opacity:1;transform:translateX(-50%) translateY(-6px)}

@media (max-width: 900px){
  .product-detail{grid-template-columns:1fr}
  .cart-layout,.checkout-grid{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
}


