/*
 * Shop/cart/checkout/account styles — reuses design tokens (colors, radii,
 * spacing) from the :root variables defined/rendered via css/styles.css,
 * and the .blog-grid/.blog-card/.pagination patterns from css/blog.css for
 * the product grid + pager. Loaded as an extra stylesheet on shop/cart/
 * checkout/account routes (see Router/index.php).
 */

/* Two-column layout: sidebar (categories/tags/price filter) + product grid */
.shop-layout{display:grid;grid-template-columns:260px 1fr;gap:32px;max-width:var(--maxw);margin:0 auto;padding:50px 24px 20px;align-items:start}
.shop-layout .blog-grid{padding:0;max-width:none;margin:0}
.shop-layout .pagination{padding:20px 0 70px}

.shop-sidebar{display:flex;flex-direction:column;gap:28px;background:var(--card);border:1px solid var(--border);border-radius:var(--r-card);padding:22px}
.shop-sidebar h3{font-size:.92rem;font-weight:600;margin-bottom:12px}

.cat-tree,.cat-tree ul{list-style:none;display:flex;flex-direction:column;gap:6px}
.cat-tree ul{padding-inline-start:16px;margin-top:6px}
.cat-tree a{color:var(--muted);font-size:.9rem;transition:color .2s}
.cat-tree a:hover{color:var(--text)}
.cat-tree a.active{color:var(--cyan);font-weight:600}

.tag-pills{display:flex;flex-wrap:wrap;gap:8px}
.tag-pill{font-size:.78rem;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:5px 13px;transition:color .2s,border-color .2s}
.tag-pill:hover{color:var(--cyan);border-color:var(--cyan)}
.tag-pill.active{background:var(--cyan);color:#04121a;border-color:var(--cyan)}

.price-filter-form{display:flex;flex-direction:column;gap:10px}
.price-filter-form .price-row{display:flex;gap:8px}
.price-filter-form input{width:100%;background:var(--card2);border:1px solid var(--border);border-radius:var(--r-btn);color:var(--text);padding:9px 10px;font-size:.85rem}

/* Product card additions, layered on top of .blog-card */
.blog-card .product-price{margin-top:12px;font-weight:700;color:var(--cyan);direction:ltr;text-align:right}
.blog-card .product-price .original{text-decoration:line-through;color:var(--muted);font-weight:400;margin-inline-end:8px;font-size:.85em}
.blog-card .product-badge{position:absolute;top:12px;inset-inline-start:12px;background:var(--orange);color:#fff;font-size:.72rem;font-weight:700;padding:3px 10px;border-radius:999px}
.blog-card{position:relative}

/* Single product page */
.product-page{max-width:var(--maxw);margin:0 auto;padding:calc(var(--nav-h) + 40px) 24px 80px;display:grid;grid-template-columns:1fr 1fr;gap:40px}
.product-gallery img{width:100%;border-radius:var(--r-card);display:block;margin-bottom:12px}
.product-info .breadcrumbs{font-size:.82rem;color:var(--muted);margin-bottom:14px}
.product-info .breadcrumbs a{color:var(--muted)} .product-info .breadcrumbs a:hover{color:var(--cyan)}
.product-info h1{font-size:clamp(1.6rem,3.5vw,2.2rem);font-weight:700;letter-spacing:-.3px}
.product-info .price{margin-top:16px;font-size:1.5rem;font-weight:700;color:var(--cyan);direction:ltr;text-align:right}
.product-info .price .original{text-decoration:line-through;color:var(--muted);font-weight:400;margin-inline-end:10px;font-size:.7em}
.product-info .excerpt{margin-top:16px;color:var(--muted);font-weight:300;line-height:1.8}
.product-info .content{margin-top:20px;font-weight:300;line-height:1.9}
.product-files-list{margin-top:20px;display:flex;flex-direction:column;gap:8px}
.product-files-list .file-row{display:flex;align-items:center;gap:8px;font-size:.88rem;color:var(--muted);border:1px solid var(--border);border-radius:var(--r-btn);padding:10px 14px}
.product-info .tags{margin-top:20px;display:flex;gap:8px;flex-wrap:wrap}
.product-info .tags .tag{font-size:.78rem;color:var(--cyan);border:1px solid var(--border);border-radius:999px;padding:5px 14px}
.product-buy-form{margin-top:26px;display:flex;gap:12px;align-items:center}
.product-buy-form input[type=number]{width:80px;background:var(--card2);border:1px solid var(--border);border-radius:var(--r-btn);color:var(--text);padding:11px 10px;text-align:center}

@media(max-width:860px){
  .shop-layout{grid-template-columns:1fr}
  .product-page{grid-template-columns:1fr}
}

/* Cart page */
.cart-page{max-width:var(--maxw);margin:0 auto;padding:calc(var(--nav-h) + 40px) 24px 80px}
.cart-table .product-cell{display:flex;align-items:center;gap:10px}
.cart-table .product-cell img{width:48px;height:48px;object-fit:cover;border-radius:8px;background:var(--card2)}
.cart-table .qty-form{display:flex;gap:6px;align-items:center}
.cart-table .qty-form input{width:60px;background:var(--card2);border:1px solid var(--border);border-radius:var(--r-btn);color:var(--text);padding:6px 8px;text-align:center}
.cart-summary{margin-top:24px;display:flex;justify-content:flex-end;align-items:center;gap:20px}
.cart-summary .cart-total{font-size:1.2rem;font-weight:700;color:var(--cyan)}
.cart-empty{color:var(--muted);padding:40px 0;text-align:center}

/* Checkout */
.checkout-page{max-width:760px;margin:0 auto;padding:calc(var(--nav-h) + 40px) 24px 80px}
.checkout-steps{display:flex;gap:10px;margin-bottom:30px;font-size:.85rem;color:var(--muted)}
.checkout-steps span{padding:6px 14px;border-radius:999px;border:1px solid var(--border)}
.checkout-steps span.active{color:var(--cyan);border-color:var(--cyan)}
.checkout-summary{border:1px solid var(--border);border-radius:var(--r-card);padding:20px;margin-bottom:24px}
.checkout-summary .row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:.92rem}
.checkout-summary .row:last-child{border-bottom:none;font-weight:700;color:var(--cyan)}
.gateway-options{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}
.gateway-options label{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--r-btn);padding:14px 16px;cursor:pointer;transition:border-color .2s}
.gateway-options label:hover,.gateway-options input:checked + span{border-color:var(--cyan)}
.crypto-instructions{border:1px solid var(--border);border-radius:var(--r-card);padding:22px;margin-bottom:24px}
.crypto-instructions .addr-row{display:flex;align-items:center;gap:10px;background:var(--card2);border-radius:var(--r-btn);padding:10px 14px;direction:ltr;font-family:monospace;font-size:.88rem;margin-top:8px;word-break:break-all}
.crypto-instructions .copy-btn{flex-shrink:0}

/* Account area */
.account-page{max-width:var(--maxw);margin:0 auto;padding:calc(var(--nav-h) + 40px) 24px 80px}

/* Header mini-cart */
.nav-cart-link{position:relative;display:inline-flex;align-items:center}
.nav-cart-link svg{width:22px;height:22px}
.cart-badge{position:absolute;top:-8px;inset-inline-end:-10px;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:var(--orange);color:#fff;font-size:.68rem;font-weight:700;line-height:1}
