/* ==============================================================
   SONIC STOREFRONT — Flat Shopify-Style Wishlist Stylesheet
   ============================================================== */

/* Page Layout & Container */
.wishlist-page {
    background-color: var(--page-bg, #ffffff);
    color: var(--text-main, #333333);
    padding: 40px 0 60px;
}

.wishlist-header-section {
    margin-bottom: 30px;
}

.wishlist-page-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main, #212529);
}

.store-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted, #777777);
}

.store-breadcrumb a {
    color: var(--accent, #197bbd);
    transition: var(--transition-fast);
}

.store-breadcrumb a:hover {
    opacity: 0.8;
}

.store-breadcrumb span {
    margin: 0 4px;
}

/* Two Column Layout Grid */
.wishlist-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}

@media (min-width: 992px) {
    .wishlist-page-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
        gap: 50px;
    }
}

/* ─────────────────────────────────────────────────────────────
   WISHLIST ITEMS TABLE (FLAT / NO SHADOW CONTAINER)
   ───────────────────────────────────────────────────────────── */
.wishlist-items-section {
    width: 100%;
}

/* Headers Row - Always Visible & Horizontal */
.wishlist-table-header {
    display: grid;
    grid-template-columns: 3.5fr 1.2fr 1.5fr 1.8fr;
    padding: 12px 4px;
    border-bottom: 1px solid #eaeaea !important;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted, #555555);
    text-transform: uppercase;
}

.wishlist-table-header .header-col {
    padding: 0 4px;
}

/* Items List wrapper */
.wishlist-items-list {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
}

/* Wishlist Item Row */
.wishlist-page-item {
    display: grid;
    grid-template-columns: 3.5fr 1.2fr 1.5fr 1.8fr;
    padding: 24px 4px;
    border-bottom: 1px solid #eaeaea !important;
    align-items: center;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    transition: background-color 0.2s ease, opacity 0.4s ease, transform 0.4s ease;
}

.wishlist-page-item:hover {
    background-color: rgba(0, 0, 0, 0.005) !important;
}

/* Product Details Column (Trash + Image + Info) */
.item-product-details {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

/* Trash Deletion Button */
.item-delete-btn {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    color: #999999 !important;
    font-size: 1.05rem !important;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    outline: none !important;
}

.item-delete-btn:hover {
    color: #dc3545 !important;
}

/* Image Link & Image */
.item-image-link {
    display: block;
    flex-shrink: 0;
}

.item-image {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background-color: #fbfbfb;
}

/* Details Info wrap */
.item-info-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.item-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main, #2b2b2b);
    line-height: 1.4;
    transition: color 0.2s ease;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.item-name:hover {
    color: var(--accent, #197bbd);
}

.item-meta {
    font-size: 0.82rem;
    color: var(--text-muted, #777777);
}

/* Price, Stock, Action Column Styles */
.item-price-col, .item-stock-col, .item-action-col {
    padding: 0 4px;
}

.item-price-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main, #333333);
}

/* ─────────────────────────────────────────────────────────────
   WISHLIST SUMMARY SIDEBAR
   ───────────────────────────────────────────────────────────── */
.wishlist-summary-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 4px !important;
    padding: 24px !important;
    position: sticky;
    top: 100px;
    box-shadow: none !important;
}

.wishlist-summary__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main, #193c70);
    margin-bottom: 0;
}

.summary-divider {
    width: 100%;
    margin: 16px 0;
}

.summary-divider.dotted {
    border-top: 1px dotted #d0d0d0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main, #333333);
}

.summary-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent, #193c70);
}

/* ── Shopify Style Buttons ── */
.btn-checkout-submit-shopify {
    width: 100%;
    padding: 12px 24px;
    background-color: var(--btn-primary-bg, #193c70);
    color: var(--btn-primary-text, #ffffff) !important;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.btn-checkout-submit-shopify:hover {
    opacity: 0.9;
}

.btn-cart-continue {
    background: transparent !important;
    border: none !important;
    padding: 8px 0 !important;
    color: var(--text-main, #333333) !important;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
    text-decoration: none;
}

.btn-cart-continue:hover {
    color: var(--accent, #197bbd) !important;
}

.btn-cart-continue i {
    transition: transform 0.2s ease;
}

.btn-cart-continue:hover i {
    transform: translateX(-4px);
}

/* ─────────────────────────────────────────────────────────────
   MOBILE RESPONSIVENESS OVERRIDES
   ───────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .wishlist-page {
        padding: 20px 0 40px;
    }

    .wishlist-page-title {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    .wishlist-table-header {
        display: none !important;
    }

    .wishlist-page-item {
        grid-template-columns: 1fr;
        padding: 16px 8px;
        gap: 12px;
        border: 1px solid #eaeaea;
        border-radius: 8px;
        margin-bottom: 12px !important;
        background-color: #fafafa !important;
    }

    .wishlist-page-item:hover {
        background-color: #fafafa !important;
    }

    .item-product-details {
        gap: 12px;
    }

    .item-image {
        width: 60px;
        height: 75px;
    }

    .item-name {
        font-size: 0.88rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .item-price-col, .item-stock-col, .item-action-col {
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .item-price-col::before {
        content: 'السعر:';
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--text-muted);
    }

    .item-stock-col::before {
        content: 'الحالة:';
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--text-muted);
    }

    .item-action-col {
        margin-top: 4px;
    }

    .wishlist-summary-card {
        position: static;
        margin-top: 15px;
        padding: 16px !important;
    }
}
