/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #C41E2A;
    --color-dark: #1A1A1A;
    --color-gray-dark: #2D2D2D;
    --color-gray: #6B7280;
    --color-gray-light: #F5F5F5;
    --color-white: #FFFFFF;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-dark);
    line-height: 1.6;
    background: var(--color-white);
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-white);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.header__logo img {
    height: 48px;
    width: auto;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header__nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray);
    transition: color 0.2s;
    position: relative;
}

.header__nav a:hover,
.header__nav a.active {
    color: var(--color-dark);
}

.header__nav a.active::after {
    content: '';
    position: absolute;
    bottom: -28px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.header__search {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--color-dark);
}

.header__search svg {
    width: 20px;
    height: 20px;
}

.header__search-wrapper {
    position: relative;
}

.header__search-form {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    background: var(--color-white);
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
    width: 0;
    opacity: 0;
    transition: width 0.3s, opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.header__search-form.active {
    width: 280px;
    opacity: 1;
}

.header__search-input {
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    font-family: inherit;
}

.header__search-submit {
    background: none;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--color-gray);
    display: flex;
    align-items: center;
}

.header__search-submit svg {
    width: 18px;
    height: 18px;
}

/* Mobile menu */
.header__menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.header__menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-dark);
    margin: 5px 0;
    transition: 0.3s;
}

/* === HERO === */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 80px;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.hero__badge {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.hero__title {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 550px;
}

.hero__text {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    max-width: 480px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn--primary:hover {
    background: #A31820;
    border-color: #A31820;
}

.btn--outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn--outline:hover {
    background: var(--color-white);
    color: var(--color-dark);
}

.btn--dark {
    background: var(--color-dark);
    color: var(--color-white);
    border-color: var(--color-dark);
}

.btn--dark:hover {
    background: #333;
    border-color: #333;
}

/* === SECTION COMMON === */
.section {
    padding: 80px 0;
}

.section--gray {
    background: var(--color-gray-light);
}

.section__subtitle {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.section__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 40px;
}

/* === CATEGORÍAS DE PRODUCTOS === */
.categories__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.category-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    color: inherit;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.category-card__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e0e0e0;
}

.category-card__body {
    padding: 20px;
}

.category-card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-dark);
}

.category-card__desc {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 12px;
    line-height: 1.5;
}

.category-card__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.category-card__link:hover {
    gap: 8px;
}

.category-card__link::after {
    content: '→';
}

/* === PRESENCIA NACIONAL === */
.presence {
    padding: 80px 0;
    background: var(--color-gray-light);
}

.presence__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.presence__features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 24px 0 32px;
}

.presence__feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.presence__icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.presence__icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-white);
}

.presence__feature h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.presence__feature p {
    font-size: 13px;
    color: var(--color-gray);
    line-height: 1.5;
}

.presence__map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.presence__map img {
    width: 100%;
    height: auto;
}

/* === CALIDAD === */
.quality__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.quality-card {
    background: var(--color-white);
    border: 1px solid #E5E7EB;
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.quality-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.quality-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: #FEE2E2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quality-card__icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.quality-card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.quality-card__desc {
    font-size: 13px;
    color: var(--color-gray);
    line-height: 1.6;
}

/* === FOOTER === */
.footer {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 60px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 0.8fr 0.8fr 0.8fr 2fr;
    gap: 30px;
    padding-bottom: 40px;
}

.footer__brand p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-top: 12px;
    line-height: 1.6;
}

.footer__logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer__social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.footer__social a:hover {
    background: var(--color-primary);
}

.footer__social svg {
    width: 18px;
    height: 18px;
    color: var(--color-white);
}

.footer__col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer__col a {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer__col a:hover {
    color: var(--color-white);
}

.footer__info {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
    line-height: 1.5;
}

.footer__phone {
    white-space: nowrap;
    margin-top: 8px;
}

.footer__phone a {
    color: var(--color-white);
    font-weight: 600;
}

.footer__phone a:hover {
    color: var(--color-primary);
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}

.footer__bottom p {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.footer__bottom a {
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
}

.footer__bottom a:hover {
    color: var(--color-white);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .presence__inner {
        grid-template-columns: 1fr;
    }

    .hero__title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .header__nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 16px;
    }

    .header__nav.open {
        display: flex;
    }

    .header__nav a {
        font-size: 16px;
        padding: 8px 0;
    }

    .header__nav a.active::after {
        display: none;
    }

    .header__menu-btn {
        display: block;
    }

    .header__search-wrapper {
        display: none;
    }

    .header__menu-btn.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .header__menu-btn.open span:nth-child(2) {
        opacity: 0;
    }

    .header__menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        min-height: 500px;
        margin-top: 80px;
    }

    .hero__title {
        font-size: 30px;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

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

    .quality__grid {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .section__title {
        font-size: 26px;
    }
}

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

/* === WHATSAPP FLOAT === */
.whatsapp-float {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 9999;
}

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

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    color: #fff;
}
