@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700&family=Inter:wght@300;400;500&display=swap');

@import './reset.css';
@import './variables.css';

:root {
    --header-height: 100px;
    /* Increased for larger logo */
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
}

a {
    transition: all 0.3s ease;
}

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 768px) {
    .container {
        padding-left: 40px;
        padding-right: 40px;
    }
}

.section {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.25rem 2.5rem;
    background: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn:hover {
    background: var(--color-text);
    color: var(--color-bg);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-text);
}

/* Header */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    width: 120px;
    /* Bigger logo as requested */
    height: auto;
    display: block;
    flex-shrink: 0;
}

nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.cart-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    padding: 5px;
}

.cart-icon {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.6rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    /* Contrast for carousel */
}

.hero-title {
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    letter-spacing: 0.05em;
}

.hero-actions {
    margin-top: 2.5rem;
    /* Added margin as requested */
}

.hero-actions .btn {
    border-color: white;
    color: white;
}

.hero-actions .btn:hover {
    background: white;
    color: black;
}

/* Grid & Product Cards */
.grid {
    display: grid;
    gap: 2.5rem;
    /* Increased gap */
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-image-container {
    width: 100%;
    aspect-ratio: 4/3;
    /* Adjusted to horizontal as requested */
    background-color: #F4F4F4;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the container */
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 5px;
}

.product-name {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-price {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Palette Section */
.palette-section {
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.palette-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.palette-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.palette-color {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.palette-color.white {
    background: #ffffff;
    border-color: #c7c7c7;
}

.palette-color.black {
    background: #000000;
}

.palette-color.dark-gray {
    background: #36383B;
}

.palette-color.water-green {
    background: #7FC3A3;
}

.palette-color.english-green {
    background: #0C3725;
}

.palette-color.orange {
    background: #F8BE38;
}

.palette-color.cream {
    background: #E8DBA0;
}

.palette-color.coral {
    background: #E87A6A;
}

.palette-image-wrapper {
    margin-top: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.palette-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.95;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.05));
}

/* Contact Section */
.contact-section {
    border-top: 1px solid var(--color-border);
}

.contact-info-title {
    margin-bottom: 2rem;
}

.contact-info-name {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-info-detail {
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

.contact-info-email {
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.contact-socials {
    display: flex;
    gap: 1.5rem;
}

.contact-social-link {
    margin: 0;
}

/* Footer Form */
.footer-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.footer-form input:focus,
.footer-form textarea:focus {
    outline: none;
    border-bottom-color: var(--color-text);
}

.footer-form .btn-primary {
    align-self: flex-start;
    margin-top: 1rem;
}

/* Loading */
.loader {
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-text);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
    grid-column: 1 / -1;
}

/* Footer */
footer {
    padding-top: 6rem;
    padding-bottom: 3rem;
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
    text-align: center;
}

footer span {
    display: block;
    font-size: 0.73rem;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

.footer-nav {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-text);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Adjustments (from 320px) */
@media (max-width: 768px) {
    :root {
        --header-height: 80px;
    }

    /* Container padding handled by global .container rule */

    .grid {
        gap: 1.5rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .logo {
        width: 100px;
        /* Slightly smaller but still clear */
    }

    .nav-link {
        font-size: 0.65rem;
        letter-spacing: 0.05em;
    }

    nav {
        gap: var(--spacing-sm);
    }

    .section {
        padding-top: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
    }
}

@media (max-width: 400px) {
    .header-inner {
        flex-direction: column;
        /* Stack logo and nav if very narrow */
        gap: 10px;
        justify-content: center;
    }

    header {
        height: auto;
        padding: 15px 0;
    }
}

/* Ajustes críticos para pantallas pequeñas (hasta 600px) */
@media (max-width: 600px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .grid {
        gap: 1rem;
    }

    /* Prevenir overflow horizontal */
    body {
        overflow-x: hidden;
    }

    * {
        box-sizing: border-box;
    }

    /* Botones más compactos */
    .btn {
        padding: 0.9rem 1rem;
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 25px;
        right: 25px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}

/* -------------------------------- */
/* NEW SECTIONS: Info Bar, About, Advice */
/* -------------------------------- */

/* Info Bar */
.info-bar {
    background-color: var(--color-text);
    /* Black */
    color: var(--color-bg);
    /* White */
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-bar-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-item svg {
    color: var(--color-bg);
    opacity: 0.9;
    flex-shrink: 0;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.info-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.2;
}

/* About Section */
.about-section {
    background-color: var(--color-bg);
    padding-bottom: 2rem;
    /* Reduced padding to avoid huge gap with next section */
    /* Note: .section adds padding-top: 8rem, which is fine here */
}

.about-container {
    display: flex;
    align-items: flex-start;
    gap: 6rem;
    /* Increased gap for better wide layout spacing */
    max-width: 1400px;
    /* Wider than standard 1200px container */
    margin: 0 auto;
    padding: 0 40px;
    /* Ensure padding on edges */
}

.about-image-wrapper {
    flex: 0 0 350px;
    /* Much larger column for the image */
    display: flex;
    justify-content: center;
    /* Center in its column */
    align-items: flex-start;
    /* Align top */
    padding-top: 0.5rem;
}

.about-image {
    width: 100%;
    max-width: 280px;
    /* Significantly larger image */
    height: auto;
    display: block;
}

.about-content {
    flex: 1;
    text-align: left;
}

.about-title {
    text-align: left;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.about-text.accent {
    font-weight: 500;
    margin-top: 2rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

/* Advice Section */
.advice-section {
    background-color: #efefef;
    /* Subtle gray background */
}

.advice-container {
    display: flex;
    justify-content: center;
}

.advice-content {
    max-width: 700px;
    text-align: center;
}

.advice-title {
    margin-bottom: 1.5rem;
}

.advice-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
}

.advice-btn {
    min-width: 250px;
}

/* Responsive Adjustments for New Sections */
@media (max-width: 768px) {

    /* Info Bar */
    .info-bar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .info-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1.5rem;
    }

    .info-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* About Section */
    .about-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .about-image-wrapper {
        flex: auto;
        width: 100%;
        justify-content: center;
        padding-top: 0;
        margin-bottom: 1rem;
    }

    .about-image {
        max-width: 220px;
        /* Good size for mobile without taking over the screen */
    }

    .about-title {
        text-align: center;
        font-size: 1.75rem;
    }

    .about-text {
        font-size: 1rem;
        text-align: center;
        /* Centered on mobile usually looks better for this brand */
    }

    .about-text.accent {
        font-size: 1.125rem;
        text-align: center;
    }

    .palette-image-wrapper {
        margin-top: 2.5rem;
    }

    /* Advice Section */
    .advice-section {
        padding-top: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
    }
}