/* public/assets/css/Sacola_style.css */

/* Reset simples */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
}
html {
    background: #333;
}

/* Corpo base */
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fallback de logo quando a empresa não tem imagem */
.loja-logo-fallback {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: inline-block;
    object-fit: contain;
    background: transparent;
    filter: brightness(0) invert(1);
}
.loja-logo-fallback.logo-grande {
    width: 200px;
    height: 200px;
    border-radius: 24px;
}

/* Containers */
main.conteudo {
    max-width: 900px;
    margin: 20px auto;
    padding: 15px;
}
main.conteudo.conteudo-cliente {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Cabeçalho */
header.header {
    background: #333;
    color: #fff;
    padding: 15px;
    text-align: center;
}

/* Rodapé */
footer.footer {
    text-align: center;
    padding: 8px 12px;
    margin-top: 20px;
    color: #555;
    font-size: 12px;
}

/* Drawer */
.loja-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 15;
}
.loja-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    max-width: 86vw;
    background: var(--drawer-bg, #ffffff);
    color: var(--drawer-text, #333333);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 16;
    padding: 16px 16px 20px;
    box-shadow: 12px 0 30px rgba(0, 0, 0, 0.12);
}
body.loja-drawer-open .loja-drawer {
    transform: translateX(0);
}
body.loja-drawer-open .loja-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}
.loja-drawer-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--drawer-muted, rgba(0, 0, 0, 0.08));
}
.loja-drawer-nome {
    font-weight: 700;
    font-size: 16px;
}
.loja-drawer-menu {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.loja-drawer-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: var(--drawer-muted, rgba(0, 0, 0, 0.04));
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.loja-drawer-link img {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(0) saturate(100%);
}
.loja-drawer-link:hover {
    background: var(--drawer-muted, rgba(0, 0, 0, 0.08));
}

/* Sacola FAB */
.sacola-fab {
    position: fixed;
    right: 16px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--sacola-fab-bg, #111111);
    color: var(--sacola-fab-color, #ffffff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    z-index: 18;
    text-decoration: none;
}
.sacola-fab img {
    width: 22px;
    height: 22px;
    display: block;
    filter: brightness(0) invert(1);
}
.sacola-fab-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--sacola-fab-badge-bg, #ef4444);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--sacola-fab-bg, #111111);
}

/* Botões genéricos */
button,
.btn {
    display: inline-block;
    padding: 10px 15px;
    border: none;
    background: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Tabelas simples */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 10px;
}

table th {
    background: #f0f0f0;
}

/* Sacola */
:root {
    --sacola-title-left: 18px;
}
.sacola-titulo {
    margin-left: var(--sacola-title-left);
}
:root {
    --sacola-card-bg: #ffffff;
    --sacola-card-border: #e5e7eb;
    --sacola-text: #333333;
    --sacola-muted: #6b7280;
    --sacola-shadow: rgba(0, 0, 0, 0.08);
}
.sacola-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 14px 18px;
}
.sacola-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}
.sacola-table thead {
    display: none;
}
.sacola-table tbody,
.sacola-table tr,
.sacola-table td {
    display: block;
    width: 100%;
}
.sacola-table tr {
    background: var(--sacola-card-bg);
    border: 1px solid var(--sacola-card-border);
    border-radius: 12px;
    padding: 12px 12px 14px;
    box-shadow: 0 6px 16px var(--sacola-shadow);
    position: relative;
}
.sacola-table td {
    border: none;
    padding: 0;
    color: var(--sacola-text);
}
.sacola-table td + td {
    margin-top: 8px;
}
.sacola-table td:first-child strong {
    font-size: 14px;
}
.sacola-table td:first-child div + div {
    margin-top: 3px;
}
.sacola-table ul {
    margin-top: 4px;
    padding-left: 18px;
    color: #000000;
}
.sacola-table li + li {
    margin-top: 2px;
}
.sacola-item-extra {
    max-height: 0;
    overflow: hidden;
    position: relative;
}
.sacola-item-collapsible.is-open .sacola-item-extra {
    max-height: none;
}
button.sacola-more {
    margin-top: 2px;
    padding: 0;
    border: none !important;
    background: transparent !important;
    background-image: none !important;
    color: #000000 !important;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
    border-radius: 0 !important;
}
button.sacola-more:focus,
button.sacola-more:active {
    outline: none !important;
    box-shadow: none !important;
}
button.sacola-more:focus-visible {
    outline: none !important;
}
.sacola-item-collapsible.is-open .sacola-more {
    margin-top: 4px;
}
.sacola-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sacola-card-bg);
    border: 1px solid var(--sacola-card-border);
    border-radius: 999px;
    padding: 4px 8px;
}
.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #000000;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.qty-btn:hover {
    background: transparent;
}
.qty-val {
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    color: var(--sacola-text);
}
.sacola-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.sacola-item-actions form {
    margin: 0;
}
.sacola-item-price {
    font-weight: 700;
    font-size: 13px;
    flex: 1;
    text-align: center;
}
.sacola-qty {
    gap: 6px;
    padding: 3px 6px;
}
.qty-btn {
    width: 22px;
    height: 22px;
    font-size: 14px;
}
.qty-val {
    min-width: 14px;
    font-size: 12px;
}
.sacola-table td:nth-child(2)::before,
.sacola-table td:nth-child(3)::before,
.sacola-table td:nth-child(4)::before {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--sacola-muted);
    margin-bottom: 4px;
}
.sacola-table td:nth-child(2)::before {
    content: "Qtd";
}
.sacola-table td:nth-child(3)::before {
    content: "Preco";
}
.sacola-table td:nth-child(4)::before {
    content: "Acoes";
}
.sacola-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 2px 0;
}
.sacola-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}
.btn-continuar {
    display: block;
    text-align: center;
}
.btn-remover {
    padding: 6px 10px;
    font-size: 13px;
}

@media (min-width: 768px) {
    .sacola-page {
        max-width: 860px;
        padding: 0 18px 22px;
    }
    .sacola-table thead {
        display: none;
    }
    .sacola-table tbody {
        display: block;
    }
    .sacola-table tr {
        display: block;
        background: var(--sacola-card-bg);
        border: 1px solid var(--sacola-card-border);
        border-radius: 12px;
        padding: 12px 12px 16px;
        box-shadow: 0 6px 16px var(--sacola-shadow);
    }
    .sacola-table td,
    .sacola-table th {
        display: block;
        padding: 0;
        border: none;
    }
    .sacola-table td + td {
        margin-top: 0;
    }
    .sacola-table td:nth-child(2)::before,
    .sacola-table td:nth-child(3)::before,
    .sacola-table td:nth-child(4)::before {
        content: none;
    }
    .sacola-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .btn-continuar {
        width: auto;
        min-width: 220px;
    }
}
