@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --red: #C8102E;
    --red-dark: #A00D24;
    --red-light: #E8344E;
    --grafite: #2D2D2D;
    --grafite-light: #4A4A4A;
    --grafite-dark: #1A1A1A;
    --white: #FFFFFF;
    --off-white: #F8F8F8;
    --gray-100: #F3F3F3;
    --gray-200: #E5E5E5;
    --gray-300: #CCCCCC;
    --gray-500: #888888;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--grafite);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ============ HEADER / NAV ============ */
.nav-top {
    background: var(--grafite-dark);
    color: var(--gray-300);
    font-size: 0.8rem;
    padding: 6px 0;
}

.nav-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-top a {
    color: var(--gray-300);
    transition: var(--transition);
}

.nav-top a:hover {
    color: var(--red-light);
}

.nav-top .info-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-top .info-left i {
    margin-right: 4px;
    color: var(--red);
}

.navbar {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .logo img {
    height: 45px;
    width: auto;
}

.navbar .logo span {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--grafite-dark);
}

.navbar .logo span em {
    font-style: normal;
    color: var(--red);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--grafite);
    position: relative;
    padding: 4px 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--red);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-cart {
    position: relative;
    background: none;
    font-size: 1.3rem;
    color: var(--grafite);
    transition: var(--transition);
    padding: 8px;
}

.btn-cart:hover {
    color: var(--red);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--red);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login {
    background: var(--red);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-login:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
}

.menu-toggle {
    display: none;
    background: none;
    font-size: 1.5rem;
    color: var(--grafite);
}

/* ============ HERO ============ */
.hero {
    position: relative;
    height: 85vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('../../img/hero-bg.png') center/cover no-repeat;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(45, 45, 45, 0.6) 50%, rgba(200, 16, 46, 0.15) 100%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 620px;
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(200, 16, 46, 0.2);
    border: 1px solid rgba(200, 16, 46, 0.4);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--red-light);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 18px;
    animation: fadeInUp 0.8s ease 0.15s both;
}

.hero h1 span {
    color: var(--red-light);
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.45s both;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(200, 16, 46, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* ============ CONTAINER ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ SECTION ============ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--grafite-dark);
    margin-bottom: 12px;
}

.section-header h2 span {
    color: var(--red);
}

.section-header p {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 550px;
    margin: 0 auto;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--red);
    border-radius: 2px;
    margin: 16px auto 0;
}

/* ============ CATEGORIAS ============ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 220px;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.85) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.category-overlay h3 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
}

.category-overlay .cat-count {
    color: var(--red-light);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ============ PRODUTOS ============ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.product-img {
    position: relative;
    height: 220px;
    background: var(--gray-100);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--red);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-badge.esgotado {
    background: var(--gray-500);
}

.product-info {
    padding: 18px;
}

.product-category {
    color: var(--red);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--grafite-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.product-price .current {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--red);
}

.product-price .installment {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.product-stock {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.product-stock i {
    margin-right: 4px;
}

.product-stock.low {
    color: var(--red);
}

.btn-add-cart {
    width: 100%;
    background: var(--grafite-dark);
    color: var(--white);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: var(--red);
}

/* ============ FEATURES ============ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.feature-card {
    text-align: center;
    padding: 36px 24px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--red);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.5rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ============ CART SIDEBAR ============ */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--white);
    z-index: 2001;
    box-shadow: var(--shadow-lg);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.cart-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-close {
    background: none;
    font-size: 1.4rem;
    color: var(--gray-500);
    transition: var(--transition);
}

.cart-close:hover {
    color: var(--red);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
}

.cart-item-img {
    width: 65px;
    height: 65px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-info .price {
    font-size: 0.9rem;
    color: var(--red);
    font-weight: 700;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.cart-item-qty button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--gray-100);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-item-qty button:hover {
    background: var(--red);
    color: var(--white);
}

.cart-item-qty span {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    color: var(--gray-300);
    font-size: 1.1rem;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--red);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.cart-empty i {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    color: var(--gray-300);
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--off-white);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cart-total .value {
    color: var(--red);
}

.btn-checkout {
    width: 100%;
    background: var(--red);
    color: var(--white);
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-checkout:hover {
    background: var(--red-dark);
}

.btn-checkout:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* ============ CHECKOUT MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    font-size: 1.4rem;
    color: var(--gray-500);
}

.modal-close:hover {
    color: var(--red);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--grafite);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--red);
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover {
    border-color: var(--red-light);
}

.payment-option.selected {
    border-color: var(--red);
    background: rgba(200, 16, 46, 0.04);
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option i {
    font-size: 1.3rem;
    color: var(--red);
    width: 24px;
    text-align: center;
}

.payment-option .pay-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.payment-option .pay-info p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.payment-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ FOOTER ============ */
.footer {
    background: var(--grafite-dark);
    color: var(--gray-300);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.footer p,
.footer a {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--red-light);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-brand p {
    margin-top: 14px;
    color: var(--gray-500);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--gray-500);
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--grafite-dark);
    color: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    transform: translateY(80px);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--red-light);
}

/* ============ FILTER BAR ============ */
.filter-bar {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--grafite);
    border: 2px solid transparent;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

.filter-btn.active {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero {
        height: 70vh;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-md);
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section {
        padding: 50px 0;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-img {
        height: 160px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .nav-top .info-left {
        display: none;
    }
}