/*
 * shop.css
 * Private-Label-Shop. Baut auf commission.css auf (.commission-page, .cm-card, .cm-table, .cm-btn ...)
 * und ergänzt nur, was dort fehlt. Produktseite: public/css/private-label/product.css. Handy (< 700px): Größen in vw.
 */

/* ---------- Allgemein ---------- */
.shop-page .cm-card h2 { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.shop-num { text-align: right !important; }
.shop-badge-cancelled { background: #fdecec; color: #a11; }
.shop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 0 0 24px;
}
.shop-head h1 { margin: 0 !important; text-align: left !important; }
.shop-makers { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.shop-maker {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
}
.shop-maker img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--cm-border);
    background: #fff;
}
.shop-info {
    background: #f4faf6;
    border: 1px solid #d3eadb;
    border-radius: 14px;
    padding: 14px 18px;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
}
.shop-warn {
    background: #fff1e8;
    border: 1px solid #f6d3bf;
    border-radius: 14px;
    padding: 14px 18px;
    margin: 0 0 20px;
    font-size: 14px;
    color: #7a3412;
}
.shop-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.shop-columns > .cm-card { margin: 0; }
.shop-sticky { position: sticky; top: 130px; }

/* ---------- Summen, Bankdaten, Adresse ---------- */
.shop-totals, .shop-bank { margin: 0; }
.shop-totals > div, .shop-bank > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--cm-border);
}
.shop-totals dt, .shop-bank dt { color: #52514e; }
.shop-totals dd, .shop-bank dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-totals .shop-total { border-bottom: 0; font-size: 16px; }
.shop-totals .shop-total dt { color: #000; font-weight: 700; }
.shop-totals .shop-total dd { font-weight: 800; }
.shop-totals .shop-internal { background: #fafafa; padding-left: 10px; padding-right: 10px; }
.shop-ship-groups { margin-bottom: 6px; }
.shop-ship-groups > div { font-size: 13px; }
.shop-sum-maker { margin: 12px 0 6px; font-weight: 700; font-size: 14px; }
.shop-vat-note { margin: 12px 0 0; }
.shop-bank { background: #fafafa; border-radius: 14px; padding: 6px 18px; }
.shop-bank > div:last-child { border-bottom: 0; }
.shop-bank-wrap { margin-top: 16px; }
.shop-bank-title { margin: 0 0 8px; font-weight: 700; font-size: 14px; }
.shop-address { margin: 0; line-height: 1.6; }

.shop-log { list-style: none; margin: 0; padding: 0; }
.shop-log li { padding: 6px 0; border-bottom: 1px solid var(--cm-border); }
.shop-log li:last-child { border-bottom: 0; }

/* ---------- Warenkorb ---------- */
.shop-cart-group + .shop-cart-group { border-top: 2px solid var(--cm-border); margin-top: 8px; padding-top: 22px; }
.shop-cart-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 0 0 6px;
}
.shop-cart-shipping { margin: 12px 0 18px; font-size: 13px; }
.shop-cart-product {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--cm-border);
}
.shop-cart-product > img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 14px;
    background: #f3f3f3;
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
}
.shop-cart-product h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.shop-cart-lines { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.shop-cart-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 120px;
    font-size: 13px;
    color: #52514e;
}
.shop-cart-line input { height: 36px !important; text-align: center; }
.shop-cart-fixed { display: flex; align-items: center; justify-content: center; height: 36px; border: 1px solid #e2e2e2; border-radius: 8px; background: #f7f7f5; }
.shop-cart-line .cm-link { font-size: 12px; font-weight: 500; align-self: flex-start; }
.shop-cart-price { margin-top: 10px; font-size: 14px; }

/* ---------- Checkout ---------- */
.shop-pay-methods { display: flex; flex-direction: column; gap: 10px; }
.shop-pay-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--cm-border);
    border-radius: 10px;
    cursor: pointer;
}
.shop-pay-method.is-disabled { opacity: .5; cursor: default; }
.shop-pay-method small { color: #666; margin-left: auto; }
.shop-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.shop-check input { margin-top: 3px; flex-shrink: 0; }
.shop-check a { color: #000; font-weight: 600; }
.shop-submit { width: 100%; padding: 14px 22px; font-size: 16px; margin-top: 18px; }

/* ---------- Statusformulare ---------- */
.shop-status-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.shop-status-form .shop-ship-fields { display: contents; }
.shop-status-form .shop-ship-fields[hidden] { display: none !important; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Admin: Auszahlungen ---------- */
.shop-payout + .shop-payout { border-top: 1px solid var(--cm-border); margin-top: 22px; padding-top: 22px; }
.shop-payout-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.shop-payout-sum { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shop-iban { font-family: "Courier Prime", monospace; font-size: 15px; letter-spacing: .5px; }

/* ---------- Dashboard "Orders": Reiter + Tabelle mit Platzhalter-Zeilen ---------- */
.shop-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--cm-border);
    margin: 0 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tab {
    position: relative;
    flex-shrink: 0;
    padding: 10px 18px 12px;
    border: 0;
    background: none;
    color: #8a8a8f;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.shop-tab:hover { color: #000; }
.shop-tab.is-active { color: #000; font-weight: 700; }
.shop-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary, #3A9D61);
}
.shop-orders-card {
    background: #fff;
    border: 1px solid var(--cm-border);
    border-radius: 16px;
    overflow: hidden;
}
.shop-orders-scroll { overflow-x: auto; }
.shop-orders-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.shop-orders-table th {
    background: #fafafa;
    padding: 18px 18px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6e6e73;
    border-bottom: 1px solid var(--cm-border);
    white-space: nowrap;
}
.shop-orders-table td {
    padding: 22px 18px;
    border-bottom: 1px solid var(--cm-border);
    font-size: 14px;
    white-space: nowrap;
}
.shop-orders-table tbody tr:last-child td { border-bottom: 0; }
.shop-orders-table tbody tr[data-href] { cursor: pointer; }
.shop-orders-table tbody tr[data-href]:hover td { background: #fafafa; }
.shop-orders-table .shop-col-no a { font-weight: 700; }
.shop-orders-empty { padding: 40px 20px; text-align: center; color: #6e6e73; }
.shop-orders-empty p { margin: 0 0 16px; }

/* Platzhalter beim Laden (Schimmer) */
.shop-skel {
    display: block;
    max-width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ececf0 25%, #f6f6f8 50%, #ececf0 75%);
    background-size: 200% 100%;
    animation: shop-shimmer 1.3s ease-in-out infinite;
}
.shop-skel.is-pill { height: 24px; border-radius: 12px; }
@keyframes shop-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Status-Pillen */
.shop-pill {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #efefef;
    color: #333;
}
.shop-pill-open, .shop-pill-awaiting_payment { background: #fff4e5; color: #8a4b00; }
.shop-pill-paid, .shop-pill-shipped, .shop-pill-delivered { background: #e8f5ec; color: var(--cm-green, #2e7d4f); }
.shop-pill-in_production { background: #eef2ff; color: #3a47a8; }
.shop-pill-refunded, .shop-pill-none { background: #f1f1f1; color: #666; }
.shop-pill-cancelled { background: #fdecec; color: #a11; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .shop-columns { grid-template-columns: minmax(0, 1fr); }
    .shop-sticky { position: static; }
}
@media (max-width: 700px) {
    .shop-page .cm-card h2 { font-size: 4.6vw; margin-bottom: 3.5vw; }
    .shop-head { gap: 3vw 4vw; margin-bottom: 5vw; }
    .shop-makers { gap: 3vw 5vw; }
    .shop-maker { gap: 3vw; font-size: 4vw; }
    .shop-maker img { width: 10vw; height: 10vw; }
    .shop-info, .shop-warn { padding: 3.5vw 4vw; border-radius: 3.5vw; font-size: 3.6vw; margin-bottom: 4vw; }
    .shop-columns { gap: 5vw; }
    .shop-totals > div, .shop-bank > div { padding: 2vw 0; gap: 3vw; font-size: 3.6vw; }
    .shop-totals .shop-total { font-size: 4vw; }
    .shop-ship-groups > div { font-size: 3.2vw; }
    .shop-sum-maker { margin: 3vw 0 1.5vw; font-size: 3.6vw; }
    .shop-bank { padding: 1.5vw 4vw; border-radius: 3.5vw; }
    .shop-bank-wrap { margin-top: 4vw; }
    .shop-bank-title { font-size: 3.6vw; margin-bottom: 2vw; }
    .shop-log li { padding: 1.5vw 0; font-size: 3.4vw; }

    .shop-cart-group + .shop-cart-group { margin-top: 2vw; padding-top: 5vw; }
    .shop-cart-group-head { gap: 2vw 4vw; margin-bottom: 1.5vw; }
    .shop-cart-shipping { margin: 3vw 0 4vw; font-size: 3.2vw; }
    .shop-cart-product { grid-template-columns: 18vw minmax(0, 1fr); gap: 4vw; padding: 4vw 0; }
    .shop-cart-product > img { width: 18vw; height: 18vw; border-radius: 3vw; }
    .shop-cart-product h3 { font-size: 4vw; }
    .shop-cart-lines { gap: 2.5vw; margin-top: 3vw; }
    .shop-cart-line { width: 26vw; font-size: 3.2vw; }
    .shop-cart-line input { height: 9vw !important; }
    .shop-cart-price { font-size: 3.6vw; margin-top: 2.5vw; }

    .shop-pay-method { padding: 3vw 3.5vw; border-radius: 2.5vw; gap: 2.5vw; font-size: 3.6vw; }
    .shop-check { font-size: 3.6vw; gap: 2.5vw; }
    .shop-submit { padding: 3.5vw 5vw; font-size: 4vw; margin-top: 4vw; }

    .shop-status-form { grid-template-columns: minmax(0, 1fr); gap: 3vw; }
    .shop-payout-sum { font-size: 5vw; }
    .shop-iban { font-size: 3.6vw; }

    .shop-tabs { gap: 1vw; margin-bottom: 5vw; }
    .shop-tab { padding: 2.5vw 3.5vw 3vw; font-size: 3.8vw; }
    .shop-orders-card { border-radius: 3.5vw; }
    .shop-orders-table { min-width: 170vw; }
    .shop-orders-table th { padding: 4vw; font-size: 2.9vw; }
    .shop-orders-table td { padding: 5vw 4vw; font-size: 3.5vw; }
    .shop-orders-empty { padding: 8vw 4vw; font-size: 3.6vw; }
    .shop-orders-empty p { margin-bottom: 4vw; }
    .shop-skel { height: 3vw; border-radius: 1.5vw; }
    .shop-skel.is-pill { height: 6vw; border-radius: 3vw; }
    .shop-pill { padding: 1.2vw 3vw; font-size: 3vw; }
}
