/*
================================================================
|| >> Wishlist Page Styles (V2)
================================================================
*/

.wishlist-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.wishlist-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wishlist-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin: 0 0 0.5rem 0;
}

.wishlist-header p {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
}

/* --- Controls --- */
.wishlist-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.wishlist-layout-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.layout-btn {
    background: transparent;
    border: none;
    padding: 0.75rem;
    cursor: pointer;
    color: var(--text-secondary-color);
    border-left: 1px solid var(--border-color);
}
.layout-btn:first-child {
    border-left: none;
}
.layout-btn.active, .layout-btn:hover {
    background: var(--accent-color);
    color: #fff;
}

.wishlist-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.wishlist-sort label {
    font-weight: 600;
    font-size: 0.9rem;
}
.wishlist-sort select {
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--card-bg-color);
}

/* --- Item Layouts --- */
#wishlist-grid-container.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

#wishlist-grid-container.layout-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card for Grid View */
.wishlist-item-card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
}
.wishlist-item-card.removing {
    opacity: 0;
    transform: scale(0.95);
}
.wishlist-item-image-link {
    display: block;
    aspect-ratio: 4 / 5;
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
}
.wishlist-item-details {
    padding: 1.25rem;
}
.wishlist-item-details h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}
.wishlist-item-details .price {
    color: var(--text-secondary-color);
    margin-bottom: 1rem;
}
.wishlist-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}
.wishlist-card-actions .btn-add-to-bag {
    flex-grow: 1;
}
.wishlist-card-actions .remove-wishlist-item-btn {
    padding: 0.75rem;
    height: auto;
    flex-shrink: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

/* Row for List View */
.wishlist-item-list-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    opacity: 1;
}
.wishlist-item-list-row.removing {
    opacity: 0;
    transform: translateX(20px);
}
.list-item-image {
    width: 100px;
    height: 125px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}
.list-item-info {
    flex-grow: 1;
}
.list-item-info h3 { margin: 0 0 0.25rem 0; }
.list-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.list-item-actions .remove-wishlist-item-btn {
    background: transparent;
    border: none;
}


/* --- Shared & Utility Styles --- */
.remove-wishlist-item-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}
.remove-wishlist-item-btn:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: #fff;
}
.remove-wishlist-item-btn .feather { width: 16px; height: 16px; }

/* Empty States */
.wishlist-empty-message, .wishlist-logged-out-message {
    text-align: center;
    padding: 5rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
}
.wishlist-empty-message i { width: 48px; height: 48px; stroke-width: 1.5; color: var(--text-secondary-color); margin-bottom: 1.5rem; }
.wishlist-empty-message h2, .wishlist-logged-out-message h2 { font-size: 1.8rem; margin: 0 0 1rem 0; }
.wishlist-empty-message p, .wishlist-logged-out-message p { color: var(--text-secondary-color); max-width: 400px; margin: 0 auto 2rem auto; }
/*
================================================================
|| >> Wishlist Page - Dark Mode Compatibility
================================================================
*/

/* Set the base text colors for the entire page in dark mode */
html[data-theme="dark"] .wishlist-header h1 {
    color: var(--text-color);
}
html[data-theme="dark"] .wishlist-header p {
    color: var(--text-secondary-color);
}

/* Style the top control bar for dark mode */
html[data-theme="dark"] .wishlist-controls {
    border-bottom-color: var(--border-color);
}

html[data-theme="dark"] .wishlist-sort label {
    color: var(--text-secondary-color);
}

html[data-theme="dark"] .wishlist-sort select {
    background-color: var(--card-bg-color);
    border-color: var(--border-color);
    color: var(--text-color);
}

html[data-theme="dark"] .wishlist-layout-toggle {
    border-color: var(--border-color);
}

html[data-theme="dark"] .layout-btn {
    color: var(--text-secondary-color);
    border-left-color: var(--border-color);
}

html[data-theme="dark"] .layout-btn.active,
html[data-theme="dark"] .layout-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* Style the empty state message box for dark mode */
html[data-theme="dark"] .wishlist-empty-message, 
html[data-theme="dark"] .wishlist-logged-out-message {
    border-color: var(--border-color);
}
/*
================================================================
|| >> Wishlist Page - Dark Mode List View Text Fix
================================================================
*/

/* This targets the product title and price ONLY in list view when dark mode is on */
html[data-theme="dark"] .wishlist-item-list-row .list-item-info h3 {
    color: var(--text-color);
}

html[data-theme="dark"] .wishlist-item-list-row .list-item-info .price {
    color: var(--text-secondary-color);
}
/*
================================================================
|| >> Wishlist Page - Dark Mode Grid View Text Fix
================================================================
*/

/* This targets the product title and price in grid view when dark mode is on */
html[data-theme="dark"] .wishlist-item-card .wishlist-item-details h3 {
    color: var(--text-color);
}

html[data-theme="dark"] .wishlist-item-card .wishlist-item-details .price {
    color: var(--text-secondary-color);
}