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

/*
Theme Name: BMK Modern
Version: 1.2.0
Text Domain: bmk-modern
*/

:root {
    --primary-green: #296746;
    --primary-green-dark: #1f3a2b;
    --text-primary: #555555;
    --text-light: #888888;
    --background-light: #ffffff;
    --background-gray: #f8f9fa;
    --font-primary: 'Outfit', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-primary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; width: 100%; }
a { color: var(--primary-green); text-decoration: none; }
h1, h2, h3, h4 { color: var(--primary-green); font-weight: 500; line-height: 1.2; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header & Menu */
.site-header { padding: 15px 0; border-bottom: 2px solid #e1e1e1; background: #fff; position: relative; z-index: 1000; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }

ul.nav-menu { display: flex; gap: 25px; align-items: center; list-style: none; margin: 0; padding: 0; }
ul.nav-menu li { position: relative; font-size: 0.95rem; }
ul.nav-menu li a { color: var(--text-primary); text-transform: none; display: block; padding: 10px 0; transition: color 0.3s; }
ul.nav-menu li a:hover { color: var(--primary-green); }

/* Dropdown Level 1 */
ul.nav-menu .sub-menu { position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-top: 2px solid var(--primary-green); opacity: 0; visibility: hidden; transition: all 0.3s ease; transform: translateY(10px); display: flex; flex-direction: column; padding: 10px 0; }
ul.nav-menu li.has-dropdown:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
ul.nav-menu .sub-menu li { padding: 0; display: block; border-bottom: 1px solid #f0f0f0; }
ul.nav-menu .sub-menu li:last-child { border-bottom: none; }
ul.nav-menu .sub-menu li a { padding: 12px 20px; font-size: 0.9rem; color: #555; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s, color 0.2s; }
ul.nav-menu .sub-menu li a:hover { background: #f9f9f9; color: var(--primary-green); }

/* Dropdown Level 2 (Right Side) */
ul.nav-menu .sub-menu-right { position: absolute; top: -2px; left: 100%; background: #fff; min-width: 320px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-top: 2px solid var(--primary-green); opacity: 0; visibility: hidden; transition: all 0.3s ease; transform: translateX(10px); display: flex; flex-direction: column; padding: 10px 0; }
ul.nav-menu li.has-dropdown-right:hover > .sub-menu-right { opacity: 1; visibility: visible; transform: translateX(0); }

.header-icons { display: flex; gap: 20px; align-items: center; }

/* Buttons */
.btn { display: inline-block; padding: 10px 25px; border-radius: 4px; font-weight: 500; text-align: center; border: 1px solid var(--primary-green); }
.btn-outline { background: transparent; color: var(--primary-green); }

/* Hero */
.hero-section { padding: 120px 20px; background: url('assets/images/hero-bg.webp') center/cover no-repeat; text-align: center; position: relative; }
.hero-section::before { content: ''; position: absolute; inset: 0; background: rgba(41, 103, 70, 0.85); }
.hero-section .container { position: relative; z-index: 2; color: #fff; }
.hero-section h1 { color: #fff; font-size: 3rem; margin-bottom: 20px; }

/* Catalogs */
.catalogs-section { padding: 80px 0; }
.catalogs-section h2 { text-align: center; margin-bottom: 50px; font-size: 2rem; color: var(--text-light); font-weight: 300; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.catalog-card { text-align: center; }
.catalog-img-wrap { width: 120px; height: 120px; margin: 0 auto 20px; }
.catalog-img-wrap img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.catalog-card h3 { font-size: 1.2rem; margin-bottom: 15px; color: var(--text-light); font-weight: 400; }

/* 6 Steps Grid */
.steps-section { padding: 60px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.step-number { width: 60px; height: 60px; background: var(--primary-green); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 600; }
.step-text { color: #888; font-size: 0.95rem; }

/* Qué Hacemos */
.qh-section { padding: 60px 0; }
.qh-title { font-size: 2rem; font-weight: 300; color: var(--text-light); margin-bottom: 40px; }
.qh-text-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 60px; color: #999; font-size: 0.95rem; }
.qh-circles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.qh-circle { aspect-ratio: 1; border: 1px solid #666; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #666; font-size: 0.9rem; font-weight: 300; letter-spacing: 1px; }

/* Map */
.map-section { line-height: 0; }

/* Contact Section */
.home-contact-section { background-color: #eee; background-position: center; background-size: cover; background-repeat: no-repeat; padding: 80px 0; min-height: 500px; position: relative; display: flex; align-items: center; }
.home-contact-box { background: #fff; padding: 50px; max-width: 400px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.home-contact-box h2 { font-size: 1.8rem; font-weight: 300; color: #444; margin-bottom: 30px; }
.home-contact-box p { color: #666; margin-bottom: 15px; font-size: 0.95rem; }

/* Footer */
.site-footer { background: #fff; padding: 40px 0; border-top: 1px solid #eee; }
.footer-widgets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.brand-widget img { max-height: 60px; margin-bottom: 15px; }
.site-info { text-align: center; margin-top: 40px; color: #aaa; font-size: 0.8rem; }

/* -----------------------------------
   PREMIUM CREATIVE ENHANCEMENTS
   ----------------------------------- */
/* Hero Animated Gradient Mask */
.hero-section::after {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(45deg, rgba(41,103,70,0.8), rgba(0,0,0,0.6), rgba(41,103,70,0.4));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero-section h1 {
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    letter-spacing: -1px;
    animation: fadeInUp 1s ease-out forwards;
}

/* Glassmorphism & Hover States */
.catalog-card { background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); padding: 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s; border: 1px solid rgba(255,255,255,0.5); }
.catalog-card:hover { transform: translateY(-15px); box-shadow: 0 20px 40px rgba(41,103,70,0.15); }

/* Pure CSS Catalog Circles */
.catalog-css-circle {
    width: 140px; height: 140px; margin: 0 auto 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center; text-align: center;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.catalog-card:hover .catalog-css-circle { transform: scale(1.1) rotate(5deg); box-shadow: 0 15px 30px rgba(41,103,70,0.2); }
.css-circle-text { color: #fff; font-size: 0.85rem; font-weight: 500; line-height: 1.3; letter-spacing: 0.5px; padding: 0 10px; }

.step-item { background: #fff; padding: 30px 20px; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); transition: all 0.3s ease; position: relative; overflow: hidden; }
.step-item:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(41,103,70,0.1); }
.step-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary-green); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: left; }
.step-item:hover::before { transform: scaleX(1); }

/* Qué Hacemos Enhancements */
.qh-col p { line-height: 1.8; color: #666; font-size: 1.05rem; }
.qh-circle { position: relative; overflow: hidden; transition: all 0.5s ease; cursor: pointer; border-color: rgba(41,103,70,0.3); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
.qh-circle:hover { background: var(--primary-green); border-color: var(--primary-green); color: #fff; transform: scale(1.05); box-shadow: 0 15px 40px rgba(41,103,70,0.2); }
.qh-circle span { position: relative; z-index: 2; transition: color 0.3s; font-weight: 500; }
.qh-circle::after { content: ''; position: absolute; width: 150%; height: 150%; background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%); top: -25%; left: -25%; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.qh-circle:hover::after { opacity: 1; animation: pulse 2s infinite; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }

/* -----------------------------------
   CATALOGS PAGE (page-catalogos.php)
   ----------------------------------- */
.page-catalogos-wrapper { background: #fdfdfd; padding-bottom: 60px; }
.catalog-divider { background: var(--primary-green); padding: 15px 0; margin-bottom: 40px; margin-top: 40px; }
.catalog-divider h2 { color: #fff; font-size: 1.4rem; font-weight: 400; margin: 0; }
.catalog-page-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.catalog-item { text-align: center; }
.catalog-item p { margin-top: 15px; font-size: 0.95rem; color: #666; font-weight: 500; }
.catalog-cover { aspect-ratio: 1 / 1.3; border-radius: 4px; display: flex; align-items: center; justify-content: center; box-shadow: 0 15px 35px rgba(0,0,0,0.15); transition: transform 0.4s ease, box-shadow 0.4s ease; text-align: center; padding: 20px; overflow: hidden; position: relative; border: 1px solid rgba(0,0,0,0.05); }
.catalog-cover:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 25px 45px rgba(0,0,0,0.2); }
.cover-text { color: #fff; font-weight: 700; font-size: 1.2rem; letter-spacing: 1px; z-index: 2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.cover-text.text-dark { color: #222; text-shadow: none; }
.catalog-cover::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.4) 100%); z-index: 1; }

/* -----------------------------------
   WOOCOMMERCE SHOP LOOP
   ----------------------------------- */
ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
ul.products::before, ul.products::after { display: none !important; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: 100% !important; margin: 0 !important; float: none !important; clear: none !important; }
.custom-bmk-product-card { border: 1px solid #e1e8ed; border-radius: 4px; background: #fff; transition: box-shadow 0.3s; display: flex; flex-direction: column; }
.custom-bmk-product-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.bmk-product-inner { display: flex; flex-direction: column; height: 100%; padding: 0; }
.bmk-product-image { padding: 15px; text-align: center; }
.bmk-product-image img { max-width: 100%; height: auto; object-fit: contain; }
.bmk-product-info { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.bmk-product-title { font-size: 1.15rem; font-weight: 400; margin-bottom: 5px; }
.bmk-product-title a { color: #51719b; text-decoration: underline; text-decoration-color: #51719b; text-underline-offset: 3px; }
.bmk-product-title a:hover { color: #355375; }
.bmk-product-price { font-size: 1.1rem; color: #555; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.bmk-product-price .woocommerce-Price-amount { font-weight: 500; }
.bmk-product-price del { font-size: 0.9rem; color: #999; }
.bmk-product-price ins { text-decoration: none; }
.bmk-iva-text { font-size: 0.8rem; color: #888; }
.bmk-product-divider { border: 0; border-top: 1px solid #e1e8ed; margin: auto 0 10px 0; }
.bmk-product-actions { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.bmk-btn-action { color: #666; display: flex; align-items: center; transition: color 0.2s; cursor: pointer; }
.bmk-btn-action:hover { color: var(--primary-green); }

/* WooCommerce Shop Top Controls */
.woocommerce-products-header__title { font-size: 2rem; color: var(--primary-green); margin-bottom: 15px; }
.bmk-shop-controls-wrapper { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.woocommerce-ordering select { padding: 5px 10px; border: 1px solid #ccc; border-radius: 2px; color: #555; font-size: 0.9rem; }
.woocommerce-result-count { color: #666; font-size: 0.9rem; margin-bottom: 0; }

/* -----------------------------------
   WOOCOMMERCE BUTTONS & NOTICES OVERRIDES
   ----------------------------------- */
.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button {
    background-color: var(--primary-green) !important;
    color: #fff !important;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
}
.woocommerce #respond input#submit:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover {
    background-color: var(--primary-green-dark) !important;
    color: #fff !important;
}
.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background-color: var(--primary-green) !important;
    color: #fff !important;
}
.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover {
    background-color: var(--primary-green-dark) !important;
    color: #fff !important;
}

/* Notices */
.woocommerce-message {
    border-top-color: var(--primary-green) !important;
}
.woocommerce-message::before {
    color: var(--primary-green) !important;
}

/* My Account Menu */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 8px;
}
.woocommerce-MyAccount-navigation ul li a {
    color: var(--text-primary);
    padding: 12px 15px;
    display: block;
    border-radius: 6px;
    background: #fdfdfd;
    border: 1px solid #eee;
    transition: all 0.3s;
    font-weight: 500;
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--primary-green);
    color: #fff;
    border-color: var(--primary-green);
}

/* -----------------------------------
   PDF MODAL STYLES
   ----------------------------------- */
.bmk-pdf-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.bmk-pdf-modal.show {
    display: block;
    opacity: 1;
}
.bmk-pdf-modal-content {
    background-color: #fefefe;
    margin: 2.5vh auto;
    padding: 0;
    width: 90vw;
    height: 90vh;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.5);
    animation: animatetop 0.4s;
    border-radius: 8px;
}
@keyframes animatetop {
    from {top: -50px; opacity: 0}
    to {top: 0; opacity: 1}
}
.bmk-pdf-modal-close {
    color: #fff;
    background: var(--primary-green);
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: background 0.2s, transform 0.2s;
}
.bmk-pdf-modal-close:hover {
    background: var(--primary-green-dark);
    transform: scale(1.1);
}
#bmk-pdf-iframe {
    border-radius: 8px;
    background: #fff;
}

/* -----------------------------------
   STANDARD PAGES (LEGAL, ABOUT, ETC)
   ----------------------------------- */
.page-main {
    background-color: #fdfdfd;
}
.page-header-banner {
    background-color: var(--primary-green);
    padding: 60px 20px;
    margin-bottom: -40px; /* Overlap with content box */
}
.page-header-banner .page-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.page-content-container {
    max-width: 900px;
    margin: 0 auto 60px;
    background: #fff;
    padding: 60px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    position: relative;
    z-index: 2;
}
.formatted-page-content {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
}
.formatted-page-content h2,
.formatted-page-content h3,
.formatted-page-content h4 {
    color: var(--primary-green);
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    font-weight: 500;
}
.formatted-page-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.formatted-page-content h3 {
    font-size: 1.4rem;
}
.formatted-page-content h1 {
    font-size: 2.2rem;
    color: var(--primary-green);
    margin-bottom: 1em;
}
.formatted-page-content p {
    margin-bottom: 1.3em;
}
.formatted-page-content ul,
.formatted-page-content ol {
    margin-bottom: 1.5em;
    padding-left: 25px;
}
.formatted-page-content li {
    margin-bottom: 0.5em;
}
.formatted-page-content a {
    color: var(--primary-green);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(41,103,70,0.3);
    transition: all 0.2s;
}
.formatted-page-content a:hover {
    text-decoration-color: var(--primary-green);
    background-color: rgba(41,103,70,0.05);
}

@media (max-width: 768px) {
    .page-content-container {
        padding: 30px 20px;
        margin-bottom: 40px;
    }
    .page-header-banner {
        padding: 40px 20px;
        margin-bottom: -20px;
    }
    .page-header-banner .page-title {
        font-size: 1.8rem;
    }
    .formatted-page-content {
        font-size: 1rem;
    }
}

/* -----------------------------------
   GTRANSLATE FIXED WIDGET
   ----------------------------------- */
.gtranslate_wrapper  {
    position: fixed !important;
    left: 20px;
    bottom: 15px;
    z-index: 9999;
}

/* -----------------------------------
   RESPONSIVENESS (Media Queries)
   ----------------------------------- */
@media (max-width: 1024px) {
    .catalog-grid, .steps-grid, .qh-circles-grid { grid-template-columns: repeat(2, 1fr); }
    ul.products { grid-template-columns: repeat(3, 1fr); }
    .catalog-page-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    /* Header Menu Mobile */
    .site-header { padding: 10px 0; }
    .site-header .container { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
    .site-branding { flex: 1; }
    .menu-toggle { display: block !important; margin-left: auto; }
    .main-navigation { display: none; width: 100%; flex-basis: 100%; transition: all 0.3s ease; }
    .main-navigation.toggled { display: block; margin-top: 15px; }
    ul.nav-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
    ul.nav-menu li { width: 100%; border-bottom: 1px solid #eee; }
    ul.nav-menu li:last-child { border-bottom: none; }
    ul.nav-menu li a { padding: 12px 10px; display: block; }
    ul.nav-menu .sub-menu, ul.nav-menu .sub-menu-right { position: static; box-shadow: none; border: none; opacity: 1; visibility: visible; transform: none; display: none; padding-left: 20px; }
    ul.nav-menu li.has-dropdown:hover > .sub-menu,
    ul.nav-menu li.has-dropdown-right:hover > .sub-menu-right { display: block; }
    
    .hero-section { padding: 80px 20px; }
    .hero-section h1 { font-size: 2.2rem; }
    
    .qh-text-cols { grid-template-columns: 1fr; gap: 20px; }
    .home-contact-box { width: 100%; max-width: none; }
    .footer-widgets { grid-template-columns: 1fr; text-align: center; }
    
    ul.products { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .catalog-page-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .catalog-grid, .steps-grid, .qh-circles-grid { grid-template-columns: 1fr; }
    ul.nav-menu { flex-direction: column; width: 100%; text-align: center; }
    .header-icons { justify-content: center; width: 100%; margin-top: 10px; }
    
    ul.products { grid-template-columns: 1fr; }
    .catalog-page-grid { grid-template-columns: 1fr; }
}
