/* ===========================
   PRODUCTS DISPLAY STYLES
   =========================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
}

/* ===========================
   PRODUCTS WRAPPER
   =========================== */

.products-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    animation: fadeIn 0.6s ease-out;
}

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

/* ===========================
   PRODUCT CARD
   =========================== */

.product-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: slideUp 0.5s ease-out forwards;
    opacity: 0;
}

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

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

/* ===========================
   PRODUCT IMAGE SECTION
   =========================== */

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .product-image {
    transform: scale(1.15) rotate(2deg);
}

/* Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-view-details {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-view-details:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* ===========================
   PRODUCT CONTENT
   =========================== */

.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* ===========================
   PRODUCT FOOTER
   =========================== */

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    min-width: fit-content;
}

.wishlist-form {
    margin: 0;
}

.btn-wishlist {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 16px;
}

.btn-wishlist:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(245, 158, 11, 0.1);
    transform: scale(1.1);
}

.btn-wishlist.active {
    border-color: var(--error-color);
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.btn-wishlist.active:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ===========================
   ADD TO CART BUTTON
   =========================== */

.add-to-cart-form {
    margin: 0;
}

.btn-add-cart {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-add-cart:active {
    transform: translateY(0);
}

/* ===========================
   NO PRODUCTS
   =========================== */

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
}

.no-products i {
    font-size: 80px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.no-products p {
    font-size: 16px;
    color: var(--text-light);
}

/* ===========================
   TOAST NOTIFICATION
   =========================== */

.toast-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--bg-white);
    border-left: 4px solid var(--success-color);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 9999;
}

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

.toast-notification.error {
    border-left-color: var(--error-color);
}

.toast-notification.error .toast-content {
    color: var(--error-color);
}

.toast-notification.error i {
    color: var(--error-color);
}

.toast-notification.success i {
    color: var(--success-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--success-color);
    font-weight: 600;
}

.toast-notification i {
    font-size: 20px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .products-wrapper {
        padding: 30px 15px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .product-image-wrapper {
        height: 220px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 18px;
    }

    .btn-add-cart {
        padding: 10px 12px;
        font-size: 12px;
    }

    .toast-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-400px);
    }

    .toast-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .products-wrapper {
        padding: 20px 10px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-image-wrapper {
        height: 180px;
    }

    .product-content {
        padding: 15px;
    }

    .product-name {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .product-description {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .product-footer {
        margin-bottom: 8px;
    }

    .product-price {
        font-size: 16px;
    }

    .btn-wishlist {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .btn-add-cart {
        padding: 8px 10px;
        font-size: 11px;
    }

    .no-products i {
        font-size: 60px;
    }

    .no-products h3 {
        font-size: 20px;
    }

    .no-products p {
        font-size: 14px;
    }
}