﻿/* Hover image */

.thumbnail-wrapper {
    position: relative;
    display: inline-block;
}

.thumbnail-img {
    cursor: zoom-in;
    transition: transform 0.2s;
}

    .thumbnail-img:hover {
        transform: scale(1.05);
    }

.zoom-viewer {
    position: fixed;
    width: 400px;
    height: 400px;
    left: 350px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    box-shadow: 0 0 25px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #eee;
    padding: 10px;
    box-sizing: border-box;
    pointer-events: none; /* Prevents flickering */
}

    .zoom-viewer img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


@media (max-width: 768px) {
    .zoom-viewer {
        width: 300px;
        height: 300px;
        right: 10px;
    }
}
/* Hover end */

.order-cardc {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04)
}

.order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9
}

.order-card__title {
    margin: 0;
    font-size: 18px
}

.order-card__meta {
    color: #64748b;
    font-size: 12px;
    margin-top: 4px
}

.order-card__pill {
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 20px;
}

.table-wrap {
    padding: 12px 16px
}

.od-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0
}

    .od-table thead th {
        background: #f8fafc;
        color: #0f172a;
        font-weight: 700;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
        padding: 10px 12px
    }

    .od-table tbody td {
        border-bottom: 1px solid #f1f5f9;
        padding: 10px 12px;
        vertical-align: middle
    }

    .od-table tbody tr:hover {
        background: #fafafa
    }

.text-end {
    text-align: right
}

.img-td {
    display: flex;
    align-items: center;
    gap: 10px
}

    .img-td img {
        width: 48px;
        height: 48px;
        border-radius: 10px;
        object-fit: cover;
        border: 1px solid #e5e7eb
    }

.variant-name {
    font-weight: 600;
    color: #111827
}

.muted {
    color: #6b7280;
    font-size: 12px
}

.summary {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 12px 16px 18px
}

.summary__left {
    flex: 1 1 260px
}

.summary__right {
    flex: 1 1 320px;
    max-width: 480px;
    margin-left: auto
}

.summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0
}

    .summary-table td {
        padding: 8px 10px;
        border-bottom: 1px dashed #e5e7eb
    }

.summary-total td {
    font-weight: 800;
    border-bottom: 0;
    font-size: 16px;
    padding-top: 12px
}

@media (max-width:720px) {
    .od-table thead {
        display: none
    }

    .od-table tbody tr {
        display: block;
        padding: 10px 8px;
        border: 1px solid #eee;
        border-radius: 12px;
        margin-bottom: 10px
    }

    .od-table tbody td {
        display: flex;
        justify-content: space-between;
        border-bottom: 0
    }

        .od-table tbody td::before {
            content: attr(data-label);
            font-weight: 600;
            color: #334155
        }

    .img-td {
        justify-content: flex-start
    }
}
/* Modal Overlay */
.modal-overlay {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* semi transparent */
    z-index: 9999; /* ensure it is always on top */
    overflow-y: auto; /* scroll if content is larger */
    padding: 40px 20px; /* spacing from top/bottom */
    box-sizing: border-box;
}

/* Modal Box */
.modal-box {
    background: #fff;
    width: 100%;
    max-width: 950px;
    margin: auto;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: fadeInUp 0.3s ease; /* smooth animation */
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .modal-close:hover {
        color: #000;
    }

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 720px) {
    .modal-box {
        width: 95%;
        padding: 10px;
        border-radius: 12px;
    }
}
