/* Dflex Woo Theme - Wishlist Styles */

.dflex-wishlist-panel,
.dflex-wishlist-panel *,
.dflex-wishlist-overlay {
    box-sizing: border-box;
}

body.dflex-wishlist-open {
    overflow: hidden;
}

/* Header Icon */
.dflex-wishlist-header-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    transition: color 0.2s;
}

.dflex-wishlist-header-icon:hover {
    color: var(--dflex-color-primary, #E53935);
}

.dflex-wishlist-header-icon .dflex-wishlist-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--dflex-color-primary, #E53935);
    color: #fff;
    font-size: 8px;
    font-weight: 600;
    min-width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Overlay & Panel */
.dflex-wishlist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999998;
}

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

.dflex-wishlist-panel {
    position: fixed;
    top: 0;
    width: 420px;
    max-width: 90vw;
    bottom: 0;
    height: auto;
    background: #ffffff;
    z-index: 999999;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

.dflex-wishlist-panel-right {
    right: 0;
    transform: translateX(100%);
}

.dflex-wishlist-panel-right.open {
    transform: translateX(0);
}

.dflex-wishlist-panel-left {
    left: 0;
    transform: translateX(-100%);
}

.dflex-wishlist-panel-left.open {
    transform: translateX(0);
}

.dflex-wishlist-panel-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dflex-wishlist-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dflex-wishlist-close {
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    color: #1a1a1a;
    transition: color 0.2s;
}

.dflex-wishlist-close:hover {
    color: var(--dflex-color-primary);
}

.dflex-wishlist-panel-content {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    padding: 20px 30px;
    background: #ffffff;
}

/* Items */
.dflex-wishlist-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    transition: opacity 0.3s;
}

.dflex-wishlist-item-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 16px;
}

.dflex-wishlist-item-thumb a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

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

.dflex-wishlist-item-info {
    flex-grow: 1;
    min-width: 0;
    position: relative;
    padding-right: 20px;
}

.dflex-wishlist-item-title {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: var(--dflex-card-title-weight, 600);
    line-height: 1.3;
    color: #111827;
    text-decoration: none;
    display: block;
    padding-right: 15px;
}

.dflex-wishlist-item-price {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    margin-bottom: 12px;
}

.dflex-wishlist-item-price .dflex-price-from {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    margin-bottom: 2px;
    display: block;
    line-height: 1;
}

.dflex-wishlist-item-price del {
    color: #aaa;
    font-size: 0.8em;
    text-decoration: line-through;
    margin-right: 6px;
    font-weight: 400;
    display: block;
    line-height: 1;
}

.dflex-wishlist-item-price ins {
    text-decoration: none;
}

.dflex-wishlist-item-actions {
    display: block;
}

.dflex-wishlist-item-actions .dflex-btn-add_to_cart {
    width: 100%;
    height: 38px;
    background: var(--dflex-btn-bg, var(--dflex-color-primary, #E53935)) !important;
    color: var(--dflex-btn-text, #fff) !important;
    border: var(--dflex-btn-border, none) !important;
    border-radius: var(--dflex-btn-radius, 8px);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dflex-wishlist-item-actions .dflex-btn-add_to_cart:hover {
    background: var(--dflex-btn-hover-bg, var(--dflex-color-primary-hover, #c62828)) !important;
    color: var(--dflex-btn-hover-text, #fff) !important;
    border: var(--dflex-btn-border-hover, none) !important;
    transform: translateY(-1px);
}

.dflex-wishlist-item-actions .dflex-btn-add_to_cart.is-added {
    background: var(--dflex-color-success, #4CAF50) !important;
}

.dflex-wishlist-item-remove {
    position: absolute;
    top: 14px;
    right: 0;
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    color: var(--dflex-color-error, #ff3b30) !important;
    transition: opacity 0.2s;
    z-index: 5;
    background: none !important;
}

.dflex-wishlist-item-remove:hover {
    opacity: 0.8;
}

.dflex-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* Page Grid Fixes */
.dflex-wishlist-page {
    margin-top: 30px;
}

/* Extracted Inline Styles from class-wishlist.php */
.dflex-wishlist-empty {
    width: 100%;
}

.dflex-card-img-placeholder {
    background: #eee;
}

.dflex-text-deleted {
    color: #999;
}

.dflex-mt-auto {
    margin-top: auto;
}

.dflex-wishlist-btn-delete {
    color: var(--dflex-color-error, #ff3b30);
    cursor: pointer;
    background: none;
    border: 1px solid var(--dflex-color-error, #ff3b30);
    padding: 5px 10px;
    border-radius: var(--dflex-btn-radius, 4px);
    transition: opacity 0.2s;
}

.dflex-wishlist-btn-delete:hover {
    opacity: 0.8;
}

/* Single Product Wishlist Button (Shortcode) */
.dflex-card-wishlist.dflex-wishlist-single-btn {
    position: relative !important;
    top: auto;
    right: auto;
    display: inline-flex;
}

/* Wishlist loading placeholder (moved from inline style) */
.dflex-wishlist-loading {
    text-align: center;
    width: 100%;
    padding: 40px;
    color: #888;
}