/* ===== MODERN WISHLIST PAGE STYLES ===== */

:root {
    --cart-primary: #08437b;
    --wish-primary: #ef4444;
    --wish-primary-dark: #dc2626;
    --wish-accent: #08437b;
    --wish-text: #1f2937;
    --wish-text-light: #6b7280;
    --wish-border: #e5e7eb;
    --wish-bg: #f9fafb;
    --wish-white: #ffffff;
    --wish-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --wish-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
     --shop-primary: #08437b;
    --shop-primary-dark: #0f508d;
}

.modern-wishlist-section {
    padding: 50px 60px;
    /* background: var(--wish-bg); */
}

/* Header */
.modern-wishlist-header {
    background: var(--wish-white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--wish-shadow);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wishlist-icon-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--wish-primary) 0%, var(--wish-primary-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 21px;
}

.wishlist-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: var(--wish-primary);
    animation: pulse 2s infinite;
    opacity: 0.5;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.wishlist-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--wish-text);
    margin: 0 0 4px 0;
}

.wishlist-subtitle {
    font-size: 14px;
    color: var(--wish-text-light);
    margin: 0;
}

.wishlist-subtitle span {
    font-weight: 700;
    color: var(--wish-primary);
}

/* Empty State */
.wishlist-empty .empty-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: var(--wish-primary);
    position: relative;
}

.heart-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--wish-primary);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0; }
}

/* Wishlist Card */
.modern-wishlist-card {
    background: var(--wish-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--wish-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

/* Wishlist Heart Button */
.wishlist-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 44px;
    height: 44px;
    background: var(--wish-white);
    border: 2px solid var(--wish-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.wishlist-heart.active {
    background: linear-gradient(135deg, var(--wish-primary) 0%, var(--wish-primary-dark) 100%);
    border-color: var(--wish-primary);
}

.wishlist-heart i {
    font-size: 18px;
    color: var(--wish-text-light);
    transition: all 0.3s;
}

.wishlist-heart.active i {
    color: white;
    animation: heartPop 0.3s ease;
}

.wishlist-heart.removing {
    animation: heartRemove 0.5s ease;
}

@keyframes heartPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes heartRemove {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(0) rotate(180deg); opacity: 0; }
}

.wishlist-heart:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.discount-badge span {
    display: block;
    font-size: 18px;
    line-height: 1;
}

.discount-badge small {
    display: block;
    font-size: 10px;
    opacity: 0.9;
    margin-top: 2px;
}

/* Card Image */
.card-image {
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

.card-image a {
    display: block;
}

.product-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-wishlist-card:hover .product-img {
    transform: scale(1.08);
}

.stock-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Content */
.card-content {
    padding: 20px;
}

.product-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--wish-accent);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--wish-text);
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 44px;
}

.product-title:hover {
    color: var(--wish-accent);
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    font-size: 14px;
    color: #fbbf24;
}

.rating-text {
    font-size: 13px;
    color: var(--wish-text-light);
    font-weight: 500;
}

/* Pricing */
.product-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.current-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--wish-accent);
}

.original-price {
    font-size: 16px;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Actions */
.card-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--wish-accent) 0%, #0f508d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 8px 20px rgba(98, 157, 35, 0.4); */
    color: #fff;
    opacity: 0.9;
}

.btn-add-cart.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-add-cart.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-outline-primary {
    padding: 12px 24px;
    border: 2px solid var(--cart-primary);
    color: var(--cart-primary);
    background: transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-outline-primary:hover {
    background: var(--cart-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 157, 35, 0.3);
    border: 2px solid var(--cart-primary);
}

/* Responsive */
@media (max-width: 767px) {
    .modern-wishlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px;
    }

    .header-right {
        width: 100%;
    }

    .btn-outline-primary {
        width: 100%;
        justify-content: center;
    }

    .product-img {
        height: 200px;
    }
}
/* Add to Cart Button */
.product-add-to-cart {
    width: 100%;
    height: 44px;
    background: var(--shop-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    margin-top: auto;
    transition: all 0.3s ease;
}

.product-add-to-cart:hover:not(:disabled) {
    background: var(--shop-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 157, 35, 0.4);
}

.product-add-to-cart:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.product-add-to-cart i {
    font-size: 16px;
}

/* ===== EMPTY WISHLIST STATE ===== */

.modern-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.empty-icon.wishlist-empty {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    animation: wishlistHeartPulse 2s ease-in-out infinite;
}

.empty-icon.wishlist-empty i {
    font-size: 42px;
    color: #ef4444;
    opacity: 0.7;
}

@keyframes wishlistHeartPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.15); }
    50%       { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

.modern-empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.modern-empty-state p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 32px;
    max-width: 320px;
    line-height: 1.6;
}

.empty-state-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--wish-primary);
    color: white;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(8, 67, 123, 0.2);
}

.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 67, 123, 0.3);
    color: white;
}

.btn-outline-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: transparent;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .modern-empty-state {
        padding: 60px 16px;
    }

    .empty-state-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary-large,
    .btn-outline-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ===== WISHLIST MOBILE RESPONSIVE ===== */
@media (max-width: 767px) {

    /* Section spacing */
    .modern-wishlist-section {
        padding: 0px !important;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Header — stack vertically */
    .modern-wishlist-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
    }

    .header-right {
        width: 100% !important;
    }

    .header-right .btn-outline-primary {
        width: 100% !important;
        justify-content: center !important;
    }

    .wishlist-title {
        font-size: 20px !important;
    }

    .wishlist-subtitle {
        font-size: 13px !important;
    }

    /* Grid — 2 columns on mobile */
    #wishlistItemsGrid {
        --bs-gutter-x: 10px !important;
        --bs-gutter-y: 10px !important;
    }

    /* Force 2 columns */
    #wishlistItemsGrid > [class*="col-"] {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }

    /* Card */
    .modern-wishlist-card {
        border-radius: 10px !important;
        overflow: hidden !important;
    }

    /* Card image — fixed aspect ratio */
    .card-image {
        aspect-ratio: 1 !important;
        overflow: hidden !important;
    }

    .card-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Card content */
    .card-content {
        padding: 10px !important;
        gap: 6px !important;
    }

    /* Hide category tag to save space */
    .product-category {
        font-size: 10px !important;
        margin-bottom: 2px !important;
    }

    /* Product title */
    .product-title {
        font-size: 12px !important;
        line-height: 1.3 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        min-height: 32px !important;
    }

    /* Pricing */
    .product-pricing {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .current-price {
        font-size: 14px !important;
        font-weight: 700 !important;
    }

    .original-price {
        font-size: 11px !important;
    }

    .price-save {
        font-size: 10px !important;
        padding: 1px 5px !important;
    }

    /* Add to cart button */
    .btn-add-cart {
        height: 36px !important;
        font-size: 11px !important;
        padding: 0 8px !important;
        gap: 5px !important;
        border-radius: 6px !important;
    }

    .btn-add-cart i {
        font-size: 12px !important;
    }

    /* Heart / remove button */
    .wishlist-heart {
        width: 30px !important;
        height: 30px !important;
        top: 8px !important;
        right: 8px !important;
        font-size: 13px !important;
    }

    /* Discount badge */
    .discount-badge {
        top: 8px !important;
        left: 8px !important;
        padding: 4px 7px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }

    .discount-badge span {
        font-size: 12px !important;
    }

    .discount-badge small {
        font-size: 9px !important;
    }

    /* Stock badge */
    .stock-badge {
        font-size: 9px !important;
        padding: 3px 6px !important;
    }

    /* Empty state */
    .modern-empty-state {
        padding: 48px 20px !important;
    }

    .modern-empty-state .empty-icon {
        font-size: 56px !important;
    }

    .modern-empty-state h3 {
        font-size: 20px !important;
    }

    .modern-empty-state p {
        font-size: 13px !important;
    }

    .empty-state-actions {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .empty-state-actions .btn-primary-large,
    .empty-state-actions .btn-outline-secondary {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 375px) {

    /* On very small screens hide category label entirely */
    .product-category {
        display: none !important;
    }

    .current-price {
        font-size: 13px !important;
    }

    .btn-add-cart {
        font-size: 10px !important;
        height: 32px !important;
    }

    /* Tighter gutter */
    #wishlistItemsGrid {
        --bs-gutter-x: 8px !important;
        --bs-gutter-y: 8px !important;
    }
}

.modern-wishlist-card .product-img.wishlist-placeholder-image {
    object-fit: contain;
    background: #f9fafb;
    padding: 16px;
    border-radius: 10px;
    border: 1px dashed #e5e7eb;
}
