:root {
    --primary-red: #e61920;
    --dark-red: #c01015;
    --black: #111111;
    --dark-gray: #222222;
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-image: url('imagens/BG_Site.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--light-gray);
    color: var(--black);
    padding-bottom: 10px;
    /* Space for the bottom cart bar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    text-transform: uppercase;
}

/* Header */
.header {
    background-color: var(--black);
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* Hero Section */
.hero {
    background-image: url('imagens/hero_background.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--white);
    position: relative;
    width: 100%;
    max-width: 1024px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.hero > * {
    display: none !important;
}

.tagline {
    background-color: var(--primary-red);
    color: var(--white);
    display: inline-block;
    padding: 8px 25px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.main-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.85;
    margin-bottom: 10px;
}

.main-title-honda {
    font-size: 7.5rem;
    font-weight: 900;
    color: var(--black);
    letter-spacing: -3px;
    margin: 0;
    padding: 0;
}

.main-title-twister {
    font-size: 9rem;
    font-weight: 900;
    color: var(--primary-red);
    letter-spacing: -3px;
    margin: 0;
    padding: 0;
    -webkit-text-stroke: 5px var(--white);
    text-shadow: 2px 5px 15px rgba(0, 0, 0, 0.3);
    margin-top: -20px;
}

.subtitle-wrapper {
    background-color: var(--white);
    border-radius: 50px;
    padding: 5px 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    display: inline-block;
}

.subtitle {
    font-size: 3rem;
    color: var(--black);
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0;
}

.sizes-box {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(230, 25, 32, 0.3);
    width: 100%;
}

.sizes-box h4 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.sizes-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.size-item h5 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.size-item p {
    font-weight: 700;
    font-size: 1.2rem;
}

.size-item span {
    font-size: 0.9rem;
    font-weight: 400;
}

/* Products Section */
.products-section {
    padding: 60px 0;
}

.products-board {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 45px 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--black);
    margin-bottom: 10px;
    font-style: italic;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-tag {
    background: var(--black);
    color: var(--white);
    display: flex;
    padding: 10px 15px;
    font-weight: 900;
    font-size: 1.2rem;
}

.product-tag .cat {
    color: var(--primary-red);
    margin-right: 10px;
}

.product-image-container {
    height: 200px;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08); /* Efeito de zoom suave de 8% */
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eee 25%, #f9f9f9 25%, #f9f9f9 50%, #eee 50%, #eee 75%, #f9f9f9 75%, #f9f9f9 100%);
    background-size: 20px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    z-index: 2;
}

/* Desenho CSS simulando o formato de um tank pad */
.tank-pad-shape {
    width: 100px;
    height: 140px;
    background-color: var(--dark-gray);
    clip-path: polygon(10% 0, 90% 0, 100% 20%, 80% 40%, 90% 60%, 70% 80%, 50% 100%, 30% 80%, 10% 60%, 20% 40%, 0 20%);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tank-pad-shape::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 80%;
    background-color: var(--primary-red);
    clip-path: polygon(15% 0, 85% 0, 100% 25%, 75% 45%, 85% 65%, 65% 85%, 50% 100%, 35% 85%, 15% 65%, 25% 45%, 0 25%);
}

.product-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    justify-content: flex-end;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.btn-qty {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-qty:hover {
    background: #ddd;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: bold;
    font-size: 1.1rem;
}

.qty-input:focus {
    outline: none;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    right: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: linear-gradient(180deg, #222 0%, #000 100%);
    color: var(--white);
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open,
.cart-drawer:not(.no-hover):hover {
    right: 0;
}

.cart-tab {
    position: absolute;
    left: -60px;
    top: 150px;
    width: 60px;
    height: 70px;
    background: #222;
    border-radius: 15px 0 0 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.3);
}

.cart-icon {
    color: var(--white);
}

.cart-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-red);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-drawer-content {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-drawer-content h3 {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    font-weight: normal;
    text-transform: none;
}

.cart-items-list {
    list-style: none;
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.cart-item-info {
    font-size: 1rem;
    color: #ddd;
}

.cart-item-info span {
    font-weight: bold;
    color: var(--white);
}

.btn-remove-item {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.btn-remove-item:hover {
    color: var(--primary-red);
}

.cart-footer {
    margin-top: auto;
}

.btn-checkout {
    width: 100%;
    font-size: 1rem;
    padding: 15px 0;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-primary:hover:not(:disabled) {
    background: var(--dark-red);
    transform: scale(1.05);
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Toast */
.toast {
    display: none !important; /* Desativado temporariamente */
    position: fixed;
    top: 20px;
    right: -300px;
    /* Hidden initially */
    background: #4caf50;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    z-index: 1000;
    transition: right 0.4s ease;
}

.toast.show {
    right: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--white);
    color: var(--black);
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}

.page-btn:hover:not(:disabled) {
    background: var(--light-gray);
    border-color: #bbb;
}

.page-btn.active {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.page-btn:disabled {
    background: #f9f9f9;
    color: #aaa;
    cursor: not-allowed;
    border-color: #eee;
}

/* Site Footer */
.site-footer {
    background: var(--black);
    color: var(--white);
    padding: 20px 0;
    margin-top: 60px;
    border-top: 5px solid var(--primary-red);
    clip-path: polygon(0 20px, 15% 0, 100% 0, 100% 100%, 0 100%);
    /* Recorte diagonal simulando a imagem */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 10px;
}

.footer-title {
    font-size: 1.8rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 1px;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo-img {
    height: 80px;
    width: 80px;
    /* placeholder size */
    object-fit: contain;
    /*background: #333; */
    /* Fundo temporário para marcar espaço */
    border-radius: 50%;
    /* Se a logo for redonda como na foto */
    display: inline-block;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .tagline {
        font-size: 1.3rem;
    }

    .main-title {
        font-size: 2rem;
    }


    .main-title span {
        font-size: 2.5rem;
    }

    .main-title-group {
        line-height: 0.95;
    }

    .main-title-twister {
        font-size: 5.5rem;
    }

    .main-title-honda {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .sizes-grid {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 15px;
    }

    .size-item {
        flex: 1;
    }

    .cart-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .btn-primary {
        width: 100%;
    }

    .site-footer {
        clip-path: polygon(0 10px, 15% 0, 100% 0, 100% 100%, 0 100%);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-title {
        font-size: 1.1rem;
    }

    .products-board {
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        padding: 0;
        box-shadow: none;
    }
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    background-color: var(--white);
    padding: 15px;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 50px;
    font-weight: 300;
    transition: var(--transition);
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-close:hover {
    color: var(--primary-red);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 40px;
    }
}

/* Botões Secundários no Carrinho */
.btn-secondary {
    background: transparent;
    color: #b0b0b0;
    border: 1px solid #333333;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
    width: 100%;
    margin-top: 10px;
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover:not(:disabled) {
    color: var(--white);
    border-color: var(--primary-red);
    background: rgba(230, 25, 32, 0.08);
    transform: translateY(-2px);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

/* Cursor de ponteiro para imagem ampliável */
.product-image-container {
    cursor: pointer;
}

/* Controles de Quantidade na Gaveta */
.cart-item-qty-control {
    display: flex;
    align-items: center;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
    border: 1px solid #3a3a3a;
}

.cart-item-qty-btn {
    background: none;
    border: none;
    color: #bbb;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-item-qty-btn:hover {
    background: #3a3a3a;
    color: var(--white);
}

.cart-item-qty-input {
    width: 32px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--white);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Modificação no alinhamento do item do carrinho */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #222;
}

.cart-item-info {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #ccc;
    margin-right: 10px;
}

.cart-item-right {
    display: flex;
    align-items: center;
}

/* Modal de Pré-visualização do PDF */
.preview-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-modal.show {
    display: flex;
    opacity: 1;
}

.preview-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    width: 95%;
    max-width: 850px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #111;
    border-bottom: 1px solid #222;
}

.preview-modal-header h2 {
    color: var(--white);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
}

.preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-preview-action {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-transform: uppercase;
    font-family: var(--font-main);
}

.btn-preview-action svg {
    flex-shrink: 0;
}

.btn-preview-action.btn-pdf {
    background: var(--primary-red);
    color: var(--white);
}

.btn-preview-action.btn-pdf:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
}

.btn-preview-action.btn-whatsapp {
    background: #25d366;
    color: var(--white);
}

.btn-preview-action.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
}

.btn-preview-action.btn-close {
    background: #333;
    color: #ccc;
    border: 1px solid #444;
}

.btn-preview-action.btn-close:hover {
    background: #444;
    color: var(--white);
}

.preview-page-container {
    flex-grow: 1;
    background: #2b2b2b;
    padding: 30px 10px;
    overflow-y: auto;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Folha A4 em tamanho fixo de renderização */
.preview-sheet {
    background: #ffffff;
    width: 794px;
    min-height: 1122px;
    margin: 0 auto;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    color: #111111;
    font-family: 'Inter', Arial, sans-serif;
}

/* Responsividade do modal */
@media (max-width: 850px) {
    .preview-modal-content {
        width: 98%;
        height: 95vh;
    }
    
    .preview-modal-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
    }
    
    .preview-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-preview-action {
        flex: 1 1 auto;
        justify-content: center;
    }

    .preview-page-container {
        /* Permite scroll horizontal da folha A4 no celular para não quebrar a proporção */
        overflow-x: auto;
    }
}
