/* EACK — Boutique Business (v2.19). Styles propres à l'onglet Boutique (boutique.js). */
.shop-body { padding-bottom: 24px; }
.shop-loading { padding: 20px; }
.shop-top { display: grid; gap: 8px; padding: 4px 14px 10px; }
.shop-top:empty { display: none; }
.shop-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); cursor: pointer; }
.shop-body > .shop-card { margin: 0 14px 8px; width: calc(100% - 28px); }
.shop-card:hover { background: var(--bg-muted); }
.shop-card > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.shop-card-ico { font-size: 24px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); flex: none; }
.shop-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-card-main span { font-size: 13px; color: var(--muted); }
.shop-card.cta { background: linear-gradient(135deg, var(--brand-700), var(--brand)); color: #fff; border-color: transparent; }
.shop-card.cta .shop-card-main span, .shop-card.cta > svg { color: rgba(255, 255, 255, .9); }
.shop-card.mine { background: var(--brand-50); border-color: var(--brand-100); }
.shop-card.hot { background: #FFF4E5; border-color: #FFD8A8; }
.shop-card.hot .shop-card-main span { color: var(--warn); font-weight: 600; }
:root[data-theme="dark"] .shop-card.hot { background: rgba(194, 122, 0, .16); border-color: rgba(194, 122, 0, .4); }
:root[data-theme="dark"] .shop-card.mine { background: rgba(56, 182, 255, .12); border-color: rgba(56, 182, 255, .3); }

/* Grille d'articles */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0 14px; }
.shop-item { display: flex; flex-direction: column; text-align: left; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); padding: 0; cursor: pointer; color: var(--text); transition: transform .1s, box-shadow .15s; }
.shop-item:hover { box-shadow: var(--shadow); }
.shop-item:active { transform: scale(.98); }
.shop-item.off { opacity: .55; }
.shop-item .shop-img { aspect-ratio: 1 / 1; width: 100%; }
.shop-item-txt { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shop-price { font-weight: 800; color: var(--brand-700); font-size: 15px; }
:root[data-theme="dark"] .shop-price { color: var(--brand); }
.shop-price.big { font-size: 22px; margin-top: 12px; }
.shop-title { font-weight: 600; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-from { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-off { font-size: 11.5px; color: var(--warn); font-weight: 700; }

/* Image (photo d'article ou de boutique) */
.shop-img { background: var(--bg-muted) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.shop-img > svg { width: 36%; height: 36%; opacity: .6; }
.shop-img.round { width: 40px; height: 40px; border-radius: 50%; }
.shop-img.round.lg { width: 64px; height: 64px; }
.shop-img.thumb { width: 56px; height: 56px; border-radius: 10px; }
.shop-img.cover { width: 100%; height: 100%; background-size: contain; background-color: var(--bg-soft); }
.shop-img.pick { cursor: pointer; }

/* Liste de boutiques */
.shop-list { display: grid; padding: 0 6px; }
.shop-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-align: left; color: var(--text); width: 100%; cursor: pointer; }
.shop-row:hover { background: var(--bg-soft); }
.shop-row > svg { width: 18px; height: 18px; color: var(--muted); }
.shop-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Devenir vendeur */
.shop-sell { margin: 18px 14px 0; padding: 14px; border-radius: 16px; border: 1.5px dashed var(--border); display: flex; align-items: center; gap: 12px; }
.shop-sell > div { flex: 1; min-width: 0; font-size: 14px; }
.shop-sell .muted { font-size: 13px; }
.shop-sell.pending { border-style: solid; background: var(--bg-soft); }
.btn.sm { padding: 7px 14px; font-size: 13.5px; }

/* Bandeau d'une boutique */
.shop-banner { display: flex; gap: 14px; align-items: flex-start; padding: 6px 20px 12px; }
.shop-banner-main { flex: 1; min-width: 0; }
.shop-banner h2 { margin: 2px 0 2px; font-size: 19px; }
.shop-desc { white-space: pre-line; margin: 8px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.shop-actions { display: flex; gap: 8px; padding: 0 14px 12px; flex-wrap: wrap; }
.shop-actions .btn { flex: 1; }
.shop-actions .btn svg { width: 20px; height: 20px; }

/* Fenêtre article */
.modal-card.shop-modal { max-width: 480px; position: relative; }
.shop-detail h3 { margin: 4px 0 6px; }
.shop-x { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--surface); box-shadow: var(--shadow-sm); }
.shop-gallery-wrap { position: relative; margin: -22px -22px 0; }
.shop-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px 20px 0 0; background: var(--bg-soft); }
.shop-gallery::-webkit-scrollbar { display: none; }
.shop-slide { flex: 0 0 100%; aspect-ratio: 1 / 1; max-height: 52dvh; scroll-snap-align: center; cursor: zoom-in; }
.shop-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.shop-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 2px rgba(0, 0, 0, .4); }
.shop-dots i.on { background: #fff; width: 18px; border-radius: 4px; }
.link-btn.shop-link { margin: 0 0 4px; }
.shop-qty { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; }
.shop-qty .muted { flex: 1; font-weight: 600; }
.shop-qty .icon-btn { border: 1.5px solid var(--border); font-size: 22px; font-weight: 700; }
.shop-qty b { min-width: 28px; text-align: center; font-size: 18px; }
.shop-detail textarea { width: 100%; resize: vertical; margin-bottom: 10px; }
.shop-total { text-align: right; font-weight: 700; margin-bottom: 8px; }
.shop-total:empty { display: none; }
.shop-detail .btn.block + .btn.block { margin-top: 8px; }
.shop-hint { font-size: 12.5px; text-align: center; margin: 10px 0 0; }
.shop-mine-note { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); font-size: 14px; }

/* Commande envoyée */
.shop-done { text-align: center; }
.shop-done .big { font-size: 52px; }
.shop-done-btns { display: grid; gap: 8px; margin-top: 16px; }

/* Formulaires */
.shop-form .field textarea { resize: vertical; }
.shop-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.shop-logo .link-btn { display: inline; margin: 0 0 0 10px; }
.shop-logo .small, .small { font-size: 12.5px; margin-top: 6px; }
.shop-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-ph { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; }
.shop-ph .shop-img.thumb { width: 100%; height: 100%; border-radius: 12px; }
.shop-ph small { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px; text-align: center; background: rgba(0, 0, 0, .55); color: #fff; padding: 2px 0; }
.shop-ph-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; line-height: 24px; text-align: center; padding: 0; }
.shop-ph.add { border: 2px dashed var(--brand); background: var(--brand-50); color: var(--brand-700); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.shop-ph.add svg { width: 26px; height: 26px; }
.shop-ph.add small { position: static; background: none; color: inherit; font-weight: 600; padding: 0 4px; line-height: 1.15; }
.shop-photos:has(.shop-ph:only-child.add) .shop-ph.add { width: 100%; height: 120px; }
.shop-price-in { display: flex; align-items: center; gap: 8px; }
.shop-price-in input { font-size: 18px; font-weight: 700; }
.shop-price-in b { color: var(--muted); }
.setting.shop-avail { padding: 6px 0; cursor: pointer; }
.shop-del { margin-right: auto; }

/* Mes articles (vendeur) */
.shop-mine-list { display: grid; padding: 0 6px; }
.shop-mine-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; }
.shop-mine-row:hover { background: var(--bg-soft); }
.shop-mine-row.off .shop-mine-open { opacity: .55; }
.shop-mine-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--text); padding: 0; cursor: pointer; }
.shop-sw { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.shop-sw small { font-size: 10.5px; color: var(--muted); }

/* Commandes */
.shop-order { margin: 0 14px 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.shop-order.new { border-color: #FFC078; box-shadow: 0 0 0 3px rgba(255, 192, 120, .2); }
.shop-order.cancelled { opacity: .6; }
.shop-order-top { display: flex; align-items: center; gap: 10px; }
.shop-order-what { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0; font-weight: 600; }
.shop-order-what b { color: var(--brand-700); white-space: nowrap; }
.shop-order-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-order-btns a.btn { text-decoration: none; color: inherit; }
.shop-st { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-muted); color: var(--text-2); white-space: nowrap; }
.shop-st.new { background: #FFE8CC; color: #A35200; }
.shop-st.done { background: #D3F9E0; color: #137A4B; }

/* Administration */
.shop-adm { display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.shop-adm.hot { background: #FFF8EE; }
:root[data-theme="dark"] .shop-adm.hot { background: rgba(194, 122, 0, .12); }
.shop-adm-btns { display: flex; gap: 6px; }

@media (max-width: 760px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-card.shop-modal { max-height: 94dvh; }
  .shop-adm { flex-wrap: wrap; }
  .shop-adm-btns { width: 100%; justify-content: flex-end; }
}
