/* Buyer pages beyond the home screen. Kept separate from account and seller styles. */
.buyer-collection-page,
.buyer-product-page,
.buyer-cart-page,
.buyer-checkout-page,
.buyer-orders-page { padding-top: 18px; padding-bottom: 42px; }

.buyer-collection-page .crumbs,
.buyer-product-page .crumbs { margin: 0 0 16px; color: #777; font-size: 13px; }
.buyer-collection-page .crumbs a,
.buyer-product-page .crumbs a { color: #777; }
.buyer-collection-page .crumbs a:hover,
.buyer-product-page .crumbs a:hover { color: var(--accent); }

/* Category, search, brand and store listings share the same surface. */
.buyer-collection-page .side-box,
.buyer-collection-page .results-head,
.buyer-collection-page .page-head,
.buyer-collection-page .shop-banner,
.buyer-collection-page .tile-grid > *,
.buyer-collection-page .empty { border: 1px solid #ededee; border-radius: 12px; box-shadow: 0 2px 12px rgba(26,26,31,.045); }
.buyer-collection-page .side-box h2 { background: #fff; border-bottom: 1px solid #ececec; color: #333; font-size: 15px; padding: 16px 18px; }
.buyer-collection-page .side-list { padding: 8px 0; }
.buyer-collection-page .side-list a { padding: 11px 18px; font-size: 14px; border-left-width: 3px; }
.buyer-collection-page .side-list a.on { background: #fff4ef; color: #eb5b35; border-left-color: #f26336; }
.buyer-collection-page .results-head { min-height: 78px; padding: 15px 20px; }
.buyer-collection-page .results-head h1,
.buyer-collection-page .page-head h1 { font-size: 23px; color: #303035; }
.buyer-collection-page .results-head p { margin-top: 4px; font-size: 13px; }
.buyer-collection-page .results-count { color: #777; white-space: nowrap; }
.buyer-collection-page .shop-banner { background: linear-gradient(105deg,#f05b36,#ff8652); padding: 26px 30px; color: #fff; }
.buyer-collection-page .shop-banner h1 { color: #fff; }
.buyer-collection-page .shop-banner p { color: #fff6f1; }
.buyer-collection-page .shop-banner .eyebrow { color: #fff3e7; }
.buyer-collection-page .shop-stats div { background: rgba(255,255,255,.13); border-radius: 9px; }
.buyer-collection-page .shop-stats dt { color: #fff0e8; }
.buyer-category-index { position: relative; }
.buyer-category-index::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc((100vw - 100%) / -2); width: 100vw; background: #f2f2f5; }
.buyer-category-index .crumbs,
.buyer-category-index .page-head p { display: none; }
.buyer-category-index .page-head { border: 0; box-shadow: none; background: transparent; padding: 11px 0 18px; margin-bottom: 8px; }
.buyer-category-index .page-head h1 { position: relative; display: inline-block; font-size: 23px; }
.buyer-category-index .page-head h1::after { content: ""; position: absolute; bottom: -8px; left: 0; width: 29px; height: 2px; background: #f26336; }
.buyer-category-index .tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px; }
.buyer-category-index .category-tile { min-height: 210px; gap: 25px; padding: 23px; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.buyer-category-index .category-tile .brand-mark { flex: 0 0 154px; display: grid; place-items: center; width: 154px; height: 154px; border-radius: 12px; background: #dedede; color: #999; font-size: 0; box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.buyer-category-index .category-tile .brand-mark::before { content: "▧"; font-size: 58px; font-weight: 300; line-height: 1; }
.buyer-category-index .category-tile strong { font-size: 22px; line-height: 1.35; }
.buyer-category-index .category-tile small { display: none; }

/* Product detail: neutral media, orange price and action, square-ended controls. */
.buyer-product-page .detail { grid-template-columns: minmax(0,1fr) minmax(0,1.07fr) 245px; gap: 23px; padding: 22px; border: 1px solid #ededee; border-radius: 12px; box-shadow: 0 2px 12px rgba(26,26,31,.045); }
.buyer-product-page .detail-media { background: #fff; border: 1px solid #ececec; border-radius: 9px; }
.buyer-product-page .detail-media img { display: block; object-fit: contain; }
.buyer-product-page .detail-copy h1 { margin: 0 0 10px; font-size: clamp(22px,2vw,29px); line-height: 1.3; color: #2d2d31; }
.buyer-product-page .detail-sub { margin-bottom: 14px; color: #818186; }
.buyer-product-page .price-box { margin: 16px 0; padding: 17px 19px; background: #fff6f1; border: 0; border-radius: 9px; }
.buyer-product-page .price-box .price { color: #ee5e36; font-size: 28px; font-weight: 800; }
.buyer-product-page .price-box .suggest { color: #888; font-size: 13px; }
.buyer-product-page .facts-inline { gap: 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: 12px 0; }
.buyer-product-page .facts-inline div { background: none; padding: 2px 10px; border-right: 1px solid #eee; border-radius: 0; }
.buyer-product-page .facts-inline div:first-child { padding-left: 0; }
.buyer-product-page .facts-inline div:last-child { border-right: 0; }
.buyer-product-page .facts-inline dt { color: #888; }
.buyer-product-page .buy { gap: 9px; }
.buyer-product-page .buy-row { gap: 12px; }
.buyer-product-page .qty,
.buyer-cart-page .qty { border-color: #dedede; border-radius: 7px; }
.buyer-product-page .qty button,
.buyer-cart-page .qty button { background: #fafafa; color: #444; }
.buyer-product-page .buy .btn.btn-buy { min-height: 42px; margin: 0; padding: 9px 25px; background: #f26336; border-color: #f26336; border-radius: 7px; }
.buyer-product-page .seller-box { border-color: #ebebeb; border-radius: 9px; background: #fff; padding: 17px; }
.buyer-product-page .seller-points li::before { background: #f26336; }
.buyer-product-page .tabs-panel { border: 1px solid #ededee; border-radius: 12px; box-shadow: 0 2px 12px rgba(26,26,31,.045); }
.buyer-product-page .tab-bar { background: #fff; overflow-x: auto; }
.buyer-product-page .tab { white-space: nowrap; font-size: 14px; }
.buyer-product-page .tab.on { box-shadow: inset 0 -3px #f26336; color: #e95831; }

/* The full cart retains its POST forms but uses product thumbnails and a clear summary. */
.buyer-cart-page .page-head,
.buyer-checkout-page .page-head,
.buyer-orders-page .page-head { border: 1px solid #ededee; border-left: 0; border-radius: 12px; padding: 19px 23px; }
.buyer-cart-page .page-head h1,
.buyer-checkout-page .page-head h1,
.buyer-orders-page .page-head h1 { font-size: 24px; color: #303035; }
.buyer-cart-page .cart-layout,
.buyer-checkout-page .checkout { grid-template-columns: minmax(0,1fr) 300px; gap: 20px; }
.buyer-cart-page .table-wrap,
.buyer-orders-page .table-wrap { border-color: #ededee; border-radius: 12px; box-shadow: 0 2px 12px rgba(26,26,31,.045); }
.buyer-cart-page .sheet th,
.buyer-orders-page .sheet th { padding: 13px 16px; background: #fafafa; color: #666; font-size: 13px; }
.buyer-cart-page .sheet td,
.buyer-orders-page .sheet td { padding: 17px 16px; vertical-align: middle; }
.buyer-cart-page .sheet tbody tr:hover,
.buyer-orders-page .sheet tbody tr:hover { background: #fffaf7; }
.buyer-cart-product { display: flex; align-items: flex-start; gap: 13px; min-width: 230px; }
.buyer-cart-product-image { display: block; flex: 0 0 82px; width: 82px; height: 82px; border: 1px solid #efefef; border-radius: 7px; overflow: hidden; background: #fff; }
.buyer-cart-product-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.buyer-cart-product-copy { min-width: 0; }
.buyer-cart-product-copy > a { display: block; color: #303035; font-weight: 650; line-height: 1.4; text-decoration: none; }
.buyer-cart-product-copy > a:hover { color: #ef603d; }
.buyer-cart-product-copy .meta { margin: 6px 0 0; color: #888; font-size: 12px; }
.buyer-cart-page .inline-form { flex-direction: column; align-items: flex-start; }
.buyer-cart-page .inline-form .btn { padding: 5px 11px; font-size: 12px; }
.buyer-cart-page .summary,
.buyer-checkout-page .summary { top: 18px; border-color: #ededee; border-radius: 12px; padding: 20px; }
.buyer-cart-page .summary h2,
.buyer-checkout-page .summary h2 { margin: 0 0 15px; font-size: 18px; }
.buyer-cart-page .summary .price,
.buyer-checkout-page .summary .price { color: #ef603d; }
.buyer-cart-page .summary .btn { min-height: 44px; margin-top: 15px; border-radius: 7px; background: #f26336; }
.buyer-cart-page .summary .hint { color: #888; font-size: 12px; line-height: 1.5; }

/* Checkout and order history stay visually consistent with cart. */
.buyer-checkout-page .panel { border-color: #ededee; border-radius: 12px; padding: 21px 23px; }
.buyer-checkout-page .panel h2 { font-size: 18px; }
.buyer-checkout-page .address-pick label,
.buyer-checkout-page .ship-option { border-color: #e8e8e8; border-radius: 8px; padding: 12px 14px; }
.buyer-checkout-page .address-pick label:has(input:checked),
.buyer-checkout-page .ship-option:has(input:checked) { border-color: #f26336; background: #fff7f3; }
.buyer-checkout-page input:not([type=radio]):not([type=checkbox]),
.buyer-checkout-page textarea { border-color: #dadada; border-radius: 7px; }
.buyer-checkout-page input:focus,
.buyer-checkout-page textarea:focus { outline-color: rgba(242,99,54,.22); }
.buyer-checkout-page .checkout-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid #eee; }
.buyer-checkout-page .checkout-actions .btn { min-height: 42px; border-radius: 7px; }
.buyer-orders-page .pay-bar { border-color: #ededee; border-radius: 12px; padding: 15px 18px; }
.buyer-orders-page .pay-bar strong { color: #ef603d; }
.buyer-orders-page .sheet td:last-child { min-width: 124px; }
.buyer-orders-page .sheet td:last-child .btn { margin: 2px 0; padding: 6px 10px; font-size: 12px; }

@media (max-width: 1100px) {
  .buyer-product-page .detail { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .buyer-product-page .seller-box { grid-column: 1/-1; }
}
@media (max-width: 980px) {
  .buyer-category-index .category-tile { min-height: 160px; gap: 15px; padding: 15px; }
  .buyer-category-index .category-tile .brand-mark { flex-basis: 120px; width: 120px; height: 120px; }
  .buyer-category-index .category-tile strong { font-size: 17px; }
  .buyer-cart-page .cart-layout,
  .buyer-checkout-page .checkout { grid-template-columns: 1fr; }
  .buyer-cart-page .summary,
  .buyer-checkout-page .summary { position: static; }
}
@media (max-width: 720px) {
  .buyer-category-index .tile-grid { grid-template-columns: 1fr; gap: 12px; }
  .buyer-category-index .category-tile { min-height: 122px; }
  .buyer-category-index .category-tile .brand-mark { flex-basis: 96px; width: 96px; height: 96px; }
  .buyer-collection-page,
  .buyer-product-page,
  .buyer-cart-page,
  .buyer-checkout-page,
  .buyer-orders-page { padding-top: 10px; padding-bottom: 28px; }
  .buyer-collection-page .crumbs,
  .buyer-product-page .crumbs { margin-bottom: 10px; font-size: 12px; }
  .buyer-collection-page .side-box { box-shadow: none; }
  .buyer-collection-page .side-list a { min-height: 40px; padding: 10px 13px; }
  .buyer-collection-page .results-head { padding: 13px 15px; min-height: 0; }
  .buyer-collection-page .results-head h1,
  .buyer-collection-page .page-head h1 { font-size: 19px; }
  .buyer-collection-page .shop-banner { padding: 19px; }
  .buyer-product-page .detail { display: block; padding: 12px; }
  .buyer-product-page .detail-media { margin-bottom: 17px; }
  .buyer-product-page .detail-copy h1 { font-size: 21px; }
  .buyer-product-page .price-box { padding: 14px; }
  .buyer-product-page .facts-inline { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .buyer-product-page .facts-inline div { padding: 2px 7px; }
  .buyer-product-page .seller-box { margin-top: 20px; }
  .buyer-product-page .tab { padding: 12px 14px; }
  .buyer-cart-page .page-head,
  .buyer-checkout-page .page-head,
  .buyer-orders-page .page-head { padding: 15px; }
  .buyer-cart-page .page-head h1,
  .buyer-checkout-page .page-head h1,
  .buyer-orders-page .page-head h1 { font-size: 20px; }
  .buyer-cart-page .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .buyer-cart-page .sheet tr,
  .buyer-orders-page .sheet tr { margin-bottom: 10px; border: 1px solid #ededee; border-radius: 10px; background: #fff; overflow: hidden; }
  .buyer-cart-page .sheet td,
  .buyer-orders-page .sheet td { padding: 9px 14px; border-bottom: 0; }
  .buyer-cart-page .sheet td:first-child,
  .buyer-orders-page .sheet td:first-child { padding-top: 14px; }
  .buyer-cart-page .sheet td:last-child,
  .buyer-orders-page .sheet td:last-child { padding-bottom: 14px; }
  .buyer-cart-product { min-width: 0; }
  .buyer-cart-product-image { flex-basis: 74px; width: 74px; height: 74px; }
  .buyer-cart-page .inline-form { flex-direction: row; align-items: center; }
  .buyer-cart-page .summary { padding: 17px; }
  .buyer-checkout-page .panel { padding: 16px; }
  .buyer-checkout-page .checkout-actions .btn { flex: 1; }
  .buyer-orders-page .pay-bar { align-items: stretch; }
  .buyer-orders-page .pay-bar form,
  .buyer-orders-page .pay-bar .btn { width: 100%; }
}
