/* ═══════════════════════════════════════════════════════════════
   EVOLVIX PRODUCT SHOWCASE — Premium WooCommerce Product View
   ═══════════════════════════════════════════════════════════════ */

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

/* ─── Layout Principal ─── */
.eps-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a1a;
    align-items: start;
}

.eps-showcase * {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════
   GALLERY (Left Column)
   ═══════════════════════════════════════ */

.eps-gallery {
    position: sticky;
    top: 30px;
    width: 100%;
    min-width: 0;
}

.eps-gallery-inner {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* Thumbnails */
.eps-thumbs-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.eps-showcase button.eps-thumbs-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    color: #999 !important;
    border-radius: 50% !important;
    transition: all 0.2s ease;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-shadow: none !important;
}

.eps-showcase button.eps-thumbs-nav:hover {
    background: #ebebeb !important;
    color: #444 !important;
}

.eps-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    width: 72px;
    max-height: 472px;
    /* 6 items (72px) + 5 gaps (8px) = 472px */
    overflow-y: hidden;
    /* Hide standard scrollbar but allow JS scrolling */
    scroll-behavior: smooth;
}

.eps-thumbs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari hide scrollbar */
}

.eps-thumb {
    width: 72px;
    height: 72px;
    min-height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.25s ease, opacity 0.25s ease, transform 0.2s ease;
    background: #f8f8f8;
    position: relative;
}

.eps-thumb:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.eps-thumb.active {
    border-color: #0A7E8C;
}

.eps-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eps-video-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.eps-video-overlay-icon svg {
    margin-left: 2px;
}

/* Main Image */
.eps-main-image-wrapper {
    position: relative;
    flex: 1;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.eps-main-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eps-main-slide.active {
    opacity: 1;
    visibility: visible;
}

.eps-main-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.35s ease;
}

.eps-video-wrapper {
    width: auto;
    height: 100%;
    aspect-ratio: 9 / 16;
    /* Vertical aspect ratio */
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.eps-video-wrapper iframe,
.eps-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.eps-main-image-wrapper:hover .eps-main-slide.active img {
    transform: scale(1.03);
}

@keyframes epsSlideIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Gallery Navigation Arrows */
.eps-showcase button.eps-gallery-nav {
    display: flex !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #e0e0e0 !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    color: #666 !important;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.eps-main-image-wrapper:hover button.eps-gallery-nav {
    opacity: 1;
}

.eps-showcase button.eps-gallery-nav:hover {
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    color: #1a1a1a !important;
}

.eps-showcase button.eps-gallery-prev {
    left: 12px;
}

.eps-showcase button.eps-gallery-next {
    right: 12px;
}

/* Gallery Dots */
.eps-gallery-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 6px 0;
}

.eps-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4d4d4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.eps-gallery-dot:hover {
    background: #999;
}

.eps-gallery-dot.active {
    width: 28px;
    border-radius: 4px;
    background: #0A7E8C;
}


/* ═══════════════════════════════════════
   PRODUCT INFO (Right Column)
   ═══════════════════════════════════════ */

.eps-info {
    display: flex;
    flex-direction: column;
}

/* Category */
.eps-product-category {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 8px;
}

/* Title */
.eps-product-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 18px 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* Description */
.eps-product-description {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 24px;
}

.eps-product-description strong,
.eps-product-description b {
    color: #1a1a1a;
    font-weight: 600;
}

.eps-product-description p {
    margin: 0 0 10px 0;
}

.eps-product-description p:last-child {
    margin-bottom: 0;
}


/* ─── Trust Badges ─── */
.eps-trust-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    margin-bottom: 28px;
    padding: 18px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.eps-trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    line-height: 1.3;
}

.eps-trust-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #0A7E8C;
    flex-shrink: 0;
    width: 20px;
}

.eps-trust-badge-text {
    font-weight: 500;
}


/* ─── Variations ─── */
.eps-variations-section {
    margin-bottom: 24px;
}

.eps-section-label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eps-variations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eps-variation-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
    position: relative;
}

.eps-variation-card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.eps-variation-card.active {
    border-color: #0A7E8C;
    background: #f8fcfc;
    box-shadow: 0 0 0 1px #0A7E8C;
}

.eps-variation-card.out-of-stock {
    opacity: 0.5;
    pointer-events: none;
}

.eps-variation-card.out-of-stock::after {
    content: 'Agotado';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #c00;
    background: #ffe5e5;
    padding: 2px 8px;
    border-radius: 4px;
}

.eps-variation-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}

.eps-variation-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eps-variation-info {
    flex: 1;
    min-width: 0;
}

.eps-variation-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.eps-variation-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eps-variation-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}


/* ─── Prices ─── */
.eps-price-current {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.eps-price-regular {
    font-size: 15px;
    font-weight: 500;
    color: #999;
    text-decoration: line-through;
}

.eps-simple-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.eps-simple-price .eps-price-current {
    font-size: 28px;
}

.eps-simple-price .eps-price-regular {
    font-size: 20px;
}

/* Hot Sale activo: precio original tachado para indicar que es el precio "antes" del descuento */
.eps-simple-price--strike .eps-price-current,
.eps-simple-price--strike .eps-price-current .woocommerce-Price-amount,
.eps-simple-price--strike .eps-price-current bdi {
    text-decoration: line-through;
    color: #999;
    opacity: 0.85;
}


/* ─── Add to Cart Button ─── */
.eps-add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 18px 24px;
    background: #EF6C4A;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.eps-add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.eps-add-to-cart-btn:hover::before {
    left: 100%;
}

.eps-add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 108, 74, 0.35);
}

.eps-add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(239, 108, 74, 0.25);
}

.eps-add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.85;
}

.eps-add-to-cart-btn.added {
    background: #27ae60;
}

/* Spinner */
.eps-spinner {
    animation: epsRotate 1s linear infinite;
}

@keyframes epsRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ─── Payment Info ─── */
.eps-payment-info {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    padding: 8px 0;
}

.eps-installments-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.eps-installment-amount {
    font-weight: 700;
    color: #1a1a1a;
}


/* ─── Shipping Info ─── */
.eps-shipping-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fdfdfd;
}

.eps-shipping-icon {
    flex-shrink: 0;
    color: #555;
    margin-top: 1px;
}

.eps-shipping-text {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}


/* ─── Success / Error Messages ─── */
.eps-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    z-index: 99999;
    animation: epsSlideInRight 0.4s ease, epsFadeOut 0.4s ease 2.5s forwards;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-family: 'Inter', sans-serif;
}

.eps-message.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.eps-message.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

@keyframes epsSlideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes epsFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        visibility: hidden;
    }
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 1024px) {
    .eps-showcase {
        gap: 30px;
        padding: 30px 15px;
    }

    .eps-product-title {
        font-size: 26px;
    }

    .eps-thumbs {
        width: 60px;
    }

    .eps-thumb {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .eps-showcase {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px 15px;
    }

    .eps-gallery {
        position: relative;
        top: 0;
    }

    .eps-gallery-inner {
        flex-direction: column-reverse;
    }

    .eps-thumbs-wrapper {
        width: 100%;
        flex-direction: row;
    }

    .eps-thumbs {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-y: visible;
        overflow-x: auto;
        gap: 8px;
        padding: 0 0 4px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .eps-thumbs::-webkit-scrollbar {
        display: none;
    }

    .eps-showcase button.eps-thumbs-nav {
        display: none !important;
    }

    .eps-thumb {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        flex-shrink: 0;
    }

    .eps-main-image-wrapper {
        aspect-ratio: 4 / 3;
    }

    .eps-gallery-nav {
        opacity: 1;
    }

    .eps-product-title {
        font-size: 24px;
    }

    .eps-trust-badges {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .eps-simple-price .eps-price-current {
        font-size: 24px;
    }

    .eps-add-to-cart-btn {
        padding: 16px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .eps-product-title {
        font-size: 22px;
    }

    .eps-variation-card {
        padding: 12px;
    }

    .eps-variation-name {
        font-size: 13px;
    }

    .eps-price-current {
        font-size: 16px;
    }

    .eps-price-regular {
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════
   HOT SALE: Title row + Cucarda
   ═══════════════════════════════════════════ */
.eps-info {
    position: relative;
}

.eps-title-row {
    display: block;
    width: 96%;
}

/* Cuando hay cucarda (absoluta, 120px arriba a la derecha), reservamos espacio
   a la derecha del título para que el texto haga wrap y no quede tapado. */
.eps-title-row--has-badge .eps-product-title {
    padding-right: 130px;
}

.eps-hotsale-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 120px;
    height: 120px;
    z-index: 10;
    pointer-events: none;
    background-color: #E63946;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    clip-path: polygon(50.00% 0.00%, 56.73% 7.53%, 65.45% 2.45%, 69.52% 11.69%, 79.39% 9.55%,
            80.41% 19.59%, 90.45% 20.61%, 88.31% 30.48%, 97.55% 34.55%, 92.47% 43.27%,
            100.00% 50.00%, 92.47% 56.73%, 97.55% 65.45%, 88.31% 69.52%, 90.45% 79.39%,
            80.41% 80.41%, 79.39% 90.45%, 69.52% 88.31%, 65.45% 97.55%, 56.73% 92.47%,
            50.00% 100.00%, 43.27% 92.47%, 34.55% 97.55%, 30.48% 88.31%, 20.61% 90.45%,
            19.59% 80.41%, 9.55% 79.39%, 11.69% 69.52%, 2.45% 65.45%, 7.53% 56.73%,
            0.00% 50.00%, 7.53% 43.27%, 2.45% 34.55%, 11.69% 30.48%, 9.55% 20.61%,
            19.59% 19.59%, 20.61% 9.55%, 30.48% 11.69%, 34.55% 2.45%, 43.27% 7.53%);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
    animation: epsHotsalePulse 2.6s ease-in-out infinite;
    transform-origin: center center;
}

.eps-hotsale-badge::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76%;
    height: 76%;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.55);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.eps-hotsale-badge-main {
    position: relative;
    font-size: 18px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.eps-hotsale-badge-sub {
    position: relative;
    font-size: 9.5px;
    font-weight: 600;
    margin-top: 5px;
    padding: 0 10px;
    opacity: 0.95;
    display: block;
}

@keyframes epsHotsalePulse {

    0%,
    100% {
        transform: rotate(-8deg) scale(1);
    }

    50% {
        transform: rotate(-8deg) scale(1.05);
    }
}

/* ═══════════════════════════════════════════
   HOT SALE: Dual payment buttons
   ═══════════════════════════════════════════ */
.eps-hotsale-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.eps-hotsale-buttons--single {
    grid-template-columns: 1fr;
}

.eps-pay-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    min-height: 84px;
}

.eps-pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.eps-pay-btn[data-method="transfer"] {
    background-color: #0A7E8C;
}

.eps-pay-btn[data-method="card"] {
    background-color: #EF6C4A;
}

.eps-pay-btn .eps-btn-text {
    font-size: 15px;
    font-weight: 700;
}

.eps-pay-btn .eps-pay-btn-price {
    font-size: 20px;
    font-weight: 800;
}

.eps-pay-btn .eps-pay-btn-price .woocommerce-Price-amount,
.eps-pay-btn .eps-pay-btn-price bdi {
    color: #fff;
}

.eps-pay-btn .eps-pay-btn-sublabel {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.9;
}

.eps-pay-btn.loading {
    opacity: 0.85;
    pointer-events: none;
}

.eps-pay-btn .eps-btn-loading .eps-spinner {
    animation: epsRotate 0.9s linear infinite;
}

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

    .eps-hotsale-badge {
        width: 90px;
        height: 90px;
        top: -6px;
        right: -6px;
    }

    .eps-title-row--has-badge .eps-product-title {
        padding-right: 100px;
    }

    .eps-hotsale-badge-main {
        font-size: 14px;
    }

    .eps-hotsale-badge-sub {
        font-size: 8.5px;
        margin-top: 3px;
        padding: 0 6px;
    }
}