/* Componentes compartilhados: cabeçalho, busca, login, carrinho e rodapé. */
.logout-button {
    display: block;
    width: 100%;
    padding: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

* {
    box-sizing: border-box;
}
body.storefront {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
}
:where(.storefront) * {
    margin: 0;
    padding: 0;
}
.overlay-carrinho {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.4);

    opacity: 0;

    visibility: hidden;

    transition: 0.3s;

    z-index: 2000;
}
.overlay-carrinho.show {
    opacity: 1;

    visibility: visible;
}
.painel-carrinho {
    position: fixed;

    top: 0;
    right: 0;

    width: 450px;

    max-width: 95%;

    height: 100vh;

    background: white;

    transform: translateX(100%);

    transition: 0.3s;

    z-index: 2001;

    display: flex;

    flex-direction: column;
}
.painel-carrinho.show {
    transform: translateX(0);
}
.carrinho-header {
    padding: 20px;

    border-bottom: 1px solid #eee;

    display: flex;

    justify-content: space-between;

    align-items: center;
}
.carrinho-header button {
    border: none;

    background: none;

    font-size: 30px;

    cursor: pointer;
}
.carrinho-itens {
    flex: 1;

    overflow-y: auto;

    padding: 20px;
}
.carrinho-footer {
    padding: 20px;

    border-top: 1px solid #eee;

    background: white;
}
.carrinho-total {
    font-size: 24px;

    font-weight: bold;

    margin-bottom: 15px;
}
.btn-finalizar {
    width: 100%;

    height: 55px;

    border: none;

    border-radius: 12px;

    background: #ef4444;

    color: white;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;
}
.carrinho-item {
    display: flex;

    gap: 15px;

    margin-bottom: 20px;

    padding-bottom: 20px;

    border-bottom: 1px solid #eee;
}
.carrinho-item img {
    width: 80px;

    height: 80px;

    object-fit: contain;
}
.carrinho-info {
    flex: 1;
}
.btn-remover {
    margin-top: 10px;

    border: none;

    background: #dc2626;

    color: white;

    padding: 8px 12px;

    border-radius: 8px;

    cursor: pointer;
}
.frete-box {
    margin-top: 20px;

    padding-top: 20px;

    border-top: 1px solid #ddd;
}
.frete-linha {
    display: flex;

    gap: 10px;

    margin-top: 10px;
}
.frete-linha input {
    flex: 1;

    height: 40px;

    padding-left: 10px;
}
.frete-linha button {
    width: 100px;

    border: none;

    background: #ef4444;

    color: white;

    border-radius: 8px;

    cursor: pointer;
}
.btn-frete {
    width: 100%;

    height: 45px;

    border: none;

    border-radius: 10px;

    background: #ef4444;

    color: white;

    font-weight: bold;

    cursor: pointer;
}
.frete-resultado {
    margin-top: 15px;

    padding: 12px;

    background: #f8f8f8;

    border-radius: 10px;
}
.quantidade-controle {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 8px;
}
.btn-qtd {
    width: 28px;

    height: 28px;

    border: none;

    border-radius: 6px;

    background: #ef4444;

    color: white;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}
.btn-qtd:hover {
    background: #dc2626;
}
.quantidade-controle span {
    min-width: 25px;

    text-align: center;

    font-weight: bold;
}
.user-dropdown {
    position: absolute;

    top: 60px;
    right: 0;

    width: 180px;

    background: white;

    border-radius: 12px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);

    overflow: hidden;

    opacity: 0;
    visibility: hidden;

    transform: translateY(10px);

    transition: all 0.25s ease;

    z-index: 1000;
}
.user-dropdown a {
    display: block;

    padding: 12px 15px;

    color: #333;

    text-decoration: none;

    transition: 0.2s;
}
.user-dropdown a:hover {
    background: #f5f5f5;

    color: #ef4444;
}
.user-menu:hover .user-dropdown {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}
.overlay-login {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.4);

    opacity: 0;
    visibility: hidden;

    transition: 0.3s;

    z-index: 2000;
}
.overlay-login.show {
    opacity: 1;
    visibility: visible;
}
.painel-login {
    position: fixed;

    top: 0;
    right: 0;

    width: 380px;
    max-width: 90%;

    height: 100%;

    background: white;

    transform: translateX(100%);

    transition: 0.3s ease;

    z-index: 3001;

    padding: 30px;

    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
}
.painel-login.show {
    transform: translateX(0);
}
.login-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 30px;
}
.login-header h2 {
    font-size: 28px;
}
.login-header button {
    border: none;

    background: none;

    font-size: 30px;

    cursor: pointer;
}
.painel-login form {
    display: flex;

    flex-direction: column;

    gap: 15px;
}
.painel-login input {
    height: 50px;

    padding: 0 15px;

    border: 1px solid #ddd;

    border-radius: 10px;
}
.btn-login {
    height: 50px;

    border: none;

    border-radius: 10px;

    background: #ef4444;

    color: white;

    font-weight: bold;

    cursor: pointer;
}
.btn-cadastro {
    height: 50px;

    border: none;

    border-radius: 10px;

    background: #3466af;

    color: white;

    font-weight: bold;

    cursor: pointer;
}
.esqueci-senha {
    text-align: center;

    margin-top: 10px;

    color: #3466af;

    text-decoration: none;
}
.search-area {
    position: relative;
    flex: 1;
    display: flex;
}
.search-results {
    position: absolute;

    top: 55px;

    left: 0;

    width: 100%;

    background: white;

    border-radius: 12px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);

    z-index: 2000;

    display: none;

    max-height: 500px;

    overflow-y: auto;
}
.result-item {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px;

    border-bottom: 1px solid #eee;

    text-decoration: none;

    color: #222;
}
.result-item:hover {
    background: #f5f5f5;
}
.result-item img {
    width: 50px;

    height: 70px;

    object-fit: contain;
}
.sem-resultados {
    padding: 15px;

    text-align: center;

    color: #777;
}
.search-area-mobile {
    position: relative;

    width: 100%;

    display: flex;
}
.mobile-search {
    width: 100%;

    position: relative;
    margin-top: 15px;

    display: flex;
}
.search-results-mobile {
    border-radius: 12px;

    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    z-index: 5999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
}
.result-item-mobile {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 12px 14px;

    border-bottom: 1px solid #eee;

    text-decoration: none;

    color: #222;

    transition: 0.2s;
    z-index: 5999;
}
.result-item-mobile:last-child {
    border-bottom: none;
}
.result-item-mobile:active {
    background: #f3f3f3;
}
.result-item-mobile img {
    width: 60px;

    height: 84px;

    object-fit: contain;

    flex-shrink: 0;
}
.result-info-mobile {
    display: flex;

    flex-direction: column;

    overflow: hidden;

    flex: 1;
}
.result-info-mobile strong {
    font-size: 15px;

    color: #222;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}
.result-info-mobile span {
    margin-top: 4px;

    font-size: 13px;

    color: #666;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}
.sem-resultados-mobile {
    padding: 20px;

    text-align: center;

    color: #777;

    font-size: 15px;
}
.topbar {
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    font-weight: bold;
}
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-main {
    max-width: 1400px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px;
}
.logo {
    height: 70px;
}
.search-area input {
    width: 100%;
    height: 48px;
    border: none;
    background: #f0f0f0;
    border-radius: 12px 0 0 12px;
    padding-left: 15px;
}
.search-area button {
    width: 60px;
    border: none;
    background: #ef4444;
    color: white;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
}
.header-icons {
    display: flex;
    gap: 15px;
}
.icon-btn {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: white;

    color: #333;
    text-decoration: none;

    position: relative;

    transition: all 0.3s ease;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    font-size: 22px;
}
.icon-btn:hover {
    transform: translateY(-3px);
}
.user-btn:hover {
    background: #ef4444;
    color: white;

    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}
.cart-btn:hover {
    background: #3466af;
    color: white;

    box-shadow: 0 8px 20px rgba(52, 102, 175, 0.35);
}
.cart-count {
    position: absolute;

    top: -5px;
    right: -5px;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    background: #ef4444;

    color: white;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 11px;
    font-weight: bold;

    border: 2px solid white;
}
.menu {
    background: white;
    border-top: 1px solid #eee;
}
.menu ul {
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: center;
    list-style: none;
}
.menu li a {
    display: block;
    padding: 15px 30px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}
.menu li a:hover {
    color: #ef4444;
}
footer {
    margin-top: 60px;
    background: #222;
    color: white;
    padding: 50px;
}
.footer-grid {
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.footer-grid h3 {
    margin-bottom: 15px;
}
.user-menu {
    position: relative;
}
.header-mobile {
    display: none;

    position: sticky;

    top: 0;
    left: 0;

    width: 100%;
    max-width: 100%;

    background: #fff;

    padding: 15px;

    border-bottom: 1px solid #eee;

    z-index: 2000;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

    overflow: visible;
}
.mobile-top {
    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;
}
.mobile-logo {
    height: 55px;

    max-width: 180px;

    width: auto;

    object-fit: contain;
}
.mobile-icons {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 12px;

    flex-shrink: 0;
}
.mobile-menu-btn,
.mobile-cart {
    width: 42px;

    height: 42px;

    flex-shrink: 0;

    border: none;

    background: none;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 25px;

    color: #333;

    cursor: pointer;

    position: relative;
}
.mobile-search input {
    width: 100%;

    min-width: 0;

    flex: 1;

    height: 46px;

    border: 1px solid #ddd;

    border-radius: 10px 0 0 10px;

    padding: 0 15px;

    font-size: 15px;

    outline: none;
}
.mobile-search button {
    width: 55px;

    min-width: 55px;

    flex-shrink: 0;

    border: none;

    background: #e53935;

    color: white;

    border-radius: 0 10px 10px 0;

    cursor: pointer;
}
.mobile-menu {
    position: fixed;

    top: 0;
    left: -300px;

    width: 280px;
    max-width: 85vw;

    height: 100vh;

    background: white;

    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.15);

    transition: 0.3s;

    z-index: 3000;
}
.mobile-menu.show {
    left: 0;
}
.mobile-menu-header {
    display: flex;

    justify-content: flex-end;

    padding: 20px;
}
.mobile-menu-header button {
    border: none;

    background: none;

    font-size: 28px;

    cursor: pointer;
}
.mobile-menu-links {
    display: flex;

    flex-direction: column;
}
.mobile-menu-links a {
    padding: 16px 25px;

    color: #222;

    text-decoration: none;

    font-size: 16px;

    border-bottom: 1px solid #eee;
}
.mobile-menu-links a .site-icon {
    width: 25px;
}
@media (max-width: 900px) {
    .header {
        display: none;
    }
}
@media (max-width: 900px) {
    .header-mobile {
        display: block;
    }
}
@media (min-width: 901px) {
    .header-mobile {
        display: none;
    }
}
.order-pagination,
.order-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block: 20px;
}

.order-filters input,
.order-filters select {
    min-width: 0;
    max-width: 100%;
}

.order-pagination a,
.order-filters button,
.order-filters a {
    padding: 10px 14px;
}
.email-admin {
    max-width: 1100px;
    margin: 20px auto;
    padding: 16px;
    overflow-wrap: anywhere;
}

.email-admin section {
    margin-block: 20px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
