:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

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

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.cart-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.cart-btn svg {
    width: 20px;
    height: 20px;
}

#cartCount {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.main {
    padding: 40px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.search-container {
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

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

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.product-image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 5;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 24px;
    font-weight: 600;
}

.close-cart {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #666;
    transition: color 0.3s ease;
}

.close-cart:hover {
    color: #333;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #999;
    margin-top: 50px;
    font-size: 16px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.quantity-btn {
    background: #f0f0f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.quantity {
    font-size: 16px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.remove-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.3s ease;
}

.remove-btn:hover {
    opacity: 0.8;
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid #eee;
}

.total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

#cartTotal {
    color: #667eea;
}

.checkout-btn {
    width: 100%;
    background: #25d366;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #1ebe57;
    transform: translateY(-2px);
}

.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.checkout-modal.active {
    display: flex;
}

.checkout-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.checkout-content h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.checkout-content .form-group {
    margin-bottom: 15px;
}

.checkout-content .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.checkout-content .form-group input,
.checkout-content .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.checkout-content .form-group input:focus,
.checkout-content .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.checkout-content .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkout-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.checkout-buttons .btn {
    flex: 1;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

.checkout-buttons .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-buttons .btn-danger {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-buttons .btn-primary:hover,
.checkout-buttons .btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.whatsapp-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
    stroke-width: 2.5;
}

/* Estilos da Modal do Produto */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 15px;
}

.product-modal.active {
    display: flex;
}

.product-modal-content {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.product-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.product-modal-close:hover {
    background: #ff6b6b;
    transform: scale(1.1);
}

/* Container da imagem e navegação */
.product-modal-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    overflow: hidden;
}

.product-modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-modal-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    pointer-events: none;
    z-index: 10;
}

.product-modal-nav-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal-nav-btn:hover {
    background: white;
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.product-modal-nav-counter {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.product-modal-info {
    padding: 24px;
    overflow-y: auto;
}

.product-modal-info h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #222;
    line-height: 1.3;
}

.product-modal-info p {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
}

.product-modal-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.product-modal-add-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.product-modal-add-btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 15px 0;
    }

    .logo {
        font-size: 20px;
    }

    .cart-btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .cart-btn svg {
        width: 18px;
        height: 18px;
    }

    .main {
        padding: 30px 0;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .search-container {
        margin-bottom: 20px;
    }

    .search-input {
        max-width: 100%;
        padding: 12px 16px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 15px;
    }

    .product-name {
        font-size: 16px;
    }

    .product-price {
        font-size: 18px;
    }

    .add-to-cart-btn {
        padding: 10px;
        font-size: 14px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-header {
        padding: 20px;
    }

    .cart-header h3 {
        font-size: 20px;
    }

    .cart-items {
        padding: 15px;
    }

    .cart-item {
        gap: 10px;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-name {
        font-size: 14px;
    }

    .cart-footer {
        padding: 20px;
    }

    .total {
        font-size: 18px;
    }

    .checkout-btn {
        padding: 12px;
        font-size: 16px;
    }

    .checkout-content {
        padding: 20px;
        margin: 10px;
    }

    .checkout-content h2 {
        font-size: 20px;
    }

    .checkout-buttons {
        flex-direction: column;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }

    .whatsapp-float span {
        display: none;
    }

    .product-modal-content {
        margin: 10px;
        max-height: 90vh;
    }

    .product-modal-info {
        padding: 20px;
    }

    .product-modal-info h2 {
        font-size: 20px;
    }

    .product-modal-price {
        font-size: 24px;
    }

    .product-modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-image {
        height: 130px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .product-price {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .add-to-cart-btn {
        padding: 10px;
        font-size: 13px;
    }
}
