/*
Theme Name: educaninos

Theme URI:
Author: educaninos
Author URI:
Description: Tema custom para educaninos - Traslado Internacional de Mascotas. WordPress + React hybrid theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: educaninos
*/

/* ═══════════════════════════════════════
   WooCommerce Native Pages
   (checkout, cart, my-account)
═══════════════════════════════════════ */

/* Reset default browser margin so the WP-rendered pages don't show
   the 8px white border around header/footer. */
html,
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account,
body.woocommerce-page {
    margin: 0;
    padding: 0;
}

/* Forzar Roboto en todas las páginas WC para igualar con el front Next.js. */
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account,
body.woocommerce-page,
body.woocommerce-cart *,
body.woocommerce-checkout *,
body.woocommerce-account *,
body.woocommerce-page * {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
}

/* Layout */
.wc-page__main {
    min-height: 70vh;
    background: #f7f5f2;
    padding: calc(85px + 4rem) 0 5rem;
}

.wc-page__container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.wc-page--empty-cart .wc-page__container {
    max-width: 1200px;
}

/* ── Branded header for WC pages (mirrors React Header) ── */
.wc-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #671919;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 20px 0;
}

.wc-header__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wc-header__logo {
    display: flex;
    align-items: center;
}

.wc-header__logo-img {
    height: 45px;
    width: auto;
    max-width: none;
    max-height: 45px;
    display: block;
}

.wc-header__nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.wc-header__link {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.wc-header__link:hover {
    color: #C4A265;
}

.wc-header__cart-btn {
    position: relative;
    background: #872021;
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    padding: 0;
    text-decoration: none;
    transition: background 0.2s;
}

.wc-header__cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #C4A265;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
    line-height: 1;
}

.wc-header__cart-btn:hover {
    background: #a32829;
    color: #fff;
}

.wc-header__cart-icon {
    width: 24px;
    height: 24px;
}

.wc-header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.wc-header__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.wc-header__hamburger--open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.wc-header__hamburger--open span:nth-child(2) {
    opacity: 0;
}

.wc-header__hamburger--open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Branded footer for WC pages (logo left, contact + social right) ── */
.wc-footer {
    background-color: #4a1414;
    color: #fff;
    padding: 32px 0;
}

.wc-footer__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.wc-footer__logo {
    display: flex;
    align-items: center;
}

.wc-footer__logo-img {
    width: 130px;
    height: auto;
    display: block;
}

.wc-footer__right {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    margin-left: auto;
}

.wc-footer__group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.wc-footer__heading {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    font-weight: 400;
    margin: 0;
    color: #fff;
}

.wc-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.wc-footer__link:hover {
    opacity: 0.8;
    color: #fff;
}

.wc-footer__legal {
    max-width: 1440px;
    margin: 24px auto 0;
    padding: 16px 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.wc-footer__copyright {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    opacity: 0.8;
}

.wc-footer__legal-link {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.wc-footer__legal-link:hover {
    opacity: 1;
    color: #fff;
    text-decoration: underline;
}

/* ── Branded empty cart ── */
.empty-cart {
    text-align: center;
    background: #fff;
    padding: 4rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.empty-cart__icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: #f7f5f2;
    color: #671919;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-cart__icon svg {
    width: 48px;
    height: 48px;
}

.empty-cart__title {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.75rem;
}

.empty-cart__text {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    color: #555;
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.empty-cart__cta {
    display: inline-block;
    background: #671919;
    color: #fff;
    text-decoration: none;
    padding: 0.9rem 2.25rem;
    border-radius: 8px;
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
}

.empty-cart__cta:hover {
    background: #872021;
    color: #fff;
    transform: translateY(-1px);
}

/* Suggestions grid */
.empty-cart__suggestions {
    margin-top: 4rem;
}

.empty-cart__suggestions-title {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 2rem;
}

.empty-cart__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* ── Product card (mismo diseño que /productos en Next.js) ──
   Replica de react-src/components/ProductCard.css. Si tocas uno,
   sincroniza el otro. El :where() le da especificidad 0 al reset
   para que las reglas con clase de abajo sigan ganando la cascada. */
:where(.empty-cart__suggestions .product-card,
       .empty-cart__suggestions .product-card *,
       .empty-cart__suggestions .product-card *::before,
       .empty-cart__suggestions .product-card *::after) {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.empty-cart__suggestions .product-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    border: 4px solid #D9D9D9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.empty-cart__suggestions .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.empty-cart__suggestions .product-card__image-link {
    display: block;
    text-decoration: none;
}

.empty-cart__suggestions .product-card__image {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    background-color: #FFFFFF;
}

.empty-cart__suggestions .product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.empty-cart__suggestions .product-card__placeholder {
    width: 100%;
    height: 100%;
    background-color: #F7F5F2;
}

.empty-cart__suggestions .product-card__sale-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #e74c3c;
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.empty-cart__suggestions .product-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
    background: #D9D9D9;
    text-align: center;
    align-items: center;
}

.empty-cart__suggestions .product-card__title-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.empty-cart__suggestions .product-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1A1A1A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.empty-cart__suggestions .product-card__size {
    font-size: 1.1rem;
    font-weight: 500;
    color: #000000;
    margin: 0;
    text-align: center;
}

.empty-cart__suggestions .product-card__price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.empty-cart__suggestions .product-card__price--current {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1A1A1A;
}

.empty-cart__suggestions .product-card__price--old {
    font-size: 1.1rem;
    color: #555555;
    text-decoration: line-through;
}

.empty-cart__suggestions .product-card__add-btn {
    width: 100%;
    background-color: #EFB95D;
    color: #1A1A1A;
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    margin-top: auto;
    transition: background-color 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}

.empty-cart__suggestions .product-card__add-btn:hover:not(:disabled) {
    background-color: #e0aa4e;
}

.empty-cart__suggestions .product-card__add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-cart__suggestions .product-card--out-of-stock {
    opacity: 0.6;
}

.empty-cart__suggestions .product-card__stock-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #6b7280;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
}

/* WooCommerce form overrides */
.wc-page .woocommerce {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
}

.wc-page .woocommerce h2,
.wc-page .woocommerce h3 {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    color: #1a1a1a;
}

.wc-page .woocommerce input[type="text"],
.wc-page .woocommerce input[type="email"],
.wc-page .woocommerce input[type="tel"],
.wc-page .woocommerce input[type="number"],
.wc-page .woocommerce select,
.wc-page .woocommerce textarea {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}

.wc-page .woocommerce input:focus,
.wc-page .woocommerce select:focus,
.wc-page .woocommerce textarea:focus {
    border-color: #671919;
    outline: none;
    box-shadow: 0 0 0 2px rgba(103,25,25,0.12);
}

.wc-page .woocommerce button[type="submit"],
.wc-page .woocommerce .button.alt,
.wc-page .woocommerce #place_order {
    background-color: #671919 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.9rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    width: 100% !important;
}

.wc-page .woocommerce button[type="submit"]:hover,
.wc-page .woocommerce .button.alt:hover,
.wc-page .woocommerce #place_order:hover {
    background-color: #872021 !important;
}

.wc-page .woocommerce-info,
.wc-page .woocommerce-message {
    border-top-color: #671919;
}

/* Empty cart / Empty checkout: botón "Ver la tienda" (WC Blocks) */
.wc-page .wp-block-button,
.woocommerce-cart .wp-block-button,
.woocommerce-checkout .wp-block-button,
.wc-block-cart__empty-cart__container .wp-block-button,
.wp-block-woocommerce-empty-cart-block .wp-block-button {
    width: auto !important;
    height: auto !important;
    aspect-ratio: auto !important;
}

.wc-page .wp-block-button__link,
.woocommerce-cart .wp-block-button__link,
.woocommerce-checkout .wp-block-button__link,
.wc-block-cart__empty-cart__container .wp-block-button__link,
.wp-block-woocommerce-empty-cart-block .wp-block-button__link {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    background-color: #671919 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.9rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.wc-page .wp-block-button__link:hover,
.woocommerce-cart .wp-block-button__link:hover,
.woocommerce-checkout .wp-block-button__link:hover,
.wc-block-cart__empty-cart__container .wp-block-button__link:hover,
.wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover {
    background-color: #872021 !important;
}

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

@media (max-width: 768px) {
    .wc-page__container {
        padding: 0 1rem;
    }

    .wc-header__inner,
    .wc-footer__inner {
        padding: 0 1.5rem;
    }

    .wc-header__hamburger {
        display: flex;
    }

    .wc-header__nav {
        position: fixed;
        top: 85px;
        left: 0;
        right: 0;
        background: #671919;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        margin-left: 0;
    }

    .wc-header__nav--open {
        transform: translateY(0);
    }

    .wc-footer__inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .wc-footer__right {
        margin-left: 0;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .wc-footer__group {
        align-items: center;
    }

    .wc-footer__legal {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }

    .empty-cart {
        padding: 3rem 1.25rem;
    }

    .empty-cart__title {
        font-size: 1.4rem;
    }

    .empty-cart__suggestions {
        margin-top: 3rem;
    }

    .empty-cart__suggestions-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .empty-cart__grid {
        grid-template-columns: 1fr;
    }
}
