/* ===================================================
   Loja ADQP — estilos
   =================================================== */

.loja-h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    color: #173404;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
    text-transform: uppercase;
}
.loja-sub { color: #555; margin: 0; font-size: 14px; }

.loja-cart-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; background: #008C00; color: #fff;
    border-radius: 999px; text-decoration: none; font-weight: 600;
    transition: background 0.2s;
}
.loja-cart-link:hover { background: #00a500; }
.loja-cart-badge {
    background: #FFC107; color: #000; padding: 2px 8px;
    border-radius: 999px; font-size: 12px; font-weight: 700;
}

.loja-cats {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 8px 16px 16px;
    border-bottom: 1px solid #eee;
}
.loja-cat {
    padding: 6px 14px; border-radius: 999px;
    background: #f5f5f5; color: #444; text-decoration: none;
    font-size: 13px; font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.loja-cat:hover { background: #ebebeb; }
.loja-cat.is-active { background: #173404; color: #fff; }
.loja-cat span { opacity: 0.65; font-weight: 500; }

.loja-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    padding: 24px 16px;
}
@media (max-width: 600px) {
    .loja-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 12px; }
}
.loja-empty { grid-column: 1 / -1; text-align: center; color: #777; padding: 40px 0; }

.loja-card {
    background: #fff; border: 1px solid #e5e5e5; border-radius: 12px;
    overflow: hidden; transition: transform 0.15s, box-shadow 0.15s;
    display: flex; flex-direction: column;
}
.loja-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }

.loja-card-img {
    position: relative; aspect-ratio: 1 / 1;
    background: #fafafa;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.loja-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.loja-card-noimg { color: #aaa; font-size: 12px; }

.loja-tag-pack {
    position: absolute; top: 8px; left: 8px;
    background: #ff6b35; color: #fff; font-size: 10px; font-weight: 700;
    padding: 3px 8px; border-radius: 4px; letter-spacing: 0.5px;
}

.loja-card-body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.loja-card-title {
    font-size: 15px; font-weight: 700; color: #173404; margin: 0 0 4px;
    line-height: 1.25;
}
.loja-card-obs { font-size: 12px; color: #666; margin: 0 0 4px; }
.loja-card-ref { font-size: 11px; color: #999; margin: 0 0 8px; }

.loja-card-foot {
    margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px;
}
.loja-card-price { display: flex; flex-direction: column; line-height: 1.2; }
.loja-price { font-size: 18px; font-weight: 800; color: #008C00; }
.loja-price-socio { font-size: 11px; color: #777; }

.loja-btn-add {
    width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: #008C00; color: #fff; cursor: pointer;
    font-size: 22px; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.1s;
}
.loja-btn-add:hover { background: #00a500; }
.loja-btn-add:active { transform: scale(0.92); }

/* ============= Modal ============= */
.loja-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.loja-modal.is-open { display: flex; }
.loja-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.55);
}
.loja-modal-dialog {
    position: relative; background: #fff; border-radius: 14px;
    width: 100%; max-width: 720px; max-height: 90vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.loja-modal-head {
    padding: 16px 20px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.loja-modal-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: #173404; }
.loja-modal-x {
    background: transparent; border: 0; font-size: 24px; cursor: pointer;
    color: #666; padding: 0; line-height: 1; width: 32px; height: 32px;
}

.loja-modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }

.loja-modes {
    border: 1px solid #e5e5e5; border-radius: 8px; padding: 8px 12px 10px; margin: 0 0 14px;
}
.loja-modes legend { padding: 0 6px; font-size: 12px; color: #666; font-weight: 600; text-transform: uppercase; }
.loja-modes label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 14px; }

.loja-qty-row { margin-bottom: 14px; }
.loja-qty-row input[type=number] { width: 100px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; }

.loja-label { display: block; font-size: 12px; font-weight: 600; color: #444; margin-bottom: 4px; }

.loja-row3 {
    display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 10px; margin-bottom: 12px;
}
.loja-row3 input, .loja-row3 select {
    width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 14px;
}

.loja-block { display: block; margin-top: 8px; }
.loja-block textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px;
    font-family: inherit; font-size: 14px; resize: vertical;
}

.loja-pack-item {
    display: flex; gap: 10px; align-items: center;
    padding: 8px; border: 1px solid #eee; border-radius: 8px; margin-top: 6px;
}
.loja-pack-item img {
    width: 48px; height: 48px; object-fit: contain; background: #fff;
    border-radius: 6px; flex-shrink: 0;
}
.loja-pack-item .lm-pi-info { flex: 1; }
.loja-pack-item .lm-pi-name { font-weight: 600; font-size: 13px; color: #173404; }
.loja-pack-item .lm-pi-obs { font-size: 11px; color: #777; }
.loja-pack-item select {
    padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; min-width: 120px;
}

.loja-batch-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.loja-batch-table th, .loja-batch-table td {
    border: 1px solid #e5e5e5; padding: 6px; vertical-align: middle;
}
.loja-batch-table th { background: #fafafa; font-weight: 600; color: #555; font-size: 12px; }
.loja-batch-table input, .loja-batch-table select {
    width: 100%; padding: 5px 7px; border: 1px solid #d5d5d5; border-radius: 4px; font-size: 13px;
}

.loja-modal-foot {
    padding: 14px 20px; border-top: 1px solid #eee;
    display: flex; gap: 10px; justify-content: flex-end;
}
.loja-btn-primary, .loja-btn-secondary {
    padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer;
    border: 0; font-size: 14px;
}
.loja-btn-primary { background: #008C00; color: #fff; }
.loja-btn-primary:hover { background: #00a500; }
.loja-btn-secondary { background: #f0f0f0; color: #444; }
.loja-btn-secondary:hover { background: #e0e0e0; }

.loja-help { font-size: 12px; color: #777; margin: 8px 0 0; }

/* ============= Carrinho ============= */
.loja-cart-page { padding: 24px 16px; }
.loja-cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.loja-cart-table th, .loja-cart-table td { padding: 12px; border-bottom: 1px solid #eee; vertical-align: top; }
.loja-cart-table th { background: #f5f5f5; font-weight: 600; font-size: 13px; text-align: left; }
.loja-cart-img { width: 60px; height: 60px; object-fit: contain; background: #fafafa; border-radius: 6px; }
.loja-cart-total { margin-top: 18px; text-align: right; font-size: 18px; }
.loja-cart-total strong { font-size: 24px; color: #008C00; }

/* Popup confirmação */
.loja-toast {
    position: fixed; top: 80px; right: 20px;
    background: #173404; color: #fff; padding: 12px 18px;
    border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 10000;
    opacity: 0; transform: translateY(-10px); transition: all 0.25s;
    pointer-events: none;
}
.loja-toast.is-show { opacity: 1; transform: translateY(0); }
