:root {
    --gold: #D4AF37;
    --gold-dark: #B5952F;
    --gold-light: #F3E5AB;
    --black: #111111;
    --gray-dark: #222222;
    --gray-medium: #444444;
    --gray-light: #EEEEEE;
    --white: #FFFFFF;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.15);
    --shadow-gold: 0 4px 15px rgba(212, 175, 55, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 70px; /* Space for the bottom nav */
}

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

/* Header / Hero */
.hero {
    background-image: url('bg-header.jpg');
    background-size: cover;
    background-position: center;
    color: var(--gold);
    text-align: center;
    padding: 4rem 1rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 17, 0.75); /* Dark overlay */
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--white);
    border-radius: 50% 50% 0 0;
    z-index: 2;
}

.profile-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-module {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
}

.avatar-bg {
    position: absolute;
    inset: 0;
    background: var(--gray-dark);
    border-radius: 50%;
    border: 4px solid var(--gold);
    box-shadow: var(--shadow-gold);
    box-sizing: border-box;
    z-index: 1;
}

.avatar-bottom, .avatar-top {
    position: absolute;
    inset: 4px; /* Permite que las imágenes encajen perfectamente por dentro del borde dorado en la base */
    box-sizing: border-box;
}

.avatar-bottom {
    z-index: 2;
    border-radius: 50%;
    overflow: hidden; /* Recorta la imagen a un círculo perfecto en la mitad inferior */
}

.avatar-top {
    z-index: 3;
    clip-path: polygon(-100% -100%, 200% -100%, 200% 50%, -100% 50%);
    filter: drop-shadow(0 -5px 15px rgba(0,0,0,0.4)); /* Sombra solo para la parte que sobresale */
}

.avatar-img {
    position: absolute;
    width: 140%; 
    left: 50%;
    transform: translateX(-50%) translateY(20px); /* Bajar la imagen para que encaje mejor */
    bottom: 0;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
}

.name {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1rem;
    font-weight: 300;
    color: var(--white);
    letter-spacing: 1px;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

/* Sections Common */
.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--black);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--gold);
    border-radius: 2px;
}

/* Accordions */
.strategic-sections {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--gray-light);
    transition: var(--transition);
}

.accordion:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

.accordion-header {
    width: 100%;
    padding: 1.2rem 1rem;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: var(--black);
    text-align: left;
}

.accordion-header .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-dark);
    margin-right: 15px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.accordion-header .arrow {
    margin-left: auto;
    color: var(--gray-medium);
    transition: transform 0.3s ease;
}

.accordion.active .arrow {
    transform: rotate(180deg);
    color: var(--gold);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: #FAFAFA;
}

.accordion.active .accordion-content {
    padding: 0 1rem 1.2rem;
}

.accordion-content p {
    font-size: 0.95rem;
    color: var(--gray-medium);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
}

.primary-btn {
    background: var(--gold);
    color: var(--black);
    box-shadow: var(--shadow-gold);
}

.primary-btn:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}

.secondary-btn:hover {
    background: var(--black);
    color: var(--gold);
}

.view-all {
    margin-top: 1.5rem;
}

/* Catalog Card */
.catalog-card {
    display: flex;
    align-items: center;
    background: var(--black);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-top: 1rem;
}

.catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.catalog-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-right: 1.5rem;
}

.catalog-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.catalog-info p {
    font-size: 0.85rem;
    color: #CCCCCC;
}

.catalog-action {
    margin-left: auto;
    color: var(--gold);
    font-size: 1.2rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #F5F5F5;
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Permitir hasta 4 líneas para descripciones más largas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4em; /* Espacio mínimo garantizado */
}

.product-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-top: auto;
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 3rem 1rem 4rem;
    margin-top: 3rem;
}

.footer h3 {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.copyright {
    font-size: 0.8rem;
    color: var(--gray-medium);
}

/* Bottom Nav Fijo */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--black);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    padding-bottom: env(safe-area-inset-bottom, 10px); /* Soporte para iPhone notch */
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    border-top: 1px solid var(--gray-dark);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    font-size: 0.75rem;
    gap: 6px;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.nav-item i {
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item:hover {
    color: var(--white);
}

.nav-item:hover i {
    transform: translateY(-4px) scale(1.1);
}

/* Floating WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: #111;
    color: white;
    display: flex;
    align-items: center;
    border-radius: 30px;
    padding: 5px 15px 5px 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
    transition: transform 0.3s ease;
    border: 1px solid #333;
}
.floating-wa:hover {
    transform: scale(1.05);
    color: white;
}
.wa-icon-container {
    background: #25D366;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}
.wa-icon-container i {
    font-size: 1.2rem;
    color: white;
}
.floating-wa span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Modal and Carousel */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--white);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-container {
    position: relative;
    width: 100%;
    background: #f5f5f5;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    min-width: 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide img {
    width: 100%;
    height: 350px;
    object-fit: contain;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.dot.active {
    background: var(--gold);
    transform: scale(1.2);
}

.modal-details {
    padding: 20px;
    overflow-y: auto;
}

.modal-details h3 {
    font-size: 1.2rem;
    color: var(--black);
    margin-bottom: 5px;
}

.modal-price {
    font-size: 1.1rem;
    color: var(--gold-dark);
    font-weight: bold;
    margin-bottom: 15px;
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-bottom: 20px;
    line-height: 1.5;
}

.whatsapp-modal-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #25D366;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}
.whatsapp-modal-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.accordion, .catalog-card, .product-card {
    animation: fadeIn 0.6s ease-out backwards;
}

.accordion:nth-child(1) { animation-delay: 0.1s; }
.accordion:nth-child(2) { animation-delay: 0.2s; }
.accordion:nth-child(3) { animation-delay: 0.3s; }
.catalog-card { animation-delay: 0.4s; }
.product-card:nth-child(1) { animation-delay: 0.5s; }
.product-card:nth-child(2) { animation-delay: 0.6s; }
.product-card:nth-child(3) { animation-delay: 0.7s; }
.product-card:nth-child(4) { animation-delay: 0.8s; }
