/* Bookmark System Styles */

/* Header Bookmark Icon */
.header-bookmark {
    position: relative;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.header-bookmark:hover {
    background: rgba(0, 0, 0, 0.05);
}

.header-bookmark.has-bookmarks svg {
    fill: var(--accent);
}

.bookmark-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Card Bookmark Button */
.card-bookmark {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.card-bookmark:hover {
    background: white;
    transform: scale(1.1);
}

.card-bookmark.saved {
    background: var(--accent);
}

.card-bookmark.saved svg {
    fill: white;
}

/* Bookmark Dropdown */
.bookmark-dropdown {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bookmark-dropdown.active {
    right: 0;
}

.bookmark-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bookmark-dropdown-header h3 {
    margin: 0;
    color: var(--accent-dark);
    font-size: 18px;
}

.close-dropdown {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-dropdown:hover {
    background: #f0f0f0;
}

.bookmark-dropdown-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Bookmark List */
.bookmark-list {
    padding: 0;
}

.bookmark-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bookmark-item:hover {
    background: #f8f8f8;
}

.bookmark-item-image {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
}

.bookmark-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-bookmark {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-bookmark:hover {
    background: rgba(0, 0, 0, 0.9);
}

.bookmark-item-info {
    flex: 1;
    min-width: 0;
}

.bookmark-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}

.bookmark-item-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-item-price {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-dark);
}

/* Empty State */
.empty-bookmarks {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-bookmarks i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-bookmarks p {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.empty-bookmarks span {
    font-size: 14px;
    opacity: 0.8;
}

/* Dropdown Footer */
.bookmark-dropdown-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.view-all-bookmarks {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.view-all-bookmarks:hover {
    background: var(--accent-dark);
}

/* Dropdown Overlay */
.bookmark-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bookmark-dropdown-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Bookmark Notification */
.bookmark-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1003;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.bookmark-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.bookmark-notification i {
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bookmark-dropdown {
        width: 100%;
        right: -100%;
    }
    
    .bookmark-item {
        padding: 12px 15px;
    }
    
    .bookmark-item-image {
        width: 60px;
        height: 50px;
    }
    
    .bookmark-notification {
        right: 15px;
        left: 15px;
        transform: translateY(-100%);
    }
    
    .bookmark-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .bookmark-dropdown-header {
        padding: 15px;
    }
    
    .bookmark-item {
        padding: 10px 15px;
    }
}