/* Helpful Products shop. Loads on top of styles.css. */
.shop-intro { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }

/* Cart icon in nav */
.cart-link { position: relative; font-size: 1.3rem; text-decoration: none; margin-left: .4rem; line-height: 1; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }

/* Category filter */
.cat-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 28px; }
.cat { font-size: .88rem; font-weight: 600; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); cursor: pointer; }
.cat.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Product grid */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1000px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .prod-grid { grid-template-columns: 1fr; } }
.prod-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.prod-card:hover { box-shadow: var(--sh); transform: translateY(-3px); }
.prod-card .pc-img { position: relative; aspect-ratio: 1/1; background: var(--sage); display: block; overflow: hidden; }
.prod-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-card .oos { position: absolute; top: 10px; left: 10px; background: rgba(26,36,32,.82); color: #fff; font-size: .72rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; }
.prod-card .pc-b { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.prod-card .pc-name { font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.prod-card .pc-name:hover { color: var(--brand); }
.prod-card .pc-tag { font-size: .86rem; color: var(--muted); margin: 0; line-height: 1.4; }
.prod-card .pc-foot { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.pc-price { font-weight: 700; color: var(--ink); font-size: 1rem; }
.was { color: var(--muted); text-decoration: line-through; font-weight: 500; font-size: .85rem; margin-left: .3rem; }

/* Product detail */
.prod-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; margin-top: 10px; }
@media (max-width: 820px) { .prod-detail { grid-template-columns: 1fr; gap: 26px; } }
.pd-img { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--sage); aspect-ratio: 1/1; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: .3rem 0 .2rem; }
.pd-tag { font-size: 1.08rem; color: var(--muted); margin: .2rem 0 0; }
.pd-price { font-size: 1.6rem; font-weight: 700; color: var(--brand); margin: 1rem 0; }
.pd-desc { color: var(--ink); font-size: 1.02rem; line-height: 1.7; margin-bottom: 1.4rem; }
.pd-buy { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.qty button { width: 40px; height: 44px; border: none; background: #fff; font-size: 1.2rem; cursor: pointer; color: var(--brand); }
.qty input { width: 46px; height: 44px; border: none; text-align: center; font-family: var(--body); font-size: 1rem; }
.pd-cart-link { display: inline-block; margin-top: .2rem; font-weight: 600; color: var(--brand); font-size: .95rem; }
.pd-cod { margin-top: 1.4rem; font-size: .9rem; color: var(--muted); background: var(--sage); padding: .8rem 1rem; border-radius: var(--r-sm); }
.oos-note { color: #b4524d; font-weight: 600; }

/* Cart + checkout */
.cart-layout { display: grid; grid-template-columns: 1.4fr .9fr; gap: 30px; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 66px 1fr auto auto auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.cart-item img { width: 66px; height: 66px; object-fit: cover; border-radius: 10px; background: var(--sage); }
.ci-info b { display: block; font-size: .98rem; }
.ci-info span { font-size: .85rem; color: var(--muted); }
.ci-qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; }
.ci-qty button { width: 30px; height: 32px; border: none; background: #fff; cursor: pointer; color: var(--brand); font-size: 1rem; }
.ci-qty span { min-width: 26px; text-align: center; font-weight: 600; font-size: .9rem; }
.ci-line { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.ci-rm { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.ci-rm:hover { color: #b4524d; }
.cart-empty { padding: 40px 20px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.checkout { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm); position: sticky; top: 90px; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.co-total b { font-size: 1.4rem; color: var(--brand); font-family: var(--display); }
.checkout h3 { font-size: 1.1rem; margin: 0 0 .6rem; }
.checkout label { display: block; font-size: .84rem; font-weight: 600; margin: 10px 0 4px; color: var(--ink); }
.checkout input, .checkout textarea { width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); font-family: var(--body); font-size: .95rem; background: #fcfdfc; }
.checkout input:focus, .checkout textarea:focus { outline: none; border-color: var(--brand); }
.co-note { font-size: .82rem; color: var(--muted); text-align: center; margin: .8rem 0 0; }

/* Order confirmation */
.order-done { max-width: 540px; margin: 60px auto; text-align: center; padding: 0 20px; }
.od-check { width: 64px; height: 64px; border-radius: 50%; background: #1FA855; color: #fff; font-size: 2rem; display: grid; place-items: center; margin: 0 auto 20px; }
.order-done h1 { font-size: 2rem; }
.order-done p { color: var(--muted); font-size: 1.08rem; margin: .6rem 0 1.6rem; }

/* In-article recommended product card */
.pc-rec { display: flex; gap: 14px; align-items: center; margin-top: 1.2rem; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; text-decoration: none; color: var(--ink); transition: box-shadow .2s; }
.pc-rec:hover { box-shadow: var(--sh-sm); }
.pc-rec img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; background: var(--sage); flex: none; }
.pc-rec .rec-b { flex: 1; min-width: 0; }
.pc-rec .rec-lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-500); }
.pc-rec .rec-name { font-weight: 700; display: block; }
.pc-rec .rec-price { color: var(--brand); font-weight: 700; font-size: .92rem; }
.pc-rec .rec-go { color: var(--brand); font-weight: 600; flex: none; font-size: .9rem; }

.shop-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.shop-empty h2 { color: var(--ink); }

/* Toast */
.shop-toast { position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; font-size: .9rem; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.shop-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
