/* Storefront: shared product cards and a dedicated merchant header. */
body[data-view=shop]:has(#store-profile:not([hidden])) .page-heading{display:none}
#shop-view .store-profile{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:32px 24px;padding:38px 36px 0;margin:0 0 34px;border:1px solid #244f3c;border-radius:20px;background:#214e3b;color:#fff;box-shadow:0 12px 30px #214e3b0b}
#shop-view .store-profile:before,#shop-view .store-profile:after{content:"";position:absolute;z-index:-1;pointer-events:none;border:1px solid #ffffff0c;border-radius:50%;width:300px;height:300px;right:-80px;top:-160px}
#shop-view .store-profile:after{width:220px;height:220px;right:-40px;top:-120px}
.store-identity{display:flex;align-items:center;gap:21px;min-width:0}
#shop-view .store-avatar{display:grid;place-items:center;flex-shrink:0;width:76px;height:76px;border-radius:21px;background:#ffffff0d;border:1px solid #ffffff22;color:#d6e9bb}
#shop-view .store-avatar .icon{width:34px;height:34px;stroke-width:1.3}
.store-intro{min-width:0}.store-eyebrow{font-size:9px;letter-spacing:2.6px;color:#b9cfb5}
#shop-view #store-name{font-size:30px;font-weight:600;line-height:1.5;letter-spacing:-.6px;color:#f9fcf5;overflow-wrap:anywhere;margin:6px 0}
#shop-view .store-intro p{margin:0;font-size:12px;color:#c2d6c6}
.store-actions{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:14px;min-width:0}
#shop-view .store-purchases{background:#e1edcc;color:#294a35;border:1px solid #e1edcc;gap:8px;padding:11px 18px;font-size:12px}
#shop-view .store-purchases:hover{background:#edf4e0;border-color:#edf4e0}
.store-explore{display:inline-flex;align-items:center;gap:8px;font-size:11px;color:#cbddc9;transition:color .15s}
.store-explore:hover{color:#fff}.store-explore .icon{width:15px;height:15px}
.store-benefits{display:flex;align-items:center;flex-wrap:wrap;gap:14px 30px;grid-column:1/-1;border-top:1px solid #ffffff19;padding:18px 0;color:#c8d9c8;font-size:11px}
.store-benefits>span{display:inline-flex;align-items:center;gap:7px}.store-benefits .icon{width:15px;height:15px;stroke-width:1.5}
.store-catalog-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:20px}
.store-catalog-heading>div>span{display:block;color:#768675;letter-spacing:2px;font-size:9px;margin-bottom:7px}
.store-catalog-heading h2{font-size:20px;color:#2e4839;letter-spacing:-.4px}.store-catalog-heading>p{font-size:11px;margin:0;color:#748276}
#store-profile[hidden]~.store-catalog-heading{display:none}
#shop-view .shop-grid{gap:20px;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));margin-top:0}
#shop-view .shop-product{display:flex;flex-direction:column;gap:0;padding:25px 24px 22px;border:1px solid #e3e9e0;border-radius:17px;box-shadow:0 3px 8px #26493303;transition:border-color .18s,box-shadow .18s;min-width:0}
#shop-view .shop-product:hover{border-color:#bed0b5;box-shadow:0 8px 26px #26493309}
.shop-product-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:23px}
.shop-product-mark{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:#f0f5e8;border:1px solid #e8eedf;color:#65834d}
.shop-product-mark .icon{width:22px;height:22px;stroke-width:1.4}
.shop-stock{display:inline-flex;align-items:center;gap:6px;font-size:10px;color:#5f784f;padding:5px 8px;border-radius:20px;background:#f4f8ed;white-space:nowrap}
.shop-stock>span{width:4px;height:4px;background:#77995c;border-radius:50%}.shop-stock-empty{background:#f3f4f1;color:#7b8579}.shop-stock-empty>span{background:#9ca496}
#shop-view .shop-merchant{align-self:flex-start;margin:0 0 14px;font-size:10px}
.shop-product-info{flex:1;min-width:0}
#shop-view .shop-product h2{font-size:18px;font-weight:600;color:#2c4535;line-height:1.65;overflow-wrap:anywhere}
#shop-view .shop-description{font-size:12px;line-height:1.95;color:#71806f;margin:10px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
#shop-view .shop-price{font-size:29px;line-height:1.5;font-weight:600;letter-spacing:-.7px;color:#315c3c;margin:24px 0 20px;font-variant-numeric:tabular-nums}
#shop-view .shop-price small{font-size:11px;font-weight:400;letter-spacing:0;color:#7a8775;margin-left:4px}
.shop-purchase-panel{padding-top:17px;border-top:1px solid #eaf0e5}
#shop-view .shop-quantity-row{border:0;padding:0;gap:12px;align-items:center;flex-wrap:nowrap;margin-bottom:17px}
#shop-view .shop-quantity-row label{display:flex;flex-direction:column;gap:7px;margin:0;flex:0 0 81px;max-width:81px;font-size:10px;color:#74816e}
#shop-view .shop-quantity-row input{width:81px;margin:0;padding:9px 10px;min-height:38px;background:#fcfdf9;border-color:#e3e9dc;border-radius:8px;font-size:12px;color:#3f5839}
#shop-view .shop-quantity-row>span{font-size:10px;text-align:right;min-width:0;color:#74816e;line-height:1.7}
#shop-view .shop-quantity-row strong{display:block;color:#3c5934;font-size:19px;font-weight:600;line-height:1.5;letter-spacing:-.4px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#shop-view .shop-quantity-row small{font-size:10px}
#shop-view .shop-buy-button{width:100%;justify-content:space-between;padding:11px 14px;min-height:42px;font-size:12px;border-radius:9px;font-weight:500;gap:10px}
.shop-buy-button>span{overflow-wrap:anywhere}.shop-buy-button .icon{width:16px;height:16px}
#shop-view .shop-product-soldout .shop-product-mark{background:#f5f6f2;color:#8b9783;border-color:#eaece5}
.shop-message{padding:17px 20px;background:#fff;border:1px solid var(--border);border-radius:12px;overflow-wrap:anywhere;margin:0 0 20px}
#shop-view .shop-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:280px;text-align:center;padding:40px 24px;border-style:dashed;background:#fbfcf8}
.shop-empty-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:#edf3e5;color:#77925f;margin-bottom:17px}.shop-empty-icon .icon{width:26px;height:26px}
#shop-view .shop-empty h2{font-size:17px;color:#496040}.shop-empty p{margin:10px 0 0;font-size:12px}
@media(max-width:900px){#shop-view .store-profile{padding:29px 27px 0;gap:25px 20px}#shop-view #store-name{font-size:26px}#shop-view .store-avatar{width:63px;height:63px;border-radius:18px}.store-identity{gap:17px}.store-benefits{gap:13px 22px}}
@media(max-width:650px){#shop-view .store-profile{grid-template-columns:minmax(0,1fr);padding:26px 22px 0;gap:22px;border-radius:16px;margin-bottom:28px}#shop-view .store-avatar{width:53px;height:53px;border-radius:15px}#shop-view .store-avatar .icon{width:27px;height:27px}.store-eyebrow{font-size:8px;letter-spacing:2px}#shop-view #store-name{font-size:24px;margin:4px 0}#shop-view .store-intro p{font-size:11px}.store-identity{gap:15px}.store-actions{flex-direction:row;align-items:center;justify-content:space-between;gap:18px}.store-benefits{padding:16px 0;font-size:10px;gap:12px 19px}.store-benefits>span:last-child{display:none}.store-catalog-heading h2{font-size:18px}.store-catalog-heading>p{font-size:10px}#shop-view .shop-grid{gap:16px}#shop-view .shop-product{padding:23px 22px 21px}.shop-product-top{margin-bottom:19px}#shop-view .shop-price{margin-top:21px}.store-catalog-heading{margin-bottom:17px}}
@media(prefers-reduced-motion:reduce){#shop-view .shop-product,.store-explore{transition:none}}
.shop-search{display:flex;align-items:center;gap:20px;padding:18px 20px;background:#fff;border:1px solid #e3e9e0;border-radius:14px;margin:0 0 24px;box-shadow:0 3px 8px #26493303}
.shop-search>label{display:flex;align-items:center;gap:12px;flex:1;min-width:0;margin:0;color:#72846b}
.shop-search>label>.icon{width:20px;height:20px;flex-shrink:0}.shop-search-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shop-search input{margin:0;min-width:0;width:100%;background:#fbfcf8;border-color:#e6ebdf;min-height:42px;padding:11px 14px;font-size:12px}
.shop-search-actions{display:flex;align-items:center;gap:9px;flex-shrink:0}.shop-search-actions .button{font-size:12px;min-height:42px;padding:10px 18px}
.shop-search-status{font-size:12px;color:#697d5e;margin:-7px 0 20px;overflow-wrap:anywhere}
@media(max-width:540px){.shop-search{align-items:stretch;flex-direction:column;gap:12px;padding:16px;margin-bottom:20px}.shop-search>label{gap:9px}.shop-search-actions{justify-content:flex-end}.shop-search-actions .primary{flex:1}.shop-search-actions .button{min-height:40px}}

.card.purchase-history {
 padding: 0;
 overflow: hidden;
}
.purchase-history-list {
 list-style: none;
 margin: 0;
 padding: 0;
}
.purchase-history-columns, .purchase-history-row {
 display: grid;
 grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) 68px 106px;
 align-items: center;
 gap: 14px;
 padding: 16px 20px;
}
.purchase-history-columns {
 background: #f8faf5;
 color: #6a796f;
 font-size: 12px;
 border-bottom: 1px solid var(--border);
}
.purchase-history-row {
 font-size: 13px;
 line-height: 1.5;
 overflow-wrap: anywhere;
}
.purchase-history-row + .purchase-history-row {
 border-top: 1px solid var(--border);
}
.purchase-history-row strong {
 color: #315c3c;
 font-weight: 600;
}
.purchase-history-item > span, .purchase-history-amount > span,
.purchase-history-details > code {
 display: block;
 margin-top: 4px;
 color: #6a796f;
 font-size: 11px;
}
.purchase-history-details > time {
 font-size: 12px;
}
.purchase-history-action .button {
 min-height: 36px;
 padding: 8px 10px;
 font-size: 12px;
 white-space: nowrap;
}
@media (max-width: 1000px) {
 .purchase-history-columns { display: none; }
 .purchase-history-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "item state" "details details" "amount action";
  gap: 10px 14px;
  padding: 16px;
 }
 .purchase-history-item { grid-area: item; }
 .purchase-history-state { grid-area: state; justify-self: end; }
 .purchase-history-details { grid-area: details; }
 .purchase-history-amount { grid-area: amount; }
 .purchase-history-action { grid-area: action; justify-self: end; }
}
