/* Page-specific styles for watchlist.html */
body {
    background-color: #f7f7f7;
}

.top-bar a {
    color: #000;
    text-decoration: none;
    margin: 0 10px;
}

.top-bar-btn:hover {
    background: #f0f0f0;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 16px;
    color: #707070;
}

.watchlist-controls {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-count {
    font-size: 14px;
    color: #333;
}

.sort-filter {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-filter label {
    font-size: 14px;
    color: #707070;
}

.sort-filter select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.clear-all-btn {
    padding: 8px 16px;
    border: 1px solid #e53238;
    background: white;
    color: #e53238;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.clear-all-btn:hover {
    background: #fee;
}

/* Watchlist Items */
.watchlist-grid {
    display: grid;
    gap: 20px;
}

.watchlist-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: box-shadow 0.2s;
    position: relative;
}

.watchlist-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.item-image {
    width: 150px;
    height: 150px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    cursor: pointer;
}

.item-title:hover {
    color: #3665f3;
}

.item-condition {
    font-size: 13px;
    color: #707070;
    margin-bottom: 8px;
}

.item-price {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.item-shipping {
    font-size: 13px;
    color: #707070;
    margin-bottom: 12px;
}

.item-seller {
    font-size: 13px;
    color: #707070;
    margin-bottom: 12px;
}

.item-status {
    font-size: 13px;
    margin-bottom: 15px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.status-available {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-sold {
    background-color: #ffebee;
    color: #c62828;
}

.item-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.buy-btn {
    background-color: #3665f3;
    color: white;
}

.buy-btn:hover {
    background-color: #2348c5;
}

.buy-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.view-btn {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.view-btn:hover {
    background-color: #f0f0f0;
}

.remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #707070;
    cursor: pointer;
    padding: 5px;
}

.remove-btn:hover {
    color: #e53238;
}

/* Empty State */
.empty-state {
    background: #fff;
    padding: 60px 40px;
    border-radius: 8px;
    text-align: center;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.empty-text {
    font-size: 16px;
    color: #707070;
    margin-bottom: 25px;
}

.browse-btn {
    padding: 12px 32px;
    background-color: #3665f3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.browse-btn:hover {
    background-color: #2348c5;
}

/* Loading State */
.loading-state {
    background: #fff;
    padding: 60px 40px;
    border-radius: 8px;
    text-align: center;
}

.loading-spinner {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #707070;
    margin-top: 20px;
}

/* Auth Required State */
.auth-required {
    background: #fff;
    padding: 60px 40px;
    border-radius: 8px;
    text-align: center;
}

.auth-required-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.auth-required-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.auth-required-text {
    font-size: 16px;
    color: #707070;
    margin-bottom: 25px;
}

.signin-btn {
    padding: 12px 32px;
    background-color: #3665f3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.signin-btn:hover {
    background-color: #2348c5;
}

@media (max-width: 768px) {
    .watchlist-item {
        flex-direction: column;
    }

    .item-image {
        width: 100%;
        height: 200px;
    }

    .watchlist-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .sort-filter {
        flex-direction: column;
        align-items: stretch;
    }
}
