/* ==========================================================================
   Mispatitas Custom CSS Theme - Core Dark Design System
   ========================================================================== */

/* Design Variables */
:root {
    /* Warm Sophistication palette from DESIGN.md */
    --primary: #ffc483;
    --primary-container: #fe9d00;
    --primary-hover: #ffb868;
    --secondary: #f4bc7f;
    --secondary-hover: #e1ab70;
    --accent: #00c1ff;          /* Cyan – used for WhatsApp CTA per design spec */
    
    --bg-dark: #1a120a;         /* warm dark brown – NOT pure black */
    --bg-surface: #271e15;      /* surface-container */
    --bg-card: #32281f;         /* surface-container-high */
    --bg-card-hover: #3d3329;   /* surface-container-highest */
    
    --text-light: #f0e0d1;      /* warm cream – NOT pure white */
    --text-muted: #dac2ad;      /* on-surface-variant */
    --text-dark: #482900;       /* on-primary */
    --border-color: #544433;    /* outline-variant – warm brown */
    --border-subtle: #827569;   /* outline */
    
    --font-family: 'Plus Jakarta Sans', sans-serif;
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 15px 40px rgba(255, 196, 131, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 80px;
}

/* CSS Reset & Core Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

/* Section Common Styles */
.section {
    padding: 80px 24px;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header-left {
    text-align: left;
    margin-bottom: 48px;
}

.section-tag {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: inline-block;
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.02em;
}

.section-header p,
.section-header-left p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin-top: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-container);
    color: #2b1700;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #2b1700;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 157, 0, 0.4);
}

/* Header & Navbar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(26, 18, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    height: 70px;
    background-color: rgba(26, 18, 10, 0.98);
    box-shadow: var(--shadow-soft);
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-light);
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.6rem;
    transform: rotate(-15deg);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
}

.logo-accent {
    color: var(--primary);
}

/* Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 600;
    color: #aba096;
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-btn-whatsapp {
    background-color: var(--text-light);
    color: #2b1700;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-btn-whatsapp:hover {
    background-color: var(--primary-container);
    color: #2b1700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 157, 0, 0.3);
}

/* Toggle Button for Mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle .bar {
    width: 24px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: var(--transition);
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-surface);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Layout Main Spacer */
.layout-main {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height) - 400px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 24px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    max-width: 650px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-content h1 span {
    color: var(--text-muted);
    opacity: 0.85;
    display: block;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 500px;
}

.btn-hero-whatsapp {
    background-color: var(--text-light);
    color: var(--text-dark);
    padding: 16px 32px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-hero-whatsapp:hover {
    background-color: var(--primary);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 157, 0, 0.4);
}

@media (max-width: 768px) {
    .hero {
        height: 500px;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-content p {
        font-size: 1.05rem;
    }
}

/* ============================================================
   Productos Destacados — Grid (4-col) + Carousel on mobile
   ============================================================ */
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.carousel-controls {
    display: flex;
    gap: 12px;
}

.carousel-control-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-control-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-dark);
}

/* Outer container clips the scrollable track */
.carousel-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* The scrollable row of cards */
.carousel-track {
    display: flex;
    flex-direction: row;      /* ← explicit: always horizontal */
    flex-wrap: nowrap;        /* ← cards must NOT wrap to next line */
    gap: 24px;
    width: 100%;
    overflow-x: auto;         /* allow horizontal scroll on mobile swipe */
    scroll-behavior: smooth;
    /* hide scrollbar cross-browser */
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 4px;      /* tiny buffer to avoid clipping shadows */
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Each card: fixed width so 4 fit in a 1200-px container (gap=24) */
.product-card {
    flex: 0 0 calc(25% - 18px);  /* 4 cols with 3×24 px gaps */
    min-width: 240px;             /* minimum so cards never collapse */
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-dark);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-tag-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--primary-container);
    color: #2b1700;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    z-index: 10;
}

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

.product-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-container);
    margin-bottom: 14px;
    display: block;
}

.btn-whatsapp-card {
    background-color: var(--primary-container);
    color: #2b1700;
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp-card:hover {
    background-color: var(--primary-hover);
    color: #2b1700;
}

/* On screens narrower than the full 4-col grid: let cards be 50% or scrollable */
@media (max-width: 900px) {
    .product-card {
        flex: 0 0 260px;
    }
}

@media (max-width: 540px) {
    .product-card {
        flex: 0 0 220px;
        min-width: 220px;
    }
}

/* ============================================================
   Bento Grid Services
   ============================================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 36px;
}

.bento-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    transition: var(--transition);
}

.bento-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.bento-wide {
    grid-column: span 2;
}

.bento-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.bento-icon {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.bento-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.bento-with-image {
    flex-direction: row;
    position: relative;
    overflow: hidden;
    padding-right: 0;
}

.bento-with-image .bento-card-content {
    max-width: 55%;
    z-index: 10;
}

.bento-image-wrapper {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 45%;
    height: 90%;
    overflow: hidden;
}

.bento-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: var(--radius-sm);
    filter: grayscale(20%);
    transition: var(--transition);
}

.bento-card:hover .bento-image-wrapper img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.bento-location {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    padding-right: 0;
    flex-direction: row;
}

.bento-location .bento-card-content {
    max-width: 55%;
    z-index: 10;
}

.bento-location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.location-arrow {
    color: var(--primary);
    font-size: 1.1rem;
    transition: var(--transition);
    margin-bottom: 24px;
}

.bento-card:hover .location-arrow {
    transform: translate(3px, -3px);
}

.bento-map-wrapper {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 45%;
    height: 100%;
    overflow: hidden;
    opacity: 0.6;
    transition: var(--transition);
}

.bento-map-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.bento-card:hover .bento-map-wrapper {
    opacity: 1;
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-wide {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-wide {
        grid-column: span 1;
    }
    .bento-with-image, .bento-location {
        flex-direction: column;
        padding-right: 32px;
    }
    .bento-with-image .bento-card-content,
    .bento-location .bento-card-content {
        max-width: 100%;
        margin-bottom: 24px;
    }
    .bento-image-wrapper, .bento-map-wrapper {
        position: relative;
        width: 100%;
        height: 180px;
    }
}

/* ============================================================
   Blog Section
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.blog-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.blog-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(254, 157, 0, 0.3);
}

.blog-card-content {
    padding: 24px;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 12px;
}

.blog-date i {
    color: var(--primary);
    margin-right: 6px;
}

.blog-card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.blog-card-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-read-more {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blog-read-more i {
    transition: var(--transition);
}

.blog-card:hover .blog-read-more i {
    transform: translateX(4px);
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ============================================================
   Asesoramiento Banner / Contactenos Section
   ============================================================ */
.asesoramiento-banner {
    background: linear-gradient(135deg, var(--primary-container) 0%, #c77b00 100%);
    color: #2b1700;
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.asesoramiento-banner h2 {
    font-size: 3rem;
    font-weight: 800;
    color: #2b1700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.asesoramiento-banner p {
    font-size: 1.15rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-banner-cta {
    background-color: var(--text-dark);
    color: var(--primary);
    padding: 16px 36px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.btn-banner-cta:hover {
    background-color: #1a1a1a;
    color: var(--primary-hover);
    transform: translateY(-2px);
}

.banner-decor-paw-left,
.banner-decor-paw-right {
    position: absolute;
    font-size: 14rem;
    opacity: 0.08;
    color: var(--text-dark);
    z-index: 1;
}

.banner-decor-paw-left {
    bottom: -60px;
    left: -40px;
    transform: rotate(20deg);
}

.banner-decor-paw-right {
    top: -60px;
    right: -40px;
    transform: rotate(-15deg);
}

@media (max-width: 768px) {
    .asesoramiento-banner h2 {
        font-size: 2.2rem;
    }
}

/* ============================================================
   Footer Styling
   ============================================================ */
.site-footer {
    background-color: #140d06;  /* surface-container-lowest */
    color: var(--text-muted);
    padding: 80px 24px 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.brand-col .footer-logo {
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 320px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.social-links a:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-dark);
    transform: translateY(-3px);
}

.footer-col h3 {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 2px;
    background-color: var(--primary);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}

.footer-col ul li i {
    color: var(--primary);
    margin-top: 4px;
}

.links-col a {
    color: var(--text-muted);
}

.links-col a:hover {
    color: var(--primary);
    padding-left: 6px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
}

.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-legal {
    display: flex;
    gap: 24px;
}

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

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   WhatsApp Floating Button
   ============================================================ */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background-color: var(--accent);  /* Cyan #00c1ff per DESIGN.md */
    color: #003548;
    padding: 16px 24px;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(0, 193, 255, 0.35);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}

.whatsapp-floating-btn i {
    font-size: 1.4rem;
}

.whatsapp-floating-btn:hover {
    transform: scale(1.05) translateY(-2px);
    background-color: #33cfff;
    box-shadow: 0 12px 35px rgba(0, 193, 255, 0.45);
}

@media (max-width: 768px) {
    .whatsapp-floating-btn {
        padding: 16px;
        bottom: 24px;
        right: 24px;
    }
    .whatsapp-floating-btn span {
        display: none;
    }
}
