@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@300;400;500&display=swap');

:root {
    /* Nueva Paleta de Colores */
    --color-jade: #1A8A77;      /* Selvas, sustentabilidad */
    --color-turquoise: #4ECDC4; /* Innovación, confianza */
    --color-earth: #C44536;     /* Pasión, artesanía */
    --color-gold: #D4AF37;      /* Calidad, herencia */
    
    --color-bg-light: #f8f9fa;
    --color-text-dark: #2c3e50;
    --color-text-light: #6c757d;
    --color-white: #ffffff;
    
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    --shadow-soft: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    /* Subtle geometric pattern hint */
    background-image: radial-gradient(var(--color-turquoise) 0.5px, transparent 0.5px), radial-gradient(var(--color-turquoise) 0.5px, var(--color-bg-light) 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-blend-mode: multiply;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-turquoise);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center { text-align: center; }
.text-jade { color: var(--color-jade); }
.text-gold { color: var(--color-gold); }

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px; /* Rounded pill shape for modern feel */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-jade);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(26, 138, 119, 0.4);
}

.btn-primary:hover {
    background-color: #146c5d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 138, 119, 0.6);
}

.btn-secondary {
    background-color: var(--color-earth);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: #a33629;
    transform: translateY(-2px);
}

/* Header */
header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: #2c3e50;
    color: var(--color-white);
    text-align: center;
    padding: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-jade);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -1px;
}

.logo i {
    color: var(--color-gold);
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #eee;
    border-radius: 50px;
    font-family: var(--font-body);
    transition: border-color 0.3s;
    outline: none;
}

.search-bar input:focus {
    border-color: var(--color-jade);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background-color: var(--color-jade);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-bar button:hover {
    background-color: var(--color-earth);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-turquoise);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    background: linear-gradient(135deg, rgba(26, 138, 119, 0.9), rgba(44, 62, 80, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Section Styling */
.section-title {
    text-align: center;
    margin: 4rem 0 2rem;
    font-size: 2.5rem;
    color: #2c3e50;
    position: relative;
}

.section-title span {
    color: var(--color-jade);
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--color-white);
    padding: 2rem;
    text-align: center;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-turquoise);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-earth);
    background: #fff5f5;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    transition: all 0.3s;
}

.category-card:hover .category-icon {
    background: var(--color-earth);
    color: white;
}

/* Products */
.product-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--color-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
    position: relative;
    border: 1px solid #eee;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-gold);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-img {
    height: 250px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    color: var(--color-earth);
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0.5rem 0 1rem;
}

.btn-add-cart {
    width: 100%;
    padding: 0.8rem;
    background-color: white;
    border: 2px solid var(--color-jade);
    color: var(--color-jade);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    background-color: var(--color-jade);
    color: white;
}

/* Cultural Section - Immersive */
.cultural-section {
    background: #2c3e50;
    color: white;
    padding: 5rem 0;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.cultural-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://placehold.co/1920x800/000/FFF?text=Starry+Night');
    opacity: 0.2;
    background-size: cover;
}

.cultural-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4rem;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 4rem 0 1rem;
    margin-top: 0;
    border-top: 5px solid var(--color-jade);
}

.footer h3 {
    color: var(--color-white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-left: 3px solid var(--color-turquoise);
    padding-left: 10px;
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer ul li a:hover {
    color: var(--color-turquoise);
    padding-left: 5px;
}

/* Mobile Responsive & Global Fixes */
@media (max-width: 991px) {
    /* Global Mobile Polish */
    html, body {
        overflow-x: hidden; /* Prevent horizontal scroll */
        width: 100%;
        position: relative;
    }

    body {
        -webkit-font-smoothing: antialiased;
    }

    .container {
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }

    /* Header Adjustments */
    .header-top {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }

    /* Target the inner div with inline styles */
    .header-top .container > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
        justify-content: center !important;
    }

    .header-main {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
        align-items: center !important;
    }
    
    .logo {
        justify-content: center !important;
        font-size: 2rem !important;
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 0.5rem;
    }

    .search-bar {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 0.5rem; /* Add padding inside container */
        box-sizing: border-box;
    }
    
    .search-bar input {
        height: 48px !important; /* Larger touch target */
        font-size: 16px !important; /* No zoom on iOS */
        width: 100% !important;
        box-sizing: border-box;
    }

    .search-bar button {
        width: 40px;
        height: 40px;
        top: 4px;
        right: 4px; /* Adjust for padding */
    }

    /* Standard Responsive Navigation */
    .nav-links {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.8rem !important;
        padding: 0.5rem 0 !important;
        background: transparent;
        border: none;
        overflow: visible !important;
    }

    /* Force hide separator with high specificity */
    .nav-links > div[style] {
        display: none !important;
    }

    .nav-links a {
        padding: 0.5rem 0.9rem !important;
        background-color: #f0f2f5;
        border-radius: 50px;
        font-size: 0.9rem !important;
        white-space: nowrap;
        margin-bottom: 0.5rem;
        display: inline-block;
    }
    
    .nav-links a.active, .nav-links a:hover {
        background-color: var(--color-jade);
        color: white;
    }
    
    /* Hero Section - Override internal styles */
    .hero {
        min-height: auto !important;
        height: auto !important;
        padding: 3rem 1rem !important;
        background-attachment: scroll !important;
        margin-bottom: 2rem !important;
        /* Fix background clipping if needed */
        clip-path: none !important; /* Remove clip path on mobile if it causes overflow issues */
        border-radius: 0 0 20px 20px;
    }

    .hero-content {
        padding: 1rem !important;
        width: 100% !important;
    }

    .hero-content h1 {
        font-size: 2rem !important; /* Force override */
        line-height: 1.2 !important;
        word-wrap: break-word;
    }

    .hero-content p {
        font-size: 1.1rem !important;
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        padding: 0.9rem !important;
        margin-bottom: 0.5rem;
    }
    
    /* Categories Grid */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 1rem !important;
        margin: 2rem 0 !important; /* Reset negative margins if any */
    }

    .category-card {
        padding: 1.2rem 0.8rem !important;
        min-height: auto !important;
    }

    /* Products Grid */
    .product-carousel, .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }

    .product-img {
        height: 150px !important;
    }
    
    .product-info {
        padding: 0.8rem !important;
    }

    .product-title {
        font-size: 0.95rem !important;
    }

    .btn-add-cart {
        padding: 0.6rem !important;
        font-size: 0.85rem !important;
        margin-top: 0.5rem !important;
    }
    
    /* Cultural Section */
    .cultural-section {
        padding: 3rem 0 !important;
        margin-top: 2rem !important;
    }

    .cultural-content {
        flex-direction: column !important;
        gap: 2rem !important;
        text-align: center !important;
        padding: 0 1rem;
    }

    /* Footer */
    footer {
        text-align: center !important;
        padding: 2rem 1rem !important;
    }
    
    .footer h3 {
        border-left: none !important;
        border-bottom: 2px solid var(--color-turquoise);
        display: inline-block;
        padding-bottom: 5px;
        padding-left: 0 !important;
        margin-top: 1.5rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr; /* 1 column for categories on small screens */
    }

    .product-carousel {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 cols for products */
        gap: 0.8rem;
    }
    
    .product-img {
        height: 140px;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
}
