/* =========================================
   Wishlist Page Styles
   ========================================= */

/* Layout */
.wishlist-layout {
    padding-top: 40px;
    padding-bottom: 80px;
}

.wishlist-layout__container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* --- Hero Banner --- */
.wishlist-hero {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 300px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    padding: 0 50px;
    background: linear-gradient(135deg, #2196F3 0%, #8BC34A 50%, #F44336 100%);
}

.wishlist-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.2;
}

.wishlist-hero__content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 50%;
}

.wishlist-hero__subtitle {
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.wishlist-hero__title {
    font-size: 48px;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.wishlist-hero__badge {
    display: inline-block;
    background-color: var(--color-accent-pink);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
}

.wishlist-hero__image {
    position: absolute;
    right: 50px;
    bottom: -30px;
    z-index: 2;
    width: 280px;
}

.wishlist-hero__image img {
    width: 100%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transform: rotate(-5deg);
}

.wishlist-hero__decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wishlist-hero__decor i {
    position: absolute;
    color: white;
    opacity: 0.4;
    font-size: 24px;
    animation: float 4s infinite ease-in-out;
}

.wishlist-hero__decor i:nth-child(1) {
    top: 20%;
    left: 40%;
    animation-delay: 0s;
    font-size: 30px;
}

.wishlist-hero__decor i:nth-child(2) {
    top: 60%;
    left: 10%;
    animation-delay: 1s;
}

.wishlist-hero__decor i:nth-child(3) {
    top: 30%;
    right: 40%;
    animation-delay: 2s;
    font-size: 20px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- Controls --- */
.wishlist-controls {
    margin-bottom: 30px;
}

/* --- Table --- */
.wishlist-table-wrapper {
    margin-bottom: 40px;
    overflow-x: auto;
}

.wishlist-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    table-layout: fixed;
    display: table;
}

.wishlist-table thead {
    display: table-header-group;
}

.wishlist-table tbody {
    display: table-row-group;
}

.wishlist-table tr {
    display: table-row;
}

.wishlist-table th,
.wishlist-table td {
    display: table-cell;
}

.wishlist-table th {
    background-color: #f9f9f9;
    padding: 15px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    color: var(--color-secondary);
    border-bottom: 1px solid var(--color-border);
}

.wishlist-table td {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    background: white;
    transition: background-color 0.3s;
}

.wishlist-table tr:last-child td {
    border-bottom: none;
}

.wishlist-item:hover td {
    background-color: #fafafa;
}

/* Column Widths - 3 columns: Product, Price, Action */
.col-product {
    width: 55%;
}

.col-price {
    width: 20%;
    text-align: center;
}

.col-action {
    width: 25%;
}

/* Product Cell */
.wishlist-table .product-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wishlist-table .product-thumb img {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    background-color: #eee;
    object-fit: cover;
}

.wishlist-table .product-info {
    display: flex;
    flex-direction: column;
}

.product-cat {
    font-size: 11px;
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-name {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.2;
}

.product-name a {
    color: var(--color-secondary);
    transition: var(--transition);
}

.product-name a:hover {
    color: var(--color-primary);
}

.product-desc {
    font-size: 12px;
    color: var(--color-text-light);
}

/* Price Cell */
.wishlist-table .price {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
}

/* Quantity Cell - Updated to match Shopping Cart */
.qty-control {
    display: inline-flex;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
    /* Matched cart height */
}

.qty-btn {
    width: 35px;
    /* Matched cart width */
    background: #fafafa;
    border: none;
    cursor: pointer;
    color: var(--color-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.qty-btn:hover {
    background: #eee;
}

.qty-input {
    width: 40px;
    /* Matched cart width */
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-secondary);
    -moz-appearance: textfield;
    /* Hides spinners in Firefox */
}

/* Hides spinners in Chrome/Safari/Edge */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Action Cell */
.action-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.btn-add-cart {
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-remove {
    width: 38px;
    height: 38px;
    border: none;
    background-color: #F44336;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-remove:hover {
    background-color: #D32F2F;
    transform: rotate(90deg);
}

/* --- Responsive Table (Card View) --- */
@media (max-width: 991px) {
    .wishlist-layout__container {
        grid-template-columns: 1fr;
    }

    .wishlist-hero {
        padding: 0 30px;
        height: 250px;
    }

    .wishlist-hero__title {
        font-size: 36px;
    }

    .wishlist-hero__image {
        width: 200px;
        right: 20px;
    }
}

@media (max-width: 767px) {
    .wishlist-hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        height: auto;
        padding: 40px 20px 0;
        margin-bottom: 30px;
    }

    .wishlist-hero__content {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .wishlist-hero__image {
        position: relative;
        right: auto;
        bottom: auto;
        width: 180px;
        margin-top: 10px;
    }

    /* Table to Card Transformation */
    .wishlist-table,
    .wishlist-table thead,
    .wishlist-table tbody,
    .wishlist-table tr,
    .wishlist-table td {
        display: block;
        width: 100%;
    }

    .wishlist-table thead {
        display: none;
    }

    .wishlist-table tr {
        margin-bottom: 20px;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: white;
        padding: 15px;
        position: relative;
    }

    .wishlist-table td {
        padding: 10px 0;
        border: none;
        text-align: left;
    }

    .col-product {
        width: 100%;
    }

    .col-price {
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-top: 1px dashed var(--color-light-gray) !important;
        padding-top: 15px !important;
    }

    .col-price::before {
        content: "Price:";
        font-size: 12px;
        font-weight: 700;
        color: var(--color-text-light);
    }

    .col-qty {
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .col-qty::before {
        content: "Quantity:";
        font-size: 12px;
        font-weight: 700;
        color: var(--color-text-light);
    }

    .col-action {
        margin-top: 15px;
        padding-top: 15px !important;
        border-top: 1px solid var(--color-light-gray) !important;
    }

    .action-group {
        justify-content: space-between;
    }

    .btn-add-cart {
        flex-grow: 1;
        margin-right: 10px;
    }

    .wishlist-table .product-item {
        margin-bottom: 10px;
    }

    .wishlist-table .product-thumb img {
        width: 80px;
        height: 80px;
    }
}