/**
 * WPC Quick View + Interest List — Styles
 * @package Woo_Product_Carousel
 */

/* ═══════════════════════════════════════════════════════════════
   QUICK VIEW MODAL
   ═══════════════════════════════════════════════════════════════ */

.wpc-quickview {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}

.wpc-quickview--open {
    opacity: 1;
    visibility: visible;
}

.wpc-quickview__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.wpc-quickview__container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
    overflow: hidden;
    transform: scale(.92) translateY(20px);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.wpc-quickview--open .wpc-quickview__container {
    transform: scale(1) translateY(0);
}

.wpc-quickview__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .9);
    border: none !important;
    border-radius: 50%;
    cursor: pointer;
    color: #1f2937;
    transition: background .2s, transform .2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.wpc-quickview__close:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.wpc-quickview__body {
    overflow-y: auto;
    max-height: 85vh;
    overscroll-behavior: contain;
}

/* Loader */
.wpc-quickview__loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.wpc-quickview__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: wpcQvSpin .7s linear infinite;
}

@keyframes wpcQvSpin {
    to { transform: rotate(360deg); }
}

/* Product Layout */
.wpc-quickview__product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

/* Gallery */
.wpc-quickview__gallery {
    background: #f8f9fb;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpc-quickview__main-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.wpc-quickview__main-img img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 8px;
}

.wpc-quickview__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.wpc-quickview__thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 0 !important;
    background: #fff !important;
    transition: border-color .2s;
}

.wpc-quickview__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpc-quickview__thumb--active {
    border-color: #1a1a2e;
}

.wpc-quickview__thumb:hover {
    border-color: #6b7280;
}

/* Info */
.wpc-quickview__info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.wpc-quickview__cats {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
}

.wpc-quickview__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
    margin: 0;
}

.wpc-quickview__brand {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.wpc-quickview__price {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.wpc-quickview__price del {
    color: #9ca3af;
    font-weight: 400;
    font-size: 15px;
    margin-right: 6px;
}

.wpc-quickview__price ins {
    text-decoration: none;
    color: #e63946;
}

.wpc-quickview__desc {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
    max-height: 120px;
    overflow-y: auto;
}

.wpc-quickview__sku {
    font-size: 12px;
    color: #9ca3af;
}

.wpc-quickview__attrs {
    font-size: 13px;
    color: #4b5563;
}

.wpc-quickview__stock {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.wpc-quickview__stock--instock {
    background: #d1fae5;
    color: #065f46;
}

.wpc-quickview__stock--outofstock {
    background: #fee2e2;
    color: #991b1b;
}

/* Add to List Button (in modal) */

.wpc-quickview__add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background: #1a1a2e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    box-shadow: 0 4px 12px rgba(26, 26, 46, .2);
}

.wpc-quickview__add:hover {
    background: #0f3460 !important;
    transform: translateY(-1px);
}

.wpc-quickview__add:active {
    transform: scale(.97);
}

.wpc-quickview__add--added {
    background: #059669 !important;
}

.wpc-quickview__add--added:hover {
    background: #dc2626 !important;
}

.wpc-quickview__add--added:hover span::after {
    content: ' (quitar)';
}

/* WhatsApp Button (in modal) */
.wpc-quickview__wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background: #25d366 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, .25);
    text-decoration: none !important;
}

.wpc-quickview__wa:hover {
    background: #1da851 !important;
    color: #fff !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.wpc-quickview__wa:active {
    transform: scale(.97);
}

.wpc-quickview__wa--disabled {
    opacity: .4;
    pointer-events: none;
}

.wpc-quickview__actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════
   INTEREST LIST — FAB + Panel
   ═══════════════════════════════════════════════════════════════ */

/* Floating Action Button */
.wpc-fab {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99990 !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: #1a1a2e !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(26, 26, 46, .35) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.wpc-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(26, 26, 46, .45);
}

.wpc-fab:active {
    transform: scale(.95);
}

.wpc-fab__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    background: #e63946;
    color: #fff;
    border-radius: 10px;
    opacity: 0;
    transform: scale(0);
    transition: opacity .2s, transform .2s;
}

.wpc-fab--has-items .wpc-fab__count {
    opacity: 1;
    transform: scale(1);
}

/* List Panel (Right slide) */
.wpc-list-panel {
    position: fixed;
    inset: 0;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}

.wpc-list-panel--open {
    opacity: 1;
    visibility: visible;
}

.wpc-list-panel__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.wpc-list-panel__content {
    position: absolute;
    top: 0;
    right: -100%;
    width: 380px;
    max-width: 90vw;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .15);
    transition: right .3s cubic-bezier(.4, 0, .2, 1);
}

.wpc-list-panel--open .wpc-list-panel__content {
    right: 0;
}

.wpc-list-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.wpc-list-panel__header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.wpc-list-panel__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    border: none !important;
    color: #2563eb !important;
    cursor: pointer;
    border-radius: 6px;
    transition: background .2s;
}

.wpc-list-panel__close:hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.wpc-list-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Empty State */
.wpc-list-panel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 8px;
}

.wpc-list-panel__empty p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
}

.wpc-list-panel__empty span {
    font-size: 13px;
    color: #9ca3af;
}

/* List Items */
.wpc-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: background .15s;
}

.wpc-list-item:hover {
    background: #f8f9fb;
}

.wpc-list-item__img {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.wpc-list-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpc-list-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wpc-list-item__name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpc-list-item__price {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.wpc-list-item__remove {
    width: 32px;
    min-width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fee2e2 !important;
    border: none !important;
    color: #dc2626 !important;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s, transform .15s;
}

.wpc-list-item__remove:hover {
    background: #fca5a5 !important;
    transform: scale(1.1);
}

/* Footer */
.wpc-list-panel__footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.wpc-list-panel__clear {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}

.wpc-list-panel__clear:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.wpc-list-panel__whatsapp {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    background: #25D366 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, .3);
}

.wpc-list-panel__whatsapp:hover {
    background: #1ebe5d !important;
    transform: translateY(-1px);
}

.wpc-list-panel__whatsapp:active {
    transform: scale(.97);
}

/* ═══════════════════════════════════════════════════════════════
   ADD TO LIST BUTTON (in carousel card)
   ═══════════════════════════════════════════════════════════════ */

.wpc-add-list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    background: #f8f9fb !important;
    color: #1a1a2e !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none !important;
    line-height: 1.2;
}

.wpc-add-list-btn:hover {
    background: #1a1a2e !important;
    color: #fff !important;
    border-color: #1a1a2e !important;
}

.wpc-add-list-btn--added {
    background: #059669 !important;
    color: #fff !important;
    border-color: #059669 !important;
}

.wpc-add-list-btn--added:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.wpc-add-list-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   BODY STATES
   ═══════════════════════════════════════════════════════════════ */

body.wpc-quickview-open,
body.wpc-panel-open {
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .wpc-quickview__product {
        grid-template-columns: 1fr;
    }

    .wpc-quickview__gallery {
        padding: 16px;
        min-height: auto;
    }

    .wpc-quickview__main-img {
        min-height: 200px;
    }

    .wpc-quickview__main-img img {
        max-height: 250px;
    }

    .wpc-quickview__info {
        padding: 20px;
    }

    .wpc-quickview__title {
        font-size: 18px;
    }

    .wpc-quickview__price {
        font-size: 17px;
    }

    .wpc-quickview__container {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .wpc-fab {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    .wpc-list-panel__content {
        width: 100%;
        max-width: 100vw;
    }
}

@media (max-width: 480px) {
    .wpc-quickview__info {
        padding: 16px;
        gap: 8px;
    }

    .wpc-quickview__title {
        font-size: 16px;
    }

    .wpc-quickview__desc {
        font-size: 13px;
        max-height: 80px;
    }

    .wpc-quickview__add {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}
