/* ============================================
   ALVESTE HOME - Mobile First CSS
   ============================================ */

/* Reset e Variáveis */
:root {
    --primary-color: #000;
    --secondary-color: #fff;
    --text-primary: #000;
    --text-secondary: #666;
    --border-color: #e0e0e0;
    --background: #fff;
    --background-secondary: #f5f5f5;
    --header-height: 60px;
    --nav-height: 70px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: transparent;
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--secondary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    max-height: 40px;
}

.logo img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s ease;
}

.header.scrolled .logo {
    color: var(--primary-color);
    text-shadow: none;
}

.header.scrolled .logo img {
    filter: none;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-top: 0;
    margin-bottom: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* Primeira section (banner) sem padding e margin top */
.page-home > section:first-child {
    margin-top: 0;
}

.page-home > section:not(:first-child) {
    padding: 0 20px;
}

.page-home > section.banner {
    padding: 0;
}

.page-home {
    padding-top: 0;
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding: 0 10px;
}

/* Fundo da barra com recorte côncavo no centro */
.mobile-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    -webkit-mask-image: radial-gradient(circle 31px at 50% 10px, transparent 31px, #000 32px);
    mask-image: radial-gradient(circle 31px at 50% 10px, transparent 31px, #000 32px);
    z-index: -1;
}

/* Botão central com logo */
.nav-center-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 100%;
}

/* Borda do recorte côncavo (arco de 1px igual à borda da barra) */
.nav-center-curve {
    position: absolute;
    top: -21px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 62px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    -webkit-mask-image: linear-gradient(to bottom, transparent 20px, #000 21px);
    mask-image: linear-gradient(to bottom, transparent 20px, #000 21px);
    z-index: 1;
}

.nav-center-btn {
    position: absolute;
    top: -13px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: none;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: var(--transition);
    z-index: 2;
}

.nav-center-btn:active {
    transform: scale(0.95);
}

.nav-center-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-secondary);
    position: relative;
    flex: 1;
    max-width: 80px;
}

.nav-item:active {
    background: var(--background-secondary);
    transform: scale(0.95);
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ============================================
   SIDE MENU
   ============================================ */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    pointer-events: none;
}

.side-menu.active {
    pointer-events: auto;
}

.side-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-menu.active .side-menu-overlay {
    opacity: 1;
}

.side-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--secondary-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.side-menu.active .side-menu-content {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.side-menu-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-primary);
}

.close-menu:active {
    background: var(--background-secondary);
    transform: scale(0.95);
}

.close-menu svg {
    width: 24px;
    height: 24px;
    display: block;
}

.side-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.menu-link {
    display: block;
    padding: 16px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.menu-link:active {
    background: var(--background-secondary);
}

.menu-link.active {
    background: var(--background-secondary);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.side-menu-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.menu-link-secondary {
    display: block;
    padding: 12px 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.menu-link-secondary:active {
    color: var(--primary-color);
}

/* ============================================
   PAGE TEMPLATES
   ============================================ */

/* Home Page */
.page-home {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    padding: 0 20px;
    margin-top: 30px;
}

/* Mini Banner */
.mini-banner {
    width: 100%;
    overflow: hidden;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
/* Ticker: dois exemplares separados por 100vw cada; -50% = um exemplar → loop sem salto */
.mini-banner-ticker {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    /* duração via --mb-dur para não ser sobrescrita pelo shorthand */
    animation-name: mbTicker;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--mb-dur, 20s);
}
.mb-item { padding: 0 32px; }
.mb-gap  { display: inline-block; flex-shrink: 0; }
@keyframes mbTicker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
/* Fade */
.mini-banner-fade {
    display: block;
    text-align: center;
    padding: 0 16px;
    opacity: 0;
    animation-name: mbFade;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: var(--mb-dur, 5s);
}

/* Banner */
.banner {
    width: 100%;
    height: 400px;
    background: var(--background-secondary);
    overflow: hidden;
    position: relative;
    margin: 0;
    border-radius: 0;
}

.banner-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.banner-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.banner-slide.clickable {
    cursor: pointer;
}

.banner-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.banner-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 4px;
}

.banner-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s;
}

/* Apenas esconde em desktop no hover */
@media (min-width: 1024px) {
    .banner-controls {
        opacity: 0;
    }
    
    .banner-carousel:hover .banner-controls {
        opacity: 1;
    }
}

.banner-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.banner-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.banner-control svg {
    width: 20px;
    height: 20px;
    color: white;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 20px;
    margin-bottom: 30px;
}

.product-card {
    background: var(--secondary-color);
    border-radius: 0;
    overflow: hidden;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--background-secondary);
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-add-cart {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.btn-add-cart:active {
    transform: scale(0.9);
}

.btn-add-cart svg {
    width: 18px;
    height: 18px;
    color: white;
}

.btn-add-cart.added {
    background: var(--primary-color);
}

.btn-add-cart.added svg {
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.product-info {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.product-price-old {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.product-colors {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-dot:active {
    transform: scale(1.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-container {
    position: sticky;
    top: var(--header-height);
    background: var(--background);
    padding: 15px 0;
    margin: -20px -20px 20px -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ============================================
   CART PAGE
   ============================================ */
.cart-page {
    padding: 20px;
    padding-bottom: 120px;
}

/* Barra de progresso de frete grátis (topo do carrinho) */
.frete-progress {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.frete-progress-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.frete-progress-msg svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.frete-progress-msg strong { font-weight: 600; }
.frete-progress-bar {
    height: 5px;
    background: #e3e3e3;
    border-radius: 999px;
    overflow: hidden;
}
.frete-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.frete-progress.conquistado .frete-progress-msg { color: var(--primary-color); }

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--background-secondary);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.cart-item-variant {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-variant .color-dot {
    width: 14px;
    height: 14px;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--background);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-primary);
}

.quantity-btn:active {
    background: var(--background-secondary);
}

.quantity-value {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-remove:active {
    background: var(--background-secondary);
    color: #e53935;
}

.btn-remove svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Kit/Conjunto no carrinho: exibido como um produto só */
.cart-bundle-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--background-secondary);
    border-radius: 20px;
    padding: 2px 8px;
    vertical-align: middle;
    margin-left: 4px;
}
.cart-bundle-pecas {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cart-bundle-peca {
    font-size: 12.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}
.cart-bundle-peca .color-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.cart-bundle-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-right: auto;
}
.kit-unidade { font-weight: 400; color: var(--text-secondary); font-size: 12px; }

.cart-summary {
    position: fixed;
    bottom: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.cart-summary-produto {
    bottom: 0;
    z-index: 200;
}

/* No mobile só o rodapé fixo aparece; o inline é para o desktop
   (ver home-desktop.css: cart-summary-mobile some, cart-summary-inline aparece). */
.cart-summary-inline { display: none; }

/* Kit: aviso de desconto por quantidade + total no rodapé */
.kit-desc-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}
.kit-desc-info.ok { color: #1a8917; font-weight: 600; }
.kit-total-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    margin-bottom: 12px;
}
.kit-total-line s { color: #999; font-weight: 400; margin-right: 6px; }

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cart-summary-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.cart-summary-value {
    font-size: 14px;
    font-weight: 500;
}

.cart-total {
    font-size: 18px;
    font-weight: 600;
}

/* Resumo compacto do checkout (subtotal, desconto, frete, total) */
.checkout-cupom-inline { margin-bottom: 12px; }
.checkout-resumo-mini .cart-summary-row { margin-bottom: 6px; font-size: 14px; }
.checkout-resumo-mini .cart-summary-row span:last-child { font-weight: 500; }
.checkout-resumo-mini .cart-summary-total {
    margin-top: 8px;
    padding-top: 10px;
    margin-bottom: 14px;
    border-top: 1px solid var(--border-color);
}
.cart-summary-row.row-hidden { display: none; }
.checkout-resumo-mini .text-discount span:last-child { color: #1a8917; }

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-checkout:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .banner {
        height: 500px;
    }
}

/* ============================================
   RESPONSIVE - Desktop
   ============================================ */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .banner {
        height: 600px;
    }
    
    .main-content {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .section-title {
        padding: 0 40px;
    }
    
    .product-grid {
        padding: 0 40px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.no-scroll {
    overflow: hidden;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--secondary-color);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.modal-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
    pointer-events: none;
}

.modal-overlay.closing .modal-content {
    animation: slideDown 0.3s ease forwards;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:active {
    background: var(--background-secondary);
}

.modal-close svg {
    width: 24px;
    height: 24px;
    display: block;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.select-color,
.select-size {
    margin-bottom: 24px;
}

.select-color label,
.select-size label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.product-images-modal {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.product-image-modal {
    width: 78%;
    height: 320px;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-image-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--background-secondary);
}

/* ============================================
   PÁGINA DE PRODUTO (tela inteira, rota /produto/<slug>)
   ============================================ */
.produto-page {
    padding: 16px 16px 110px;
    max-width: 600px;
    margin: 0 auto;
}
/* Barra fixa no topo: botões voltar/carrinho + abas horizontais */
.produto-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--secondary-color, #fff);
    margin: -16px -16px 0;
    padding: 12px 16px 0;
}
.produto-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* Abas (Geral / Características / Avaliações) com scroll-spy */
.produto-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    overflow-x: auto;
    scrollbar-width: none;
}
.produto-tabs::-webkit-scrollbar { display: none; }
.produto-tab {
    flex: 1 0 auto;
    background: none;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #888);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease;
}
.produto-tab::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.produto-tab.ativo {
    color: var(--primary-color);
}
.produto-tab.ativo::after {
    transform: scaleX(1);
}

/* Âncoras invisíveis usadas pelo scroll-spy (sem afetar o layout) */
.produto-anchor {
    display: block;
    height: 0;
}
.produto-voltar {
    background: var(--background-secondary, #f3f3f3);
    border: none;
    height: 40px;
    padding: 0 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    max-width: 40px;
    transition: max-width .5s cubic-bezier(.4, 0, .2, 1);
    /* iOS Safari coloriza SVG dentro de <button> com azul (-apple-system-tint) — forçamos preto. */
    color: var(--text-primary, #000);
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.produto-voltar.expandido {
    max-width: 220px;
}
.produto-voltar svg { width: 22px; height: 22px; flex-shrink: 0; }
.produto-voltar-txt {
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
}
.produto-voltar.expandido .produto-voltar-txt {
    opacity: 1;
}
.produto-cart {
    position: relative;
    background: var(--background-secondary, #f3f3f3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    /* iOS Safari: força preto no ícone (evita o tint azul em <button>) */
    color: var(--text-primary, #000);
    -webkit-tap-highlight-color: transparent;
}
.produto-cart svg { width: 21px; height: 21px; }
.produto-cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fly-to-cart {
    position: fixed;
    z-index: 3000;
    object-fit: cover;
    border-radius: 8px;
    pointer-events: none;
    transition: left .55s ease-in, top .55s ease-in, width .55s ease-in, height .55s ease-in, opacity .4s ease-in .15s, border-radius .55s ease-in;
}
/* Galeria do produto — mobile: uma imagem por vez em largura total */
.produto-galeria {
    position: relative;
    margin-bottom: 18px;
}
.produto-galeria .galeria-slots {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.produto-galeria .galeria-slots::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.produto-galeria .galeria-slots .galeria-main {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 0;
    overflow: hidden;
    background: var(--background-secondary);
    border: none;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    scroll-snap-align: start;
}
.produto-galeria .galeria-slots .galeria-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.produto-galeria .galeria-slots .galeria-main video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* Player de vídeo customizado */
.vid-player {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: #000;
    -webkit-tap-highlight-color: transparent;
}
.vid-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.vid-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.vid-play-icon {
    width: 56px;
    height: 56px;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.18s;
}
.vid-play-icon::after {
    content: '';
    border-left: 20px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}
.vid-player.playing .vid-play-icon { opacity: 0; }
.vid-player.playing:active .vid-play-icon { opacity: 0.7; }
.vid-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 12px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.48));
}
.vid-seek {
    width: 100%;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    display: block;
}
.vid-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}
.vid-seek::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Lightbox de imagem em tela cheia (galeria de produto/kit/conjunto) */
.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.img-lightbox.aberto { opacity: 1; }
.img-lightbox.fechando { opacity: 0; }
.img-lightbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    position: relative;
}
.img-lightbox img {
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.img-lightbox-container.slide-left img {
    animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.img-lightbox-container.slide-right img {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.img-lightbox-container.slide-in-left img {
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.img-lightbox-container.slide-in-right img {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-30%); opacity: 0; }
}
@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(30%); opacity: 0; }
}
@keyframes slideInLeft {
    from { transform: translateX(30%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInRight {
    from { transform: translateX(-30%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.img-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}
.img-lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
.img-lightbox-close:active { background: rgba(255, 255, 255, 0.35); }
.img-lightbox-close svg { width: 22px; height: 22px; }
.img-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s, background 0.2s, transform 0.1s;
}
.img-lightbox-nav svg { width: 24px; height: 24px; }
.img-lightbox-prev { left: 16px; }
.img-lightbox-next { right: 16px; }
.img-lightbox-nav:active { background: rgba(255, 255, 255, 1); transform: translateY(-50%) scale(0.95); }

/* Mobile: imagem maior e botões menores */
@media (max-width: 899px) {
    .img-lightbox {
        padding: 10px;
    }
    .img-lightbox-container {
        max-width: 100%;
        max-height: 100%;
    }
    .img-lightbox img {
        max-width: 95vw;
        max-height: 85vh;
        border-radius: 4px;
    }
    .img-lightbox-nav {
        width: 36px;
        height: 36px;
    }
    .img-lightbox-nav svg { width: 20px; height: 20px; }
    .img-lightbox-prev { left: 10px; }
    .img-lightbox-next { right: 10px; }
    .img-lightbox-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    .img-lightbox-close svg { width: 20px; height: 20px; }
}
.produto-galeria .galeria-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s;
}
.produto-galeria .galeria-nav svg { width: 18px; height: 18px; }
.produto-galeria .galeria-prev { left: 10px; }
.produto-galeria .galeria-next { right: 10px; }
.produto-galeria .galeria-nav:disabled { opacity: 0; pointer-events: none; }
.produto-galeria .galeria-nav:active { background: rgba(255, 255, 255, 1); }
.produto-oferta { margin-bottom: 8px; }
.produto-nome {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--text-secondary, #555);
}
.produto-preco {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}
.produto-preco-final {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}
.produto-preco-old {
    font-size: 15px;
    color: var(--text-secondary, #888);
    text-decoration: line-through;
}
.produto-preco-off {
    font-size: 13px;
    font-weight: 700;
    color: #c0392b;
    background: #fdecea;
    padding: 2px 8px;
    border-radius: 6px;
}
.produto-frete {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-color, inherit);
}
.produto-parcelas { font-size: 12px; font-weight: 600; color: var(--verde-destaque, #00a650); align-self: baseline; }
.produto-frete svg { width: 18px; height: 18px; flex-shrink: 0; }
.produto-frete strong { color: var(--verde-destaque, #00a650); font-weight: 700; }

.produto-secao {
    padding: 18px 0;
    border-top: 1px solid var(--border-color);
}
.produto-secao-tit {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
}

/* Tabela de medidas em grade (accordion em produto / kit / conjunto) */
.medidas-grade-wrap { overflow-x: auto; }
.medidas-grade { border-collapse: collapse; width: 100%; font-size: 13px; }
.medidas-grade th, .medidas-grade td {
    border: 1px solid var(--border-color);
    padding: 8px 10px; text-align: center; white-space: nowrap;
}
.medidas-grade thead th { background: rgba(0, 0, 0, 0.03); font-weight: 600; }
.medidas-grade .medidas-th-tam { font-weight: 600; }
.medidas-grade tbody .medidas-th-tam { background: rgba(0, 0, 0, 0.02); }
.medidas-bloco + .medidas-bloco { margin-top: 18px; }
.medidas-prod-nome { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.medidas-prod-foto { margin-top: 10px; }
.medidas-prod-foto img { width: 100%; max-width: 360px; border-radius: 10px; display: block; }
.produto-texto {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, #555);
}

/* Descrição: 3 linhas + fade ("borrado") com opção de mostrar mais */
.produto-desc { position: relative; }
.produto-desc-texto {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, #555);
    display: -webkit-box;
    -webkit-line-clamp: 1;          /* colapsado: só 1 linha */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.produto-desc.aberto .produto-desc-texto {
    display: block;
    -webkit-line-clamp: unset;
}
/* "Mostrar mais/menos" como chip com fundo branco (não se mistura ao texto) */
.produto-desc-toggle {
    display: block;
    margin: 12px auto 0;            /* desce um pouco, centralizado */
    width: fit-content;
    background: var(--secondary-color, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 16px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    padding: 5px 14px;
}
.produto-desc-toggle:hover { background: var(--background-secondary, #f5f5f5); }

/* Variações: linha compacta (ícone + miniaturas + "X opções disponíveis" + seta) */
.produto-variacoes-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    cursor: pointer;
}
.produto-variacoes-ico { width: 22px; height: 22px; flex-shrink: 0; color: var(--text-secondary, #888); }
.produto-variacoes-thumbs { display: flex; }
.produto-var-thumb {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--secondary-color, #fff);
    margin-left: -8px;
    background: var(--background-secondary, #f0f0f0);
    flex-shrink: 0;
}
.produto-var-thumb:first-child { margin-left: 0; }
.produto-var-thumb img { width: 100%; height: 100%; object-fit: cover; }
.produto-variacoes-label { flex: 1; font-size: 13px; color: var(--text-secondary, #555); }
.produto-variacoes-chev { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-secondary, #aaa); }

/* Accordions (Características, Composição, Diferenciais) */
.produto-accs { padding-top: 0; }
.produto-acc { border-bottom: 1px solid var(--border-color); }
.produto-acc:first-child { border-top: 1px solid var(--border-color); }
.produto-acc-head {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 2px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    color: inherit;
}
.produto-acc-chevron { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s ease; }
.produto-acc.aberto .produto-acc-chevron { transform: rotate(180deg); }
.produto-acc-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.produto-acc.aberto .produto-acc-body { max-height: 1000px; }
.produto-acc-inner,
.produto-acc-texto {
    padding: 0 2px 16px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    color: var(--text-secondary, #555);
}

/* ============================================
   AVALIAÇÕES DO PRODUTO
   ============================================ */
.produto-aval-loading,
.produto-aval-vazio {
    padding: 24px 0;
    text-align: center;
    color: var(--text-secondary, #888);
    font-size: 14px;
}
.produto-aval-vazio .aval-estrela {
    font-size: 28px;
    display: block;
    margin-bottom: 6px;
}

.aval-estrelas { display: inline-flex; gap: 2px; line-height: 1; }
.aval-estrela { color: var(--border-color, #dcdcdc); font-size: 14px; }
.aval-estrela.cheia { color: #f5a623; }
.aval-estrelas.grande .aval-estrela { font-size: 18px; }

/* Resumo: média + distribuição por estrelas */
.produto-aval-resumo {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 4px 0 20px;
    border-bottom: 1px solid var(--border-color, #eee);
    margin-bottom: 8px;
}
.aval-media {
    text-align: center;
    flex-shrink: 0;
    min-width: 92px;
}
.aval-media-num {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-color, #222);
}
.aval-media .aval-estrelas { margin: 6px 0 4px; }
.aval-media-total {
    font-size: 12px;
    color: var(--text-secondary, #888);
}
.aval-dist { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.aval-dist-linha {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary, #888);
}
.aval-dist-num { width: 8px; text-align: right; }
.aval-dist-star { color: #f5a623; font-size: 11px; }
.aval-dist-bar {
    flex: 1;
    height: 6px;
    background: var(--background-secondary, #f0f0f0);
    border-radius: 3px;
    overflow: hidden;
}
.aval-dist-bar > span {
    display: block;
    height: 100%;
    background: #f5a623;
    border-radius: 3px;
}
.aval-dist-qtd { width: 18px; text-align: right; }

/* Lista de avaliações */
.produto-aval-lista { display: flex; flex-direction: column; }
.aval-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}
.aval-item:last-child { border-bottom: none; }
.aval-item-topo { display: flex; align-items: center; gap: 10px; }
.aval-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--background-secondary, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary, #888);
    font-size: 16px;
}
.aval-avatar img { width: 100%; height: 100%; object-fit: cover; }
.aval-item-info { flex: 1; min-width: 0; }
.aval-item-nome {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.aval-origem {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary, #888);
    background: var(--background-secondary, #f0f0f0);
    padding: 2px 7px;
    border-radius: 10px;
}
.aval-item-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.aval-item-data { font-size: 12px; color: var(--text-secondary, #aaa); }
.aval-item-texto {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary, #555);
    white-space: normal;
}
.aval-item-anexo { margin-top: 10px; }
.aval-anexo {
    max-width: 160px;
    max-height: 200px;
    width: auto;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}
img.aval-anexo { cursor: zoom-in; }

.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.color-option:active {
    transform: scale(0.95);
}

.color-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.03);
}

.color-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.color-dot-large {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-option span {
    font-size: 13px;
    font-weight: 500;
}

.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-option {
    min-width: 50px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 13px;
}

.size-option:active:not(.disabled) {
    transform: scale(0.95);
}

.size-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.03);
}

.size-option.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--text-secondary);
}
.size-esgotado {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 2px;
}

.error-message {
    color: #e53935;
    font-size: 12px;
    margin-top: 8px;
    display: none;
    animation: shake 0.3s ease;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.btn-add-to-cart {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add-to-cart:not(:disabled):active {
    transform: scale(0.98);
}

/* ============================================
   KITS
   ============================================ */
/* Tag do kit na página (inline, acima do título). Cores/fonte vêm da tag (inline). */
.kit-tag-badge {
    display: inline-block;
    border-radius: 4px;
    padding: 3px 9px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.kit-stepper { margin-top: 8px; }
.kit-step-indicator {
    font-size: 14px;
    color: var(--text-secondary, #666);
    padding: 14px 0 4px;
    border-top: 1px solid var(--border-color);
}
.kit-step-indicator strong { color: var(--text-color, #222); }

/* Rodapé com dois botões (Peça Anterior + Próxima/Adicionar) dividindo o espaço */
.kit-footer-2 { display: flex; gap: 10px; }
.kit-footer-2 .btn-add-to-cart { flex: 1; }
.btn-kit-nav {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    background: var(--background-secondary, #f2f2f2);
    color: var(--text-color, #222);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.btn-kit-nav svg { width: 18px; height: 18px; }
.btn-kit-nav:active { transform: scale(0.98); }

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-page {
    padding: 20px;
    padding-bottom: 160px;
}

.checkout-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    font-family: inherit;
}

.checkout-back svg {
    width: 18px;
    height: 18px;
}

.checkout-section {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.checkout-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Itens */
.checkout-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.checkout-item:first-of-type {
    padding-top: 0;
}

.checkout-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--background-secondary);
}

.checkout-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--background-secondary);
}

.checkout-item-info {
    flex: 1;
    min-width: 0;
}

.checkout-item-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-variant {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.checkout-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
}

.checkout-price-old {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.checkout-price-final {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Checkout em página única (produto + formulário) ===== */
.checkout2 { padding: 16px 16px 120px; }
.checkout2-itens .section-title { padding: 0; margin: 0 0 14px; font-size: 20px; }
.checkout2-lista {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
}
.checkout2-resumo {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 4px;
}
.checkout2-resumo .btn-checkout { margin-top: 8px; }
.checkout-cartao-fields { margin-top: 14px; }

/* Resumo financeiro */
.checkout-summary-block {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.checkout-summary-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkout-summary-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 4px 0;
}

.checkout-summary-row.text-muted {
    color: var(--text-secondary);
}

.checkout-summary-row.text-discount {
    color: #2e7d32;
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

/* Pagamento */
.checkout-payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-payment-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.checkout-payment-option.selected {
    border-color: var(--primary-color);
}

.checkout-payment-option.disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.checkout-payment-option input[type="radio"] {
    display: none;
}

.checkout-payment-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.checkout-payment-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.checkout-payment-logo-placeholder {
    width: 36px;
    height: 36px;
    background: var(--background-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-payment-logo-placeholder svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.checkout-payment-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkout-payment-check.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: inset 0 0 0 4px var(--secondary-color);
}

.checkout-payment-soon {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--background-secondary);
    border-radius: 4px;
    padding: 3px 8px;
}

/* ============================================


/* ============================================
   CLIENTE PAGE (login / cadastro / perfil)
   ============================================ */

/* Wrapper da página */
.cliente-page {
    padding: calc(var(--header-height) + 24px) 20px 140px;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Hero / cabeçalho da tela */
.cliente-hero {
    text-align: center;
    margin-bottom: 28px;
}
.cliente-hero svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-secondary);
    margin-bottom: 12px;
}
.cliente-hero h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}
.cliente-hero p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Avatar do perfil logado */
.cliente-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

/* Inputs e labels */
.cliente-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
    flex: 1;
}
.cliente-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.cliente-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    background: var(--background);
    color: var(--text-primary);
    transition: border-color 0.2s;
}
.cliente-input:focus { border-color: var(--primary-color); }
.cliente-input-code {
    text-align: center;
    letter-spacing: 8px;
    font-size: 24px;
    font-weight: 700;
}
.cliente-btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 2px 0;
    align-self: flex-start;
}

/* Botões Voltar | Continuar — aparecem abaixo do conteúdo */
.cliente-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}
.cliente-back-btn {
    flex: 1;
    padding: 13px;
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, opacity 0.2s;
}
.cliente-back-btn:active { opacity: 0.7; }
.cliente-next-btn {
    flex: 2;
    padding: 13px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
}
.cliente-next-btn:disabled { opacity: 0.4; cursor: default; }
.cliente-next-btn:active:not(:disabled) { opacity: 0.8; }
.cliente-next-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

/* Barra de progresso do cadastro */
.cad-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
}
.cad-step {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: var(--border-color);
    transition: background 0.3s;
}
.cad-step.done  { background: var(--primary-color); opacity: 0.4; }
.cad-step.active { background: var(--primary-color); }

/* Conteúdo animado dos passos */
.cad-body { animation-duration: 0.22s; animation-fill-mode: both; }
@keyframes slideInRight { from { opacity:0; transform:translateX(24px); } to { opacity:1; transform:none; } }
@keyframes slideInLeft  { from { opacity:0; transform:translateX(-24px); } to { opacity:1; transform:none; } }
.slide-in-right { animation-name: slideInRight; }
.slide-in-left  { animation-name: slideInLeft; }

.cad-titulo {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}
.cad-subtitulo {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: -14px;
    margin-bottom: 16px;
}
.cad-confirm-list { display: flex; flex-direction: column; }

/* CEP preview e erros */
.cep-preview-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--background-secondary);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.cep-preview-box svg { width:16px; height:16px; flex-shrink:0; margin-top:1px; }
.cep-error {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #c62828;
    margin-top: 6px;
}
.cep-error-actions { display: flex; gap: 8px; align-items: center; }

/* Cartão de info do perfil logado */
.cliente-info-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px 16px;
    margin-bottom: 16px;
}
.cliente-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.cliente-info-row:last-child { border-bottom: none; }
.cliente-info-row > span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}
.cliente-info-row > span:last-child { text-align: right; word-break: break-word; }

/* Avatar no nav */
.nav-perfil-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

/* ============================================
   PERFIL LOGADO
   ============================================ */
.perfil-page {
    padding: 24px 16px 120px;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Título da página de perfil — alinhado à foto, mais ao topo */
.perfil-page .section-title {
    padding: 0 4px;
    margin-top: 0;
    margin-bottom: 4px;
}

/* Topo */
.perfil-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 4px 8px;
}
.perfil-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.perfil-top-info {
    flex: 1;
    min-width: 0;
}
.perfil-top-info h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.perfil-top-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.perfil-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    padding: 4px 0 0;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
}
.perfil-link svg { width: 14px; height: 14px; }
.perfil-link.sm { font-size: 12px; color: var(--text-secondary); font-weight: 400; }
.perfil-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    flex-shrink: 0;
}
.perfil-logout-btn svg { width: 20px; height: 20px; }

/* Cards */
.perfil-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}
.perfil-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.perfil-card-head h3 {
    font-size: 15px;
    font-weight: 600;
}

/* Grade de status de pedidos */
.perfil-status-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.status-pedido {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
}
.status-pedido-icon, .atalho-perfil-icon {
    position: relative;
}
.status-pedido-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--text-primary);
}
.status-pedido-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

/* Badge vermelho */
.perfil-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Último pedido vazio */
.perfil-ultimo-vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    color: var(--text-secondary);
}
.perfil-ultimo-vazio svg { width: 34px; height: 34px; }
.perfil-ultimo-vazio p { font-size: 13px; }

/* Atalhos inferiores */
.perfil-atalhos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 10px;
}
.perfil-atalhos-3 { grid-template-columns: repeat(3, 1fr); }
.atalho-perfil {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.atalho-perfil-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--text-primary);
}
.atalho-perfil-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Overlay de dados cadastrais (bottom sheet) */
.dados-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.dados-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.dados-sheet {
    background: var(--secondary-color);
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.28s ease;
}
.dados-overlay.open .dados-sheet { transform: translateY(0); }
.dados-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dados-sheet-head h3 { font-size: 17px; font-weight: 700; }
.dados-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}
.dados-close svg { width: 22px; height: 22px; }
.cliente-info-card.no-border { border: none; padding: 0; }

/* ============================================
   ÚLTIMO PEDIDO (item)
   ============================================ */
.perfil-ultimo-pedido {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.perfil-ultimo-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--background-secondary);
}
.perfil-ultimo-img img { width: 100%; height: 100%; object-fit: cover; }
.perfil-ultimo-img-ph { width: 100%; height: 100%; background: var(--background-secondary); }
.perfil-ultimo-info { flex: 1; min-width: 0; }
.perfil-ultimo-titulo { font-size: 14px; font-weight: 600; }
.perfil-ultimo-sub { font-size: 12px; color: var(--text-secondary); margin: 2px 0 6px; }
.perfil-ultimo-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 99px;
    background: var(--background-secondary);
    color: var(--text-secondary);
}
.perfil-ultimo-status.status-aguardando_pagamento { background: #fff3e0; color: #e65100; }
.perfil-ultimo-status.status-processando { background: #e3f2fd; color: #1565c0; }
.perfil-ultimo-status.status-a_receber { background: #ede7f6; color: #5e35b1; }
.perfil-ultimo-status.status-avaliar { background: #fffde7; color: #f9a825; }
.perfil-ultimo-status.status-devolucao { background: #ffebee; color: #c62828; }
.perfil-ultimo-total { font-size: 15px; font-weight: 700; flex-shrink: 0; }

/* ============================================
   BOTTOM SHEET — Meus pedidos
   ============================================ */
.ped-sheet {
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;
}
.ped-sheet.active { pointer-events: auto; }
.ped-sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ped-sheet.active .ped-sheet-overlay { opacity: 1; }
.ped-sheet-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 88vh;
    background: var(--secondary-color);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}
.ped-sheet.active .ped-sheet-content { transform: translateY(0); }
.ped-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: #d0d0d0;
    margin: 10px auto 4px;
    flex-shrink: 0;
}
.ped-sheet-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 14px;
    border-bottom: 1px solid var(--border-color);
}
.ped-sheet-header h3 { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.ped-sheet-back, .ped-sheet-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}
.ped-sheet-back svg, .ped-sheet-close svg { width: 22px; height: 22px; }
.ped-sheet-back[hidden] { visibility: hidden; display: flex; }
.ped-sheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 16px calc(20px + env(safe-area-inset-bottom));
}
.ped-sheet-loading, .ped-sheet-vazio {
    text-align: center;
    color: var(--text-secondary);
    padding: 44px 16px;
    font-size: 14px;
}

/* Lista */
.ped-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 2px;
    cursor: pointer;
}
.ped-item:last-child { border-bottom: none; }
.ped-item-img, .ped-item-ph {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}
.ped-item-img img { width: 100%; height: 100%; object-fit: cover; }
.ped-item-info { flex: 1; min-width: 0; }
.ped-item-cod { font-size: 14px; font-weight: 600; }
.ped-item-sub { font-size: 12px; color: var(--text-secondary); margin: 2px 0 6px; }
.ped-item-total { font-size: 14px; font-weight: 700; white-space: nowrap; }

/* Detalhe */
.ped-det { padding: 8px 0 0; }
.ped-det-pagar { margin: 14px 0 4px; }
.ped-det-pagar .btn-checkout { margin: 0; }
.ped-det-pagar-hint { font-size: 12px; color: var(--text-secondary); margin-top: 8px; text-align: center; }
.ped-det-produtos { display: flex; flex-direction: column; margin: 14px 0 4px; }
.ped-det-prod {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.ped-det-prod:last-child { border-bottom: none; }
.ped-det-prod-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}
.ped-det-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.ped-det-prod-info { flex: 1; min-width: 0; }
.ped-det-prod-nome { font-size: 14px; font-weight: 500; }
.ped-det-prod-var { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ped-det-prod-qtd { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.ped-det-bloco { border-top: 1px solid var(--border-color); padding: 14px 0; }
.ped-det-bloco:last-child { padding-bottom: 0; }
.ped-det-bloco-tit { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ped-det-linha {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    padding: 5px 0;
}
.ped-det-linha > span:first-child { color: var(--text-secondary); flex-shrink: 0; }
.ped-det-linha > span:last-child { text-align: right; }

/* Avaliação do pedido (formulário + avaliação enviada) */
.ped-aval-estrelas { display: flex; gap: 4px; margin-bottom: 12px; }
.ped-aval-estrelas.static { margin-bottom: 8px; }
.ped-aval-star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #ddd;
    line-height: 0;
}
.ped-aval-estrelas.static .ped-aval-star { cursor: default; }
.ped-aval-star svg { width: 28px; height: 28px; display: block; }
.ped-aval-star.on { color: #f5b301; }
.ped-aval-textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
    background: var(--background);
    color: var(--text-primary);
}
.ped-aval-textarea:focus { outline: none; border-color: var(--text-secondary); }
.ped-aval-fotos-input { display: flex; gap: 10px; margin-bottom: 14px; }
.ped-aval-foto-btn {
    width: 74px;
    height: 74px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.ped-aval-foto-btn.preenchida span {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}
.ped-aval-coment { font-size: 14px; margin: 6px 0 10px; line-height: 1.4; }
.ped-aval-fotos { display: flex; gap: 8px; flex-wrap: wrap; }
.ped-aval-fotos img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: block;
}
.ped-det-linha.total {
    font-size: 16px;
    font-weight: 700;
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
    padding-top: 12px;
}

/* ============================================
   PEDIDO CONFIRMADO
   ============================================ */
.pedido-confirmado {
    padding: calc(var(--header-height) + 40px) 24px 140px;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.pedido-confirmado-icon svg {
    width: 64px;
    height: 64px;
    stroke: #2e7d32;
}
.pedido-confirmado h2 { font-size: 22px; font-weight: 700; }
.pedido-confirmado p { font-size: 15px; color: var(--text-secondary); line-height: 1.5; }
.pedido-confirmado-total {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 16px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
}
.pedido-confirmado-total strong { font-size: 18px; }
.pedido-confirmado-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

/* ============================================
   CUPOM (checkout)
   ============================================ */
.cupom-input-group {
    display: flex;
    gap: 10px;
}
.cupom-input-group input {
    flex: 1;
    padding: 13px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.cupom-input-group input:focus { border-color: var(--primary-color); }
.cupom-aplicar-btn {
    padding: 13px 22px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.cupom-aplicar-btn:disabled { opacity: 0.5; }

.cupom-aplicado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1.5px dashed #2e7d32;
    border-radius: 10px;
    background: #f1f8f1;
}
.cupom-aplicado-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cupom-aplicado-info svg { width: 22px; height: 22px; color: #2e7d32; }
.cupom-aplicado-info strong { display: block; font-size: 14px; }
.cupom-aplicado-info span { font-size: 13px; color: #2e7d32; font-weight: 600; }
.cupom-remover {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   ENDEREÇO (checkout)
   ============================================ */
.endereco-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.endereco-card.selected { border-color: var(--primary-color); }
.endereco-card-info { display: flex; flex-direction: column; gap: 2px; }
.endereco-card-info strong { font-size: 15px; }
.endereco-card-info span { font-size: 13px; color: var(--text-secondary); }
.endereco-card-check {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border-color); flex-shrink: 0; transition: all 0.2s;
}
.endereco-card-check.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: inset 0 0 0 4px var(--secondary-color);
}
.cep-error { font-size: 13px; color: #c62828; padding: 6px 0; }

/* ============================================
   FRETE (checkout)
   ============================================ */
.frete-aviso { font-size: 14px; color: var(--text-secondary); padding: 6px 0; }
.frete-opcao {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.frete-opcao:last-child { margin-bottom: 0; }
.frete-opcao.selected { border-color: var(--primary-color); }
.frete-logo {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.frete-logo img { width: 100%; height: 100%; object-fit: contain; }
.frete-logo svg { width: 24px; height: 24px; stroke: var(--text-secondary); }
.frete-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.frete-info strong { font-size: 14px; }
.frete-info span { font-size: 12px; color: var(--text-secondary); }
.frete-preco { font-size: 15px; font-weight: 700; }
.frete-check {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border-color); flex-shrink: 0; transition: all 0.2s;
}
.frete-check.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: inset 0 0 0 4px var(--secondary-color);
}

/* ============================================
   CARD PRÉ-VENDA
   ============================================ */
.pv-card {
    border-radius: 6px;
    overflow: hidden;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    /* tamanho idêntico ao produto normal — grid cuida disso */
}
.pv-card:active { transform: scale(0.98); }

/* Título e timer — padding no topo do gradiente */
.pv-header {
    padding: 8px 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}
.pv-titulo {
    font-style: italic;
    font-weight: 700;
    color: #fff;
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1.2;
}
.pv-countdown-row {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}
.pv-encerra {
    font-size: 10px;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    flex-shrink: 0;
}
.pv-countdown { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.pv-unit {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    padding: 2px 4px;
    min-width: 22px;
    text-align: center;
}
.pv-num { font-size: 11px; font-weight: 700; color: #fff; line-height: 1.4; display: block; }
.pv-sep { color: rgba(255,255,255,0.9); font-weight: 700; font-size: 10px; }

/* Foto — padding lateral para o gradiente aparecer ao redor */
.pv-img-area {
    flex: 1;
    margin: 0 8px;
    aspect-ratio: 3/4;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.pv-img { width: 100%; height: 100%; object-fit: cover; }
.pv-img-ph { width: 100%; height: 100%; background: rgba(0,0,0,0.1); }

/* Badge % OFF no topo direito da imagem */
.pv-desconto-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 6px;
    z-index: 5;
    pointer-events: none;
}

/* Tag do produto: canto superior esquerdo, sobre a foto (espelha o badge de % à direita).
   Cores/fonte vêm inline (configuráveis por tag no admin). */
.product-tag-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    pointer-events: none;
    border-radius: 4px;
    padding: 2px 6px;
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

/* Info abaixo da foto, ainda dentro do gradiente */
.pv-info {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.pv-nome {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.pv-preco { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pv-preco-antigo {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    text-decoration: line-through;
}
.pv-preco-novo { font-size: 15px; font-weight: 700; color: #fff; }

/* ============================================
   PIX — tela de pagamento
   ============================================ */
.pix-page {
    padding: calc(var(--header-height) + 20px) 16px 120px;
    max-width: 480px;
    margin: 0 auto;
}
.pix-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
/* Nº do pedido (topo) */
.pix-pedido {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

/* QR code */
.pix-qr {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Valor (negrito, abaixo do QR) */
.pix-valor {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
}

/* Copia e Cola */
.pix-copy-wrap { width: 100%; }
.pix-copy-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.pix-copy-row { display: flex; gap: 8px; }
.pix-copy-input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.pix-copy-btn {
    padding: 10px 18px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.pix-copy-btn--copiado {
    background: #7C3AED;
    color: #fff;
    cursor: default;
}

/* Expiração e instrução */
.pix-expira { font-size: 13px; color: var(--text-secondary); }
.pix-instrucao { font-size: 13px; color: var(--text-secondary); text-align: center; line-height: 1.5; }

.ped-item-pagar {
    border-bottom: 1px solid var(--border-color);
    padding: 14px 2px;
}
.ped-item-pagar:last-child { border-bottom: none; }

.ped-item-status-texto {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.btn-pagar-lista {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-pagar-lista:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Faixa de pré-venda na página do kit/conjunto */
.pv-page-banner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
}
.pv-page-banner strong { font-size: 14px; font-weight: 700; }
.pv-page-sub { font-size: 12px; opacity: 0.92; }

/* Linha "Lançamento dia DD/MM - mensagem" (card da Home e banner da página) */
.pv-lancamento { font-size: 12px; line-height: 1.35; color: #fff; opacity: 0.95; }
.pv-info .pv-lancamento { margin-top: 6px; }
.pv-page-banner .pv-lancamento { margin-top: 2px; }
