/* ไฟล์ CSS สำหรับหน้ารายการโปรด - Modern Card Design */

/* เพิ่มฟอนต์ภาษาไทย */
body {
    font-family: 'Prompt', sans-serif;
    background-color: #FFF0F5;
}

/* สไตล์สำหรับหน้ารายการโปรด */
.wishlist-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wishlist-title {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Card Grid Layout */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.wishlist-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.wishlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wishlist-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 20px;
}

.price-display {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e74c3c;
}

.original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 1rem;
    margin-right: 10px;
}

.sale-price {
    color: #e74c3c;
    font-size: 1.4rem;
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.remove-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.remove-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Notification Styles */
.notification {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Legacy Table Support (Hidden by default) */
.wishlist-table {
    display: none;
}

.wishlist-table th,
.wishlist-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.wishlist-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.empty-wishlist {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.empty-wishlist p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-weight: 500;
}

.continue-shopping {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.continue-shopping:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* รูปแบบที่ตอบสนอง - Responsive Design */
@media (max-width: 1024px) {
    .wishlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .wishlist-container {
        padding: 15px;
    }
    
    .wishlist-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .wishlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .product-image-container {
        height: 200px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .wishlist-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    .wishlist-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wishlist-card {
        margin: 0 5px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 1rem;
        -webkit-line-clamp: 3;
    }
    
    .price-display,
    .sale-price {
        font-size: 1.2rem;
    }
    
    .action-btn {
        padding: 12px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .empty-wishlist {
        padding: 60px 15px;
    }
    
    .empty-wishlist p {
        font-size: 1.1rem;
    }
    
    .continue-shopping {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* Animation for loading cards */
.wishlist-card {
    animation: fadeInUp 0.6s ease forwards;
}

.wishlist-card:nth-child(1) { animation-delay: 0.1s; }
.wishlist-card:nth-child(2) { animation-delay: 0.2s; }
.wishlist-card:nth-child(3) { animation-delay: 0.3s; }
.wishlist-card:nth-child(4) { animation-delay: 0.4s; }
.wishlist-card:nth-child(5) { animation-delay: 0.5s; }
.wishlist-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}