﻿:root {
    --card-width: 220px;
    --image-height: 320px;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    font-family: 'Inter', sans-serif;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
}

.product-card {
    width: var(--card-width);
    flex: 0 0 auto;
    position: relative;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0,0,0,.15);
    }

    .product-card img {
        width: 100%;
        height: var(--image-height);
        object-fit: contain;
        background: #fff;
        flex-shrink: 0;
        transition: transform .2s ease;
    }

    .product-card:hover img {
        transform: scale(1.02);
    }

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px;
}



.sku {
    font-size: 13px;
    color: #666;
}

.inventory {
    padding-top: 5px;
    font-weight: 600;
}

.price-section {
    padding-top: 10px;
}

.price {
    font-size: 22px;
    font-weight: bold;
    color: black;
}

.compare-price {
    margin-left: 10px;
    text-decoration: line-through;
    color: red;
}

.sale-badge {
    position: absolute;
    top: 42px;
    left: 12px;
    background: #e53935;
    color: white;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

.oos-overlay {
    position: absolute;
    left: 12px;
    background: #444;
    color: white;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

.order-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #000;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 9999;
}

.info-button {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #f0f0f0;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
}

    .info-button:hover {
        background: #0078d7;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,120,215,.35);
    }

    .info-button:active {
        transform: scale(.98);
    }

.mini-info-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #0078d7;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin: 10px auto;
    display: block;
    transition: background .18s ease, transform .12s ease;
}

    .mini-info-btn:hover {
        background: #005fa3;
        transform: scale(1.05);
    }

.sortable-ghost {
    opacity: .35;
}

.sortable-chosen {
    background: #e8f3ff;
}

.sortable-drag {
    opacity: .9;
}

.collection-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.collection-search {
    width: 320px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 18px;
    outline: none;
}

    .collection-search:focus {
        border-color: #0078d7;
        box-shadow: 0 0 0 3px rgba(0,120,215,.15);
    }

.collection-select {
    min-width: 450px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 20px;
    font-weight: 600;
    background: white;
    outline: none;
    cursor: pointer;
}

    .collection-select:focus {
        border-color: #0078d7;
        box-shadow: 0 0 0 3px rgba(0,120,215,.15);
    }

.size-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    font-size: 18px;
}

.details-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.saving-overlay,
.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.saving-overlay {
    background: rgba(0,0,0,.55);
}

.loading-overlay {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(2px);
}

.saving-box,
.loading-box {
    background: white;
    padding: 40px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.spinner,
.loading-spinner {
    width: 70px;
    height: 70px;
    border: 8px solid #eee;
    border-top: 8px solid #0078d7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.saving-text,
.loading-text {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.info-modal {
    width: 700px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    background: white;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    animation: modalPop .18s ease;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: red;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
}

.modal-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    margin-bottom: 20px;
}

.compact-card {
    width: 160px;
    min-height: auto;
}

    .compact-card .product-info {
        display: none;
    }

    .compact-card img {
        margin-bottom: 0;
    }

    .compact-card .mini-info-btn {
        margin: 8px auto 10px auto;
    }

.empty-collection {
    margin-top: 40px;
    padding: 60px;
    text-align: center;
    background: white;
    border-radius: 16px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.empty-icon {
    font-size: 70px;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.empty-subtitle {
    font-size: 18px;
    color: #777;
}

@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes modalPop {

    from {
        transform: scale(.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.collection-toolbar,
.size-toolbar {
    align-items: center;
    flex-wrap: wrap;
}

.save-btn {
    background: linear-gradient( 135deg, #0078d7, #00a2ff);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    box-shadow: 0 8px 20px rgba(0,120,215,.25);
    transition: transform .15s ease, box-shadow .2s ease;
}

    .save-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(0,120,215,.35);
    }

.toolbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 999;
    background: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.title {
    font-weight: 600;
    font-size: 15px;
    line-height: 21px;
    margin-bottom: 8px;
    color: #222;
    width: 100%;
}

.compact-title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 42px;
}


.full-title {
    overflow: visible;
    display: block !important;
    max-height: none;
    white-space: normal;
    word-break: break-word;
    height: auto;
}



.product-count {
    background: #111;
    color: white;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
}
.selected-card {
    border: 4px solid #0078d7;
    box-shadow: 0 0 0 4px rgba(0,120,215,.18), 0 12px 30px rgba(0,0,0,.15);
}

.select-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 22px;
    height: 22px;
    z-index: 99999;
    cursor: pointer;
}

.variant-grid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

    .variant-grid th {
        background: #111;
        color: white;
        padding: 10px;
        text-align: left;
    }

    .variant-grid td {
        padding: 10px;
        border-bottom: 1px solid #eee;
    }

    .variant-grid tr:hover {
        background: #f5f8ff;
    }

.variant-oos {
    background: #ffeaea;
}
.select2-container--default
.select2-selection--single {
    height: 52px !important;
    border-radius: 12px !important;
}

    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
        line-height: 52px !important;
        font-size: 18px !important;
        font-weight: 600;
    }

    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
        height: 52px !important;
    }

