/* Side Wishlist Drawer Styles */

/* Overlay / Backdrop */
.intex-wishlist-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 999990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.intex-wishlist-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer Container Panel */
.intex-wishlist-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #ffffff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.intex-wishlist-drawer-panel.active {
    transform: translateX(0);
}

/* Prevent body scrolling when drawer is open */
body.intex-drawer-open {
    overflow: hidden !important;
}

/* Wishlist Count Badge */
.custom-intex-header .wishlist-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #000000 !important;
}

.custom-intex-header .wishlist-icon .wishlist-count,
body.woocommerce-active .custom-intex-header .wishlist-icon .wishlist-count {
    position: absolute !important;
    top: -5px !important;
    right: -8px !important;
    background-color: #ef4444 !important; /* Vibrant Red for favorites */
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

/* Filled / Active heart icons in cards and product page */
.intex-card-heart-btn.active svg,
.wishlist-icon-btn.active svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
}

.wishlist-icon-btn.active {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

/* Individual Wishlist Drawer Items */
.drawer-wishlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #f8f9fa;
    padding: 14px 16px;
    border-radius: 12px;
    position: relative;
    border: 1px solid #f0f0f0;
}

.drawer-wishlist-item .drawer-item-img {
    width: 72px;
    height: 72px;
    min-width: 72px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eaeaea;
}

.drawer-wishlist-item .drawer-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.drawer-wishlist-item .drawer-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 28px;
}

.drawer-wishlist-item .drawer-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drawer-wishlist-item .drawer-item-title:hover {
    color: #1c90a1;
}

.drawer-wishlist-item .drawer-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 8px;
}

.drawer-wishlist-item .drawer-item-price {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

/* Add to Cart button inside Wishlist drawer */
.drawer-wishlist-add-to-cart {
    background-color: #1c90a1;
    color: #ffffff !important;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.drawer-wishlist-add-to-cart:hover {
    background-color: #167887;
}

.drawer-wishlist-add-to-cart:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Heart Pop animation */
@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.heart-pop-anim {
    animation: heart-pop 0.35s ease;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .intex-wishlist-drawer-panel {
        width: 100vw;
    }
}
