.shop-nav { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.shop-nav a { font-weight: 700; }
@media (max-width: 480px) {
  .shop-nav { column-gap: 8px; font-size: 13px; }
  .header-content { flex-wrap: wrap; padding-block: 9px; }
}
.shop-panel { border: 1px solid var(--line, #ddd); border-radius: 12px; margin: 16px 0; padding: 14px; background: #fff; }
.shop-panel h2, .shop-panel h3 { margin: 0 0 12px; }
.shop-panel summary { cursor: pointer; font-weight: 700; }
.shop-panel form { display: grid; gap: 12px; margin-top: 12px; }
.shop-panel label { display: grid; gap: 5px; }
.shop-panel label:has(input[type=checkbox]) { display: flex; align-items: center; }
.shop-panel input:not([type=checkbox]), .shop-panel select, .shop-panel textarea {
  width: 100%; padding: 8px; border: 1px solid #aab2ba; border-radius: 7px; font: inherit; color: inherit; background: #fff;
}
.shop-panel textarea { min-height: 88px; resize: vertical; }
.shop-panel button:not(.primary) { padding: 8px 11px; border: 1px solid #aab2ba; border-radius: 7px; background: #fff; color: #15313d; cursor: pointer; }
.shop-panel .primary, [data-cart-add] { cursor: pointer; border: 0; width: 100%; }
.shop-buttons { display: grid; gap: 8px; }
.shop-cart, .shop-reviews { display: grid; gap: 10px; padding: 0; list-style: none; }
.shop-cart li, .shop-reviews li { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line, #ddd); overflow-wrap: anywhere; }
.shop-reviews p, .shop-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.shop-panel [role=status]:empty, [data-cart-status]:empty { display: none; }
.shop-photo-thumb { width: 52px; height: 52px; object-fit: contain; }
.shop-photo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.shop-photo-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }

.chat-messages { max-height: min(45vh, 24rem); overflow-y: auto; overscroll-behavior: contain; padding: 0; list-style: none; }
.chat-messages li { display: block; margin: 8px 0; padding: 10px; border: 0; border-radius: 10px; background: #eef0f3; }
.chat-messages .chat-mine { background: #fff0e4; }
.chat-messages time { display: block; font-size: .8rem; }
.chat-messages p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-chat-unread] { color: #a13f00; }
[data-chat-compose] textarea { width: 100%; max-width: 100%; }

.shop-order-part { display: flex; gap: .75rem; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.shop-order-part img { width: 4.5rem; height: 4.5rem; max-width: 30%; object-fit: contain; border-radius: .5rem; background: #fff; }
.shop-order-part div { min-width: 0; display: grid; gap: .25rem; }
.shop-chat-button { display: block; padding: .75rem; border: 1px solid #aab2ba; border-radius: .5rem; text-align: center; }
.shop-chat-button::-webkit-details-marker { display: none; }
.shop-buy { margin-bottom: .75rem; }

.shop-inbox { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .5rem; }
.shop-inbox a { display: grid; gap: .25rem; min-width: 0; padding: .75rem; border: 1px solid #d7dfe6; border-radius: .65rem; text-decoration: none; overflow-wrap: anywhere; }
.shop-inbox time { font-size: .8rem; }
.shop-inbox a span:nth-child(3) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-message-count, [data-message-count] { color: #a13f00; font-weight: 750; font-size: .75rem; }
[data-message-count]:not([hidden]) { border-radius: .6rem; padding: .1rem .3rem; background: #fff0e4; }
.shop-chat-button { text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.shop-chat .chat-messages { max-height: min(42dvh, 24rem); }
.shop-chat [data-chat-compose] { gap: .5rem; }
.shop-chat [data-chat-compose] textarea { min-height: 3rem; }
.shop-chat [data-chat-compose] .primary { margin-top: 0; }

.shop-account-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.shop-account-links a { padding: .45rem .65rem; border: 1px solid #d7dfe6; border-radius: .5rem; }
