@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
    --primary: #000000;
    --primary-light: #222222;
    --accent: #A89E91;
    --bg-neutral: #CFC8BF;
    --sub-bg: #EBE6E0;
    --text-dark: #1A1A1A;
    --text-light: #4A4A4A;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.95);
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.03);
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --radius: 0px; /* Sharp corners for luxury feel */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    overflow-x: hidden;
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif; /* Clean, modern sans-serif for body */
}

h1, h2, h3, h4, h5, h6, .serif {
    font-family: 'Crimson Pro', serif; /* Elegant serif for headings */
    font-weight: 400;
}

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

ul {
    list-style: none;
}

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

/* Logo Cloudinary: límites explícitos (evita tamaño intrínseco gigante si falla el CSS o height:100% en flex) */
.main-header .logo .logo-img {
    display: block;
    width: auto;
    max-width: 200px;
    max-height: 72px;
    height: auto;
    object-fit: contain;
}

.container {
    max-width: 1400px; /* Wider container for modern look */
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding: 120px 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.section-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.section-subtitle {
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 15px;
    display: block;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 16px 36px;
    font-weight: 400;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

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

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

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

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

.btn-accent {
    background-color: var(--accent);
    color: var(--white);
    border: 1px solid var(--accent);
}

.btn-accent:hover {
    background-color: transparent;
    color: var(--accent);
}

/* --- Header --- */
.shipping-banner {
    background-color: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 8px 0;
    font-size: 0.70rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.main-header {
    position: sticky;
    top: 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex: 1;
}

.logo a {
    font-size: 1.8rem;
    font-family: 'Crimson Pro', serif;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 2px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo span {
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
}

.nav-menu {
    flex: 2;
    display: flex;
    justify-content: center;
    padding-bottom: 10px;
}

.nav-menu > ul {
    display: flex;
    gap: 45px;
}

.dropdown ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-menu a {
    font-weight: 400;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after, .nav-menu a.active::after {
    width: 100%;
}

.nav-icons {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    position: relative;
    padding: 5px;
    display: flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 25px;
}

.has-dropdown .dropdown {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: var(--white);
    padding: 30px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border-top: 3px solid var(--accent);
    min-width: 650px;
    z-index: 100;
    display: flex;
    gap: 40px;
    text-align: left;
}

.dropdown-section {
    flex: 1;
}

.megamenu-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-section h4 {
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
    letter-spacing: 2px;
}

.dropdown li {
    margin-bottom: 12px;
}

.dropdown li:last-child {
    margin-bottom: 0;
}

.dropdown li a {
    text-transform: none;
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 0;
    transition: var(--transition);
}

.dropdown li a::after { display: none; }

.dropdown li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 30px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

/* --- Full Screen Hero --- */
.hero-fullscreen {
    height: calc(100vh - 110px); /* Minus banner and header */
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}
.btn-white:hover {
    background: rgba(255,255,255,0.8);
}
.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}
.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary);
}

/* --- Split Sections (Z-Pattern) --- */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    min-height: 600px;
}

.split-section.reverse {
    direction: rtl;
}

.split-section.reverse > * {
    direction: ltr;
}

.split-image {
    position: relative;
    overflow: hidden;
}

.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
}

.split-content {
    padding: 80px 10vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--sub-bg);
}

.split-section:nth-child(even) .split-content {
    background-color: var(--white);
}

.split-content .section-title {
    font-size: 2.8rem;
    margin-bottom: 30px;
}

.split-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* --- Features/Categories Grid (Asymmetric) --- */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 350px);
    gap: 20px;
}

.ed-item {
    position: relative;
    overflow: hidden;
    background: var(--bg-neutral);
    display: flex;
    align-items: flex-end;
    padding: 40px;
    transition: var(--transition);
}

.ed-item:hover .ed-bg {
    transform: scale(1.05);
}

.ed-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.8s ease;
}

.ed-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    z-index: 2;
}

.ed-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    width: 100%;
}

.ed-content h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.ed-link {
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.ed-link::after {
    content: '→';
    transition: transform 0.3s;
}
.ed-item:hover .ed-link::after {
    transform: translateX(5px);
}

.ed-large {
    grid-column: span 2;
    grid-row: span 2;
}

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

/* --- Catálogo: pestañas por categoría --- */
.catalog-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 44px;
    max-width: min(960px, 100%);
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.catalog-tabs-scroll {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-left: 4px;
    padding-right: 4px;
}

.catalog-tabs-scroll .catalog-tab {
    flex-shrink: 0;
}

.catalog-tabs .catalog-tab {
    padding: 14px 18px;
    margin-bottom: -1px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-light);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.catalog-tabs .catalog-tab:hover {
    color: var(--primary);
}

.catalog-tabs .catalog-tab.btn-primary {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}

.catalog-tabs .catalog-tab.btn-secondary {
    box-shadow: none;
}

@media (max-width: 480px) {
    .catalog-tabs {
        gap: 8px 12px;
    }
    .catalog-tabs .catalog-tab {
        padding: 12px 14px;
        letter-spacing: 1.5px;
    }
}

/* --- Products --- */
.section-header-modern {
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px 30px;
}

.product-card {
    background: transparent;
    transition: var(--transition);
    position: relative;
}

.product-img {
    height: 380px;
    background: #F5F5F5;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.08);
}

.add-to-cart-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.product-card:hover .add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

.add-to-cart-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.product-info {
    text-align: center;
}

.prod-cat {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 8px;
}

.product-info h3 {
    font-size: 1.2rem;
    font-family: 'Crimson Pro', serif;
    font-weight: 400;
    margin: 0 0 10px;
    color: var(--primary);
}

.price {
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1.05rem;
}

#qty-input::-webkit-outer-spin-button,
#qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Services Page Banner --- */
.page-header {
    background-color: var(--bg-neutral);
    padding: 120px 0 80px;
    text-align: center;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}
.page-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.services-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.service-card {
    background: var(--white);
    padding: 50px 40px;
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
    border-color: var(--bg-neutral);
}

.s-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--accent);
}

.service-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Footer --- */
.main-footer {
    background: var(--primary);
    color: var(--white);
    padding: 100px 0 40px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-brand .logo a {
    color: var(--white);
    font-size: 2rem;
}
.footer-brand .logo span {
    color: var(--accent);
}

.footer-brand p {
    color: #aaa;
    margin: 25px 0;
    line-height: 1.8;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    font-family: 'Helvetica Now Display', Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
}

.social-links a:hover {
    background: var(--accent);
}

.footer-links h4 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: var(--accent);
    font-family: 'Crimson Pro', serif;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a, .footer-links p {
    color: #999;
}

.footer-links ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .editorial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .header-inner {
        flex-wrap: wrap;
    }
    .nav-menu {
        order: 3;
        width: 100%;
    }
    .hero-content h1 { font-size: 3.5rem; }
    .split-section { grid-template-columns: 1fr; }
    .split-image { height: 400px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .services-list-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px 5%;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu > ul {
        flex-direction: column;
        gap: 25px;
        align-items: center;
        width: 100%;
        padding-left: 0;
    }
    .mobile-toggle { display: flex; order: 2;}
    .nav-icons { order: 1; }
    .logo { order: 0; }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-btns { flex-direction: column; }
    .products-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .editorial-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .has-dropdown .dropdown {
        position: static;
        min-width: 100%;
        transform: none;
        padding: 0;
        box-shadow: none;
        border-top: none;
        border-left: none;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin-top 0.4s ease-in-out, padding 0.4s ease-in-out;
    }
    .has-dropdown:hover .dropdown {
        transform: none;
    }
    .has-dropdown.open .dropdown {
        max-height: 1200px;
        opacity: 1;
        visibility: visible;
        margin-top: 15px;
        padding-top: 10px;
    }
    .has-dropdown::after { display: none; }
    .dropdown-section {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .dropdown-section h4 {
        text-align: left;
        color: var(--accent);
        font-size: 0.85rem;
        letter-spacing: 2px;
        margin-bottom: 12px;
        border-bottom: 1px solid #EEEEEE;
        padding-bottom: 5px;
        width: 100%;
    }
    .dropdown-section ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }
    .dropdown li a {
        justify-content: flex-start;
    }
    .nav-menu ul li {
        width: 100%;
    }
    .nav-menu ul li > a {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 10px 0;
        border-bottom: 1px solid #EEEEEE;
    }
    .ed-large, .ed-wide { grid-column: span 1; grid-row: span 1; height: 350px;}
    .split-content { padding: 60px 20px; }
}

/* --- Modal Base (Imported from previous) --- */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; }
.modal-backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
}
.modal-content {
    background: var(--white); width: 100%; max-width: 1000px; max-height: 90vh;
    position: relative; z-index: 2; overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.close-modal {
    position: absolute; top: 20px; right: 25px; background: none; border: none;
    font-size: 2.5rem; color: var(--text-dark); cursor: pointer; z-index: 10;
    font-weight: 300;
}
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; }
.product-detail-image img { width: 100%; height: 100%; min-height: 600px; object-fit: cover; }
.product-detail-info { padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.product-detail-info h2 { font-size: 2.5rem; margin: 10px 0 5px; color: var(--primary); }
.modal-price { font-size: 1.5rem; font-weight: 400; color: var(--text-dark); margin-bottom: 25px; }
.modal-excerpt { font-size: 1rem; color: var(--text-light); margin-bottom: 30px; line-height: 1.8; }
.modal-specs { margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #eee; }
.spec { font-size: 0.9rem; margin-bottom: 12px; display: flex; justify-content: space-between; }
.spec strong { font-weight: 500; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; }
.modal-actions { display: flex; flex-direction: column; gap: 15px; }

@media (max-width: 768px) {
    .product-detail-grid { grid-template-columns: 1fr; }
    .product-detail-image img { min-height: 400px; }
    .product-detail-info { padding: 30px; }
}
