/* =============================================================================
   Ecolap Custom Gutenberg Blocks — Frontend Styles
   ============================================================================= */

/* ─── Background FX (ecolap/background-fx) ─────────────────────────────────── */
#ecolap-bg-fx {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#ecolap-bg-fx canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Asegurar que el contenido queda encima del fondo fijo */
.site-header,
.site-content,
.site-footer {
    position: relative;
    z-index: 1;
}

/* ─── STOREFRONT HOMEPAGE WRAPPER RESET ────────────────────────────────────── */
/* Storefront adds padding/bg-image to the .type-page wrapper on the homepage.  */
/* These rules zero it all out so our full-bleed blocks sit flush to the header. */

/* Base padding on .type-page */
.page-template-template-homepage .type-page {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Extra padding when page has a featured image (has-post-thumbnail) */
.page-template-template-homepage.has-post-thumbnail .type-page.has-post-thumbnail {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background-image: none !important;
    background-size: unset !important;
}

/* site-main top padding when NO featured image */
.page-template-template-homepage:not(.has-post-thumbnail) .site-main {
    padding-top: 0 !important;
}

/* Scope col-full reset ONLY to the content area, NOT the site-header's col-full */
.page-template-template-homepage-php .site-main .col-full,
.page-template-template-homepage-php #content .col-full {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure the header is never clipped — the circular logo can overflow if needed */
.site-header {
    overflow: visible !important;
}

/* ─── GLOBAL FULL BLEED UTILITY ────────────────────────────────────────────── */
/* Ensure all main section blocks break out of the Storefront .col-full wrapper */
.ecolap-hero-v2,
.ecolap-categories-block,
.ecolap-who-we-are,
.ecolap-impact-stats,
.ecolap-cta-banner {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    max-width: none !important;
}

/* ─── Hero V2 (ecolap/hero) ───────────────────────────────────────────────── */

.ecolap-hero-v2 {
    position: relative;
    background-color: #02120b;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ecolap-hero-v2__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 6rem 2rem;
    width: 100%;
}

.ecolap-hero-v2__title {
    font-family: 'Orbitron', sans-serif !important;
    font-size: clamp(1.75rem, 4vw, 3rem) !important;
    color: #00ff9d !important;
    line-height: 1.15 !important;
    margin-bottom: 1.25rem !important;
}

.ecolap-hero-v2__subtitle {
    color: #d1d5db;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.ecolap-hero-v2__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #00ff9d;
    color: #02120b;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ecolap-hero-v2__btn:hover {
    opacity: 0.85;
    color: #02120b;
    text-decoration: none;
}

.ecolap-hero-v2__image {
    position: relative;
    width: 100%;
    min-height: 600px;
}

#ecolap-hero-3d-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#ecolap-hero-3d-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

@media (max-width: 768px) {
    .ecolap-hero-v2__inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1.25rem;
    }

    /* En móvil: imagen real encima del texto, placeholder oculto */
    .ecolap-hero-v2__image {
        order: -1;
    }

    .ecolap-hero-v2__image-placeholder {
        display: none;
    }

    .ecolap-hero-v2__btn {
        justify-content: center;
    }
}

/* ─── Categories Block (ecolap/categories) ───────────────────────────────── */

.ecolap-categories-block {
    background-color: #02120b;
    padding: 4rem 2rem;
}

.ecolap-categories-block__title {
    font-family: 'Orbitron', sans-serif !important;
    color: #f3f4f6 !important;
    text-align: center;
    font-size: 1.5rem !important;
    margin-bottom: 2.5rem !important;
}

.ecolap-categories-block__grid {
    display: grid;
    grid-template-columns: repeat(var(--ecolap-cat-columns, 3), 1fr);
    gap: 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.ecolap-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: #0a1f12;
    border: 1px solid rgba(0, 255, 157, 0.15);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.ecolap-cat-card:hover {
    border-color: rgba(0, 255, 157, 0.5);
    transform: translateY(-4px);
    text-decoration: none;
}

.ecolap-cat-card__img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 157, 0.08);
}

.ecolap-cat-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecolap-cat-card__icon {
    font-size: 2.5rem;
    color: #00ff9d;
}

.ecolap-cat-card__info {
    text-align: center;
}

.ecolap-cat-card__name {
    display: block;
    color: #f3f4f6;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.ecolap-cat-card__count {
    display: block;
    color: #00ff9d;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .ecolap-categories-block__grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .ecolap-categories-block__grid {
        grid-template-columns: 1fr !important;
    }
}

/* ─── Who We Are Block (ecolap/who-we-are) ───────────────────────────────── */

.ecolap-who-we-are {
    position: relative;
    min-height: 100vh;
    background-color: #02120b;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecolap-who-we-are__overlay {
    position: absolute;
    inset: 0;
    background-color: #02120b;
}

.ecolap-who-we-are__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 5rem 2rem;
    max-width: 760px;
    margin: 0 auto;
}

.ecolap-who-we-are__title {
    font-family: 'Orbitron', sans-serif !important;
    color: #f3f4f6 !important;
    font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
    margin-bottom: 1.5rem !important;
}

.ecolap-who-we-are__text {
    color: #d1d5db;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
}

.ecolap-who-we-are__btn {
    display: inline-block;
    border: 2px solid #00ff9d;
    color: #00ff9d;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ecolap-who-we-are__btn:hover {
    background: #00ff9d;
    color: #02120b;
    text-decoration: none;
}

/* ─── Impact Stats Block (ecolap/impact-stats) ───────────────────────────── */

.ecolap-impact-stats {
    background-color: #0a1f12;
    padding: 4rem 2rem;
}

.ecolap-impact-stats__title {
    font-family: 'Orbitron', sans-serif !important;
    color: #f3f4f6 !important;
    text-align: center;
    font-size: 1.25rem !important;
    margin-bottom: 2.5rem !important;
}

.ecolap-impact-stats__grid {
    display: grid;
    grid-template-columns: repeat(var(--ecolap-stats-count, 4), 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.ecolap-impact-stats__item {
    padding: 1.5rem 1rem;
    border: 1px solid rgba(0, 255, 157, 0.15);
    border-radius: 12px;
    background: rgba(0, 255, 157, 0.03);
}

.ecolap-impact-stats__number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ff9d;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ecolap-impact-stats__value,
.ecolap-impact-stats__suffix {
    color: #00ff9d;
}

.ecolap-impact-stats__label {
    color: #9ca3af;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .ecolap-impact-stats__grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .ecolap-impact-stats__grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ─── CTA Banner Block (ecolap/cta-banner) ───────────────────────────────── */

.ecolap-cta-banner {
    position: relative;
    background-color: #02120b;
    background-size: cover;
    background-position: center;
    padding: 5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 157, 0.15);
    border-bottom: 1px solid rgba(0, 255, 157, 0.15);
}

.ecolap-cta-banner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 18, 11, 0.85);
}

.ecolap-cta-banner__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.ecolap-cta-banner__title {
    font-family: 'Orbitron', sans-serif !important;
    color: #f3f4f6 !important;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem) !important;
    margin-bottom: 1rem !important;
}

.ecolap-cta-banner__subtitle {
    color: #9ca3af;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.ecolap-cta-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #00ff9d;
    color: #02120b;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.875rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ecolap-cta-banner__btn:hover {
    opacity: 0.85;
    color: #02120b;
    text-decoration: none;
}

.ecolap-cta-banner__newsletter {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.ecolap-cta-banner__email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    background: #0a1f12;
    border: 1px solid rgba(0, 255, 157, 0.3);
    color: #f3f4f6;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
}

.ecolap-cta-banner__email-input:focus {
    outline: none;
    border-color: #00ff9d;
}

.ecolap-cta-banner__newsletter-btn {
    background: #00ff9d;
    color: #02120b;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.ecolap-cta-banner__newsletter-btn:hover {
    opacity: 0.85;
}

@media (max-width: 480px) {
    .ecolap-cta-banner__newsletter {
        flex-direction: column;
    }
}

/* ─── Products Block (ecolap/products) ───────────────────────────────────── */

.ecolap-products-block {
    background-color: #02120b;
    padding: 4rem 2rem;
}

.ecolap-products-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    gap: 1rem;
}

.ecolap-products-block__title {
    font-family: 'Orbitron', sans-serif !important;
    color: #f3f4f6 !important;
    font-size: 1.5rem !important;
    margin: 0 !important;
}

.ecolap-products-block__view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #00ff9d;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(0, 255, 157, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
}

.ecolap-products-block__view-all:hover {
    background: rgba(0, 255, 157, 0.08);
    text-decoration: none;
    color: #00ff9d;
}

/* Product grid — overrides ul.products defaults */
.ecolap-products-block .ecolap-products-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--ecolap-products-columns, 3), 1fr) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* Force each product card to be a vertical flex column */
.ecolap-products-block .ecolap-products-grid li.product {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #0a1f12 !important;
    border: 1px solid rgba(0, 255, 157, 0.12) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s !important;
}

.ecolap-products-block .ecolap-products-grid li.product:hover {
    border-color: rgba(0, 255, 157, 0.45) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 40px rgba(0, 255, 157, 0.1) !important;
}

/* Image container — full bleed at top */
.ecolap-products-block .ecolap-products-grid li.product .product-image-container {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
}

.ecolap-products-block .ecolap-products-grid li.product .product-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Info box — grows to fill remaining card height */
.ecolap-products-block .ecolap-products-grid li.product .product-info-box {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Inner link (title + badges + price) grows, pushing button down */
.ecolap-products-block .ecolap-products-grid li.product .product-info-box > a {
    flex: 1 !important;
}

/* Add to cart button — always at bottom */
.ecolap-products-block .ecolap-products-grid li.product .add_to_cart_button,
.ecolap-products-block .ecolap-products-grid li.product .button {
    margin: 0 1.25rem 1.25rem !important;
    width: calc(100% - 2.5rem) !important;
    display: block !important;
    text-align: center !important;
}

@media (max-width: 768px) {
    .ecolap-products-block .ecolap-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .ecolap-products-block .ecolap-products-grid {
        grid-template-columns: 1fr !important;
    }
}
