:root {
    --wine: #7d1618;
    --wine-dark: #4f0d0f;
    --wine-light: #a5292c;
    --cream: #f8f3ec;
    --cream-2: #fffaf5;
    --white: #ffffff;
    --black: #111111;
    --text: #232323;
    --muted: #6f6f6f;
    --border: #eadfd7;
    --success: #24b35a;
    --shadow: 0 16px 35px rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.06);
    --radius: 20px;
    --radius-small: 12px;
    --container: 1240px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    color: var(--text);
    background: var(--cream-2);
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

.container {
    width: min(92%, var(--container));
    margin: 0 auto;
}

/* ===========================
   TOPBAR
=========================== */

.topbar {
    background: var(--black);
    color: var(--white);
    font-size: 0.84rem;
}

.topbar__content {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar__item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar__item i {
    color: #f6d4d4;
}

.topbar__item--center {
    opacity: 0.9;
}

/* ===========================
   HEADER
=========================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header__content {
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.brand__logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand__text strong {
    color: var(--wine);
    font-family: "Oswald", sans-serif;
    font-size: 1.45rem;
    letter-spacing: 0.6px;
}

.brand__text span {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav__link {
    position: relative;
    padding: 14px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: 0.25s ease;
}

.nav__link:hover {
    color: var(--wine);
    background: rgba(125, 22, 24, 0.06);
}

.nav__link.active {
    color: var(--wine);
}

.nav__link.active::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 7px;
    height: 2px;
    background: var(--wine);
    border-radius: 20px;
}

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

.icon-button,
.mobile-menu-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: 0.25s ease;
    color: var(--black);
}

.icon-button:hover,
.mobile-menu-button:hover {
    background: #f4eeee;
    color: var(--wine);
}

.cart-button {
    position: relative;
    min-width: 112px;
    height: 46px;
    border-radius: 12px;
    background: var(--wine);
    color: var(--white);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 22px rgba(125, 22, 24, 0.25);
    transition: 0.25s ease;
}

.cart-button:hover {
    transform: translateY(-2px);
    background: var(--wine-dark);
}

.cart-button__count {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--white);
    color: var(--wine);
    font-size: 0.72rem;
    font-weight: 800;
}

.cart-button__total {
    font-weight: 700;
    font-size: 0.9rem;
}

.mobile-menu-button {
    display: none;
}

/* ===========================
   SEARCH PANEL
=========================== */

.search-panel {
    max-height: 0;
    overflow: hidden;
    background: var(--white);
    border-top: 1px solid var(--border);
    transition: max-height 0.3s ease;
}

.search-panel.open {
    max-height: 110px;
}

.search-panel__box {
    min-height: 94px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-panel__box i {
    color: var(--wine);
}

.search-panel__box input {
    width: 100%;
    border: none;
    outline: none;
    background: #f7f1ed;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text);
}

.search-panel__box button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f3ebea;
    color: var(--wine);
}

/* ===========================
   HERO
=========================== */

.hero {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(
            90deg,
            rgba(7, 7, 7, 0.92) 0%,
            rgba(20, 8, 8, 0.72) 45%,
            rgba(20, 8, 8, 0.18) 78%
        ),
        url("../img/hero-meat.jpg") center / cover no-repeat;
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 50%, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.15) 100%);
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__text {
    max-width: 650px;
    color: var(--white);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(165, 41, 44, 0.92);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(125, 22, 24, 0.28);
}

.hero h1 {
    font-family: "Oswald", sans-serif;
    font-size: clamp(3.3rem, 6vw, 5.7rem);
    line-height: 0.98;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.hero h1 span {
    color: #d63a3d;
}

.hero p {
    max-width: 560px;
    margin-top: 24px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.88);
}

.hero__buttons {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button {
    min-height: 50px;
    padding: 0 22px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
    transition: 0.25s ease;
}

.button--primary {
    color: var(--white);
    background: var(--wine);
    box-shadow: 0 10px 25px rgba(125, 22, 24, 0.32);
}

.button--primary:hover {
    background: var(--wine-light);
    transform: translateY(-2px);
}

.button--outline {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
}

.button--outline:hover {
    background: var(--white);
    color: var(--wine);
}

/* ===========================
   GENERALES DE SECCIÓN
=========================== */

.section {
    padding: 78px 0;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-heading > span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--wine);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 800;
}

.section-heading h2 {
    font-family: "Oswald", sans-serif;
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1;
    color: var(--black);
}

.section-heading p {
    margin-top: 12px;
    color: var(--muted);
}

/* ===========================
   CATEGORÍAS
=========================== */

.categories {
    background: var(--cream-2);
}

.categories__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.category-card {
    position: relative;
    min-height: 260px;
    border-radius: var(--radius);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
    transform: translateZ(0);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.category-card:hover::before {
    transform: scale(1.07);
}

.category-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.08),
        rgba(0, 0, 0, 0.78)
    );
}

.category-card__content {
    position: absolute;
    z-index: 2;
    inset: auto 22px 22px 22px;
    color: var(--white);
}

.category-card__icon {
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(125, 22, 24, 0.9);
    backdrop-filter: blur(5px);
    font-size: 1.3rem;
}

.category-card h3 {
    font-size: 1.55rem;
    line-height: 1.1;
}

.category-card p {
    margin-top: 5px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.83);
}

.category-card span {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.86rem;
    font-weight: 800;
}

.category-card:hover span {
    color: #ffdede;
}

/* ===========================
   PRODUCTOS
=========================== */

.products {
    background: var(--white);
}

.products__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    border: 1px solid #eee3dd;
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.04);
    transition: 0.25s ease;
}

.product-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow);
}

.product-card__image {
    position: relative;
    aspect-ratio: 1.2 / 1;
    overflow: hidden;
    background: #f6efeb;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.04);
}

.product-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: rgba(125, 22, 24, 0.35);
}

.favorite-button {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.94);
    color: var(--wine);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: 0.2s ease;
}

.favorite-button:hover {
    transform: scale(1.07);
    background: var(--wine);
    color: var(--white);
}

.product-card__body {
    padding: 18px;
}

.product-card__category {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fbebeb;
    color: var(--wine);
    font-size: 0.72rem;
    font-weight: 700;
}

.product-card h3 {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.3;
    min-height: 42px;
}

.product-card__price {
    margin-top: 12px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.product-card__price strong {
    color: var(--wine);
    font-size: 1.35rem;
}

.product-card__price span {
    color: var(--muted);
    font-size: 0.84rem;
}

.add-to-cart-button {
    width: 100%;
    margin-top: 16px;
    min-height: 44px;
    border-radius: 10px;
    background: var(--wine);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 800;
    transition: 0.25s ease;
}

.add-to-cart-button:hover {
    background: var(--wine-light);
}

.empty-products {
    grid-column: 1 / -1;
    padding: 60px 24px;
    text-align: center;
    border-radius: var(--radius);
    border: 1px dashed #dec9c9;
    background: #fff8f5;
}

.empty-products__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f1dddd;
    color: var(--wine);
    font-size: 1.7rem;
}

.empty-products h3 {
    font-size: 1.4rem;
}

.empty-products p {
    max-width: 620px;
    margin: 10px auto 0;
    color: var(--muted);
}

/* ===========================
   DELIVERY
=========================== */

.delivery-banner {
    padding: 0 0 25px;
    background: var(--white);
}

.delivery-banner__content {
    min-height: 128px;
    padding: 24px 30px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(
        90deg,
        #f8e5e4,
        #fff4ef
    );
    border: 1px solid #f0d4d1;
}

.delivery-banner__left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.delivery-banner__icon {
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--wine);
    color: var(--white);
    font-size: 1.4rem;
}

.delivery-banner__left strong {
    display: block;
    font-size: 1.25rem;
}

.delivery-banner__left span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.whatsapp-button {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--white);
    background: var(--success);
    font-weight: 800;
    transition: 0.25s ease;
}

.whatsapp-button:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

/* ===========================
   BENEFICIOS
=========================== */

.benefits {
    padding-top: 35px;
    background: var(--white);
}

.benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background: #fffaf7;
    border: 1px solid #f0e5de;
}

.benefit__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2dede;
    color: var(--wine);
}

.benefit h3 {
    font-size: 0.95rem;
}

.benefit p {
    margin-top: 3px;
    font-size: 0.78rem;
    color: var(--muted);
}

/* ===========================
   FOOTER
=========================== */

.footer {
    background: var(--wine-dark);
    color: var(--white);
}

.footer__content {
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.footer__brand img {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--white);
}

.footer__brand strong {
    display: block;
    font-size: 1rem;
}

.footer__brand span {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    opacity: 0.8;
}

.footer p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ===========================
   WHATSAPP FLOTANTE
=========================== */

.floating-whatsapp {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--success);
    color: var(--white);
    font-size: 1.65rem;
    box-shadow: 0 12px 30px rgba(36, 179, 90, 0.36);
    transition: 0.25s ease;
}

.floating-whatsapp:hover {
    transform: translateY(-4px) scale(1.03);
}

/* ===========================
   CARRITO LATERAL
=========================== */

.cart-drawer {
    position: fixed;
    top: 0;
    right: -430px;
    z-index: 2000;
    width: min(420px, 92vw);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.18);
    transition: right 0.35s ease;
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer__header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.cart-drawer__header span {
    color: var(--wine);
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.cart-drawer__header h2 {
    font-family: "Oswald", sans-serif;
    font-size: 2rem;
}

.cart-drawer__header button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f5efec;
    color: var(--wine);
}

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

.cart-empty {
    height: 100%;
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cart-empty > i {
    font-size: 3.6rem;
    color: #ddc4c3;
}

.cart-empty h3 {
    margin-top: 20px;
}

.cart-empty p {
    max-width: 280px;
    margin-top: 8px;
    color: var(--muted);
}

.cart-drawer__footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: #fffaf7;
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.cart-total span {
    font-weight: 700;
}

.cart-total strong {
    color: var(--wine);
    font-size: 1.5rem;
}

.checkout-button {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    background: var(--wine);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 800;
}

.page-overlay {
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

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

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 1100px) {
    .nav {
        gap: 0;
    }

    .nav__link {
        padding-inline: 9px;
        font-size: 0.84rem;
    }

    .brand__text {
        display: none;
    }

    .categories__grid,
    .products__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .topbar__item--center {
        display: none;
    }

    .header__content {
        min-height: 82px;
    }

    .brand__logo {
        width: 75px;
        height: 75px;
    }

    .nav {
        position: absolute;
        top: 82px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: var(--white);
        border-top: 1px solid var(--border);
        box-shadow: 0 14px 25px rgba(0, 0, 0, 0.08);
    }

    .nav.open {
        display: flex;
    }

    .nav__link {
        padding: 13px 14px;
    }

    .nav__link.active::after {
        display: none;
    }

    .mobile-menu-button {
        display: grid;
    }

    .cart-button__total {
        display: none;
    }

    .cart-button {
        min-width: 74px;
    }

    .hero {
        min-height: 500px;
        background-position: 62% center;
    }

    .hero h1 {
        font-size: clamp(3rem, 11vw, 4.5rem);
    }

    .hero p {
        font-size: 1rem;
    }

    .delivery-banner__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .whatsapp-button {
        width: 100%;
    }

    .footer__content {
        padding: 28px 0;
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .topbar__content {
        min-height: 36px;
    }

    .topbar__item:last-child {
        display: none;
    }

    .header__actions {
        gap: 5px;
    }

    .icon-button {
        display: none;
    }

    .hero {
        min-height: 560px;
        background-position: 68% center;
    }

    .hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.18);
    }

    .hero__content {
        z-index: 3;
    }

    .hero__text {
        padding-top: 40px;
    }

    .hero h1 {
        font-size: 3.45rem;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .section {
        padding: 58px 0;
    }

    .categories__grid,
    .products__grid,
    .benefits__grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 230px;
    }

    .product-card h3 {
        min-height: auto;
    }

    .delivery-banner__left {
        align-items: flex-start;
    }

    .delivery-banner__left strong {
        font-size: 1.05rem;
    }

    .floating-whatsapp {
        right: 16px;
        bottom: 16px;
        width: 54px;
        height: 54px;
    }
}

/* =========================================================
   MEJORA VISUAL DEL CARRITO
========================================================= */

.cart-drawer__items {
    padding: 14px 20px 24px;
}

.cart-item {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:first-child {
    padding-top: 10px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item__content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item__info {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cart-item__info strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
}

.cart-item__info span {
    display: block;
    color: var(--wine);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.cart-item__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4d7d2;
    border-radius: 9px;
    background: #fff8f5;
    color: var(--wine);
    font-size: 0.85rem;
    transition: 0.2s ease;
}

.quantity-button:hover {
    background: var(--wine);
    border-color: var(--wine);
    color: var(--white);
}

.cart-item__controls > span {
    min-width: 32px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text);
}

.cart-item__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 2px;
}

.cart-item__subtotal strong {
    color: var(--wine);
    font-size: 1.15rem;
    font-weight: 900;
}

.remove-item-button {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #f7eeee;
    color: var(--wine);
    font-size: 0.95rem;
    transition: 0.2s ease;
}

.remove-item-button:hover {
    background: var(--wine);
    color: var(--white);
}

@media (max-width: 560px) {
    .cart-drawer__items {
        padding-inline: 18px;
    }

    .cart-item {
        padding: 19px 0;
    }
}
