.header-shop-actions { display: flex; align-items: center; gap: .6rem; }
.header-shop-actions .header-cta { white-space: nowrap; }
.header-cart { display: inline-flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .4rem .65rem; border: 1px solid #c9d8c3; border-radius: .68rem; background: #edf3e8; color: var(--forest); font-size: .9rem; font-weight: 680; white-space: nowrap; }
.header-cart:hover { background: #e3efde; }
#cart-count { display: grid; min-width: 1.5rem; min-height: 1.5rem; place-items: center; padding-inline: .28rem; border-radius: 2rem; background: var(--forest); color: #fffdf7; font-size: .78rem; font-variant-numeric: tabular-nums; }
.catalogue-toolbar { padding: 1rem; border: 1px solid #d4e1ce; border-radius: 1rem; background: linear-gradient(110deg, #edf3e8, #f4f5e9); }
.catalogue-toolbar label:first-child { flex: 1 1 15rem; }
.product-card { transition: box-shadow .22s ease, border-color .22s ease; }
.product-card:hover { border-color: #afc5a8; box-shadow: 0 .55rem 1.4rem #23473219; }
.product-meta { padding-top: .65rem; border-top: 1px solid var(--line); }
.product-price { font-size: clamp(1.05rem, 2vw, 1.32rem); font-variant-numeric: tabular-nums; }
.product-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.product-actions .button { min-height: 2.65rem; margin-top: 0; padding: .45rem .52rem; font-size: .87rem; }
.product-actions .button-product { flex: 1 0 auto; width: auto; }
.product-add { flex: 2 0 auto; }
html:has(#shop-cart[open], #product-dialog[open]) { overflow: hidden; }
#product-dialog { width: min(calc(100% - 1.25rem), 52rem); max-height: calc(100dvh - 1.25rem); border-radius: 1.18rem; overscroll-behavior: contain; }
#product-dialog .dialog-inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(1rem, 3vw, 1.9rem); align-items: start; padding: .2rem 1.6rem 1.6rem; }
#product-dialog.without-image .dialog-inner { grid-template-columns: 1fr; }
.dialog-close, .shop-close { display: grid; place-items: center; width: 2.75rem; min-height: 2.75rem; flex: none; padding: 0; border: 1px solid #d5dfcf; border-radius: 50%; background: #f2f6ee; color: var(--forest); font-size: 1.55rem; line-height: 1; }
.dialog-close:hover, .shop-close:hover { background: #e3ecde; }
.product-dialog-toolbar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: .5rem .8rem .25rem; background: var(--paper); }
#product-detail-image { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: .9rem; background: #eff2e9; }
.product-detail-copy { min-width: 0; overflow-wrap: anywhere; }
.product-detail-copy h2 { margin-top: .2rem; font-size: clamp(1.8rem, 5vw, 2.8rem); }
#product-detail-description { margin-top: .55rem; color: var(--muted); }
#product-detail-variants { display: grid; gap: .3rem; margin: .95rem 0; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: .68rem; background: #f1f5ec; }
#product-detail-variants div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
#product-detail-variants dd { margin: 0; color: var(--forest); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
#product-detail-options { display: grid; gap: .27rem; margin-top: .8rem; font-size: .9rem; font-weight: 650; }
#product-detail-options select { width: 100%; min-height: 2.75rem; padding: .55rem; border: 1px solid #b9c8b5; border-radius: .55rem; color: var(--ink); background: var(--paper); font-weight: 400; }
.product-detail-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.product-detail-actions .button { flex: 1 1 8rem; min-height: 2.85rem; padding-inline: .6rem; text-align: center; }
#product-detail-inquiry { border-color: #cbd9c9; background: #edf3e8; color: var(--forest); }
#product-detail-inquiry:hover { background: #e3efde; }
.product-add-feedback { color: #285d41; font-size: .875rem; line-height: 1.4; }
.product-add-feedback:not(:empty) { margin-top: .6rem; }
.product-add-feedback[data-state="error"] { color: #8a392b; }

#shop-cart { position: fixed; inset: 0 0 0 auto; width: min(100%, 31rem); height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 1.3rem 0 0 1.3rem; background: #f5f7f0; box-shadow: 0 0 3rem #12291f33; overflow: hidden; }
#shop-cart[open] { animation: shop-enter .32s cubic-bezier(.2,.75,.2,1) both; }
#shop-cart::backdrop, #product-dialog::backdrop { background: #142e25a6; }
@keyframes shop-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
.shop-drawer { height: 100%; display: flex; flex-direction: column; }
.shop-heading { display: flex; justify-content: space-between; align-items: center; flex: none; gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--forest); }
.shop-heading h2 { font-size: clamp(1.65rem, 5vw, 2.1rem); }
#shop-count-label { margin-top: .13rem; color: var(--muted); font-size: .86rem; }
.shop-drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 1rem 1.35rem; }
.shop-message { margin-bottom: .8rem; padding: .6rem .8rem; border-radius: .6rem; background: #f5ebcd; color: #50421b; }
.shop-summary { display: grid; flex: none; gap: .45rem; padding: .82rem 1.35rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.shop-summary dl { display: grid; gap: .23rem; margin: 0 0 .25rem; }
.shop-summary dl div { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.shop-summary dl div:last-child { color: var(--muted); font-size: .87rem; }
.shop-summary dd { margin: 0; font-weight: 680; text-align: right; font-variant-numeric: tabular-nums; }
#shop-subtotal { color: var(--forest); font-size: 1.25rem; }
.shop-summary .button { width: 100%; }
#shop-continue { border-color: #cbd9c9; background: #f2f6ee; color: var(--forest); }
#shop-continue:hover { background: #e3ecde; }
#shop-empty { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--paper); color: var(--muted); }
#shop-lines { display: grid; gap: .65rem; padding: 0; margin: 0; list-style: none; }
.shop-line { display: grid; grid-template-columns: 3.85rem minmax(0, 1fr) auto; align-items: start; gap: .65rem; padding: .72rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--paper); }
.shop-line-thumb { overflow: hidden; aspect-ratio: 1; border: 1px solid var(--line); border-radius: .6rem; background: #eaf0e4; }
.shop-line-thumb img { width: 100%; height: 100%; object-fit: contain; }
.shop-line-info { display: grid; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.shop-line-info small { color: var(--muted); font-size: .82rem; }
.shop-line-total { color: var(--forest); font-size: .94rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-line-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .24rem; margin-top: .28rem; }
.shop-line-controls button { min-width: 2.75rem; min-height: 2.75rem; padding: 0 .32rem; border: 1px solid #d2decf; border-radius: .55rem; background: #edf3e8; color: var(--forest); }
.shop-line-controls button:hover { background: #e3ecde; }
.shop-line-controls button:last-child { border-color: transparent; background: transparent; font-size: .83rem; text-decoration: underline; text-underline-offset: .2em; }
.shop-quantity { min-width: 1.46rem; text-align: center; font-variant-numeric: tabular-nums; }
#shop-demo { margin-block: .85rem; }
#shop-back { min-height: 2.75rem; margin-bottom: .55rem; }
.shop-payment { margin-block: .85rem; padding: .75rem; border: 1px solid var(--line); border-radius: .75rem; background: #edf3e8; }
.shop-payment p { margin-top: .2rem; color: var(--muted); font-size: .9rem; }
.shop-order-number { margin-top: .6rem; font-weight: 800; color: var(--forest); }

@media (min-width: 851px) and (max-width: 1050px) {
  .header-inner { gap: .85rem; }
  .site-header nav { gap: 1rem; }
  .cart-label { display: none; }
  .header-shop-actions .header-cta { padding-inline: .7rem; }
}
@media (max-width: 650px) {
  .header-cart { min-height: 2.75rem; padding-inline: .43rem; }
  .cart-label { display: none; }
  .product-actions .button { flex: 1 1 100%; }
  #product-dialog .dialog-inner { grid-template-columns: minmax(0, 1fr); padding: .16rem .92rem 1.05rem; }
  #product-detail-image { height: clamp(9rem, 29vh, 14rem); }
  #shop-cart { inset: auto 0 0; width: 100%; height: min(89vh, 48rem); height: min(89dvh, 48rem); max-height: calc(100dvh - 2.75rem); border-radius: 1.2rem 1.2rem 0 0; }
  #shop-cart[open] { animation-name: shop-enter-mobile; }
  @keyframes shop-enter-mobile { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .shop-heading, .shop-drawer-body, .shop-summary { padding-inline: 1rem; }
  .shop-summary .button { min-height: 2.75rem; }
}
@media (max-width: 495px) {
  .header-shop-actions .header-cta { display: none; }
  .header-inner .brand, .header-inner .brand > span:last-child { min-width: 0; }
  .header-inner .brand strong, .header-inner .brand small { overflow: hidden; text-overflow: ellipsis; }
  .shop-line { grid-template-columns: 3.35rem minmax(0, 1fr); column-gap: .57rem; row-gap: .24rem; }
  .shop-line-total { grid-column: 2; }
  .shop-line-controls button:last-child { margin-left: .1rem; }
  #shop-checkout .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .header-inner { gap: .37rem; }
  .header-inner .brand { gap: .35rem; }
  .header-inner .brand strong { font-size: 1.36rem; }
  .header-inner .brand small { font-size: .54rem; letter-spacing: .04em; }
  .header-inner .brand-mark, .header-inner .brand-logo, .header-shop-actions { flex: none; }
  .mobile-menu summary { font-size: .84rem; }
  .header-cart { gap: .3rem; padding-inline: .38rem; }
  .header-cart svg { width: 1.15rem; }
}
@media (max-height: 500px) {
  .shop-heading, .shop-summary { padding-block: .5rem; }
  #shop-totals:not([hidden]) ~ #shop-continue { display: none; }
}
