.ctiu-artwork-wrapper {
    margin: 22px 0;
    width: 100%;
}

.ctiu-artwork-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ctiu-artwork-header span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #111;
}

.ctiu-artwork-header small {
    font-size: 13px;
    color: #777;
    text-align: right;
}

.ctiu-upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.ctiu-upload-card {
    min-height: 145px;
    border: 2px dashed #d9d9d9;
    border-radius: 14px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 14px;
    box-sizing: border-box;
    overflow: hidden;
}

.ctiu-upload-card:hover {
    background: #f4f6f8;
    border-color: #bfc5cc;
}

.ctiu-upload-card input[type="file"] {
    display: none;
}

.ctiu-upload-icon {
    color: #606875;
    line-height: 1;
    margin-bottom: 4px;
}

.ctiu-upload-card strong {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.ctiu-upload-text {
    font-size: 13px;
    color: #777;
}

.ctiu-file-name {
    margin-top: 6px;
    font-size: 12px;
    color: #111;
    font-weight: 600;
    max-width: 100%;
    word-break: break-word;
    line-height: 1.3;
}

.ctiu-upload-preview-wrap {
    display: none;
    width: 100%;
    max-width: 140px;
    height: 95px;
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e1e1;
    align-items: center;
    justify-content: center;
}

.ctiu-upload-preview-img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ctiu-pdf-preview {
    display: none;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    background: #f1f1f1;
    padding: 8px 12px;
    border-radius: 8px;
}

.ctiu-upload-card.ctiu-file-selected {
    border-color: #111;
    background: #fff;
}

.ctiu-upload-card.ctiu-file-selected .ctiu-upload-preview-wrap {
    display: flex;
}

.ctiu-upload-card.ctiu-has-image .ctiu-upload-preview-img {
    display: block;
}

.ctiu-upload-card.ctiu-has-pdf .ctiu-pdf-preview {
    display: inline-block;
}

.ctiu-cart-preview {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 6px !important;
    max-width: 100% !important;
    width: auto !important;
    flex-wrap: nowrap !important;
    clear: both !important;
}

.ctiu-preview-thumb {
    display: inline-flex !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: #fff !important;
    padding: 3px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.ctiu-preview-thumb img,
.ctiu-cart-preview img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ctiu-preview-link {
    display: inline-block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.ctiu-preview-pdf {
    display: inline-flex !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: #f7f7f7 !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.woocommerce .variation,
.woocommerce .wc-item-meta {
    max-width: 100% !important;
}

.woocommerce .variation dt,
.woocommerce .variation dd,
.woocommerce .wc-item-meta li,
.woocommerce .wc-item-meta p {
    float: none !important;
    display: block !important;
    max-width: 100% !important;
    width: auto !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.woocommerce .variation dd {
    margin-left: 0 !important;
    margin-bottom: 10px !important;
}

.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order table.shop_table {
    table-layout: fixed !important;
    width: 100% !important;
}

.woocommerce-checkout-review-order-table th.product-name,
.woocommerce-checkout-review-order-table td.product-name,
.woocommerce-checkout-review-order table.shop_table th.product-name,
.woocommerce-checkout-review-order table.shop_table td.product-name {
    width: 75% !important;
    max-width: 75% !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    vertical-align: top !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
}

.woocommerce-checkout-review-order-table th.product-total,
.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout-review-order table.shop_table th.product-total,
.woocommerce-checkout-review-order table.shop_table td.product-total {
    width: 25% !important;
    max-width: 25% !important;
    text-align: right !important;
    white-space: nowrap !important;
    vertical-align: top !important;
}

.woocommerce-checkout-review-order-table .ctiu-cart-preview,
.woocommerce-checkout-review-order .ctiu-cart-preview {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 6px 0 10px 0 !important;
    width: 100% !important;
    max-width: 160px !important;
}

.woocommerce-checkout-review-order-table .ctiu-preview-thumb,
.woocommerce-checkout-review-order .ctiu-preview-thumb {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
}

.woocommerce-checkout-review-order-table .ctiu-preview-link,
.woocommerce-checkout-review-order .ctiu-preview-link {
    font-size: 12px !important;
    white-space: nowrap !important;
}

.widget_shopping_cart .ctiu-cart-preview,
.woocommerce-mini-cart .ctiu-cart-preview,
.elementor-menu-cart__product .ctiu-cart-preview,
.elementor-menu-cart__product .variation dd {
    max-width: 100% !important;
    width: 100% !important;
}

.widget_shopping_cart .ctiu-preview-thumb,
.woocommerce-mini-cart .ctiu-preview-thumb,
.elementor-menu-cart__product .ctiu-preview-thumb {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
}

.widget_shopping_cart .ctiu-preview-link,
.woocommerce-mini-cart .ctiu-preview-link,
.elementor-menu-cart__product .ctiu-preview-link {
    font-size: 11px !important;
}

@media (min-width: 768px) {
    .ctiu-upload-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ctiu-upload-card {
        min-height: 170px;
    }
}

@media (max-width: 600px) {
    .woocommerce-checkout-review-order-table th.product-name,
    .woocommerce-checkout-review-order-table td.product-name,
    .woocommerce-checkout-review-order table.shop_table th.product-name,
    .woocommerce-checkout-review-order table.shop_table td.product-name {
        width: 78% !important;
        max-width: 78% !important;
    }

    .woocommerce-checkout-review-order-table th.product-total,
    .woocommerce-checkout-review-order-table td.product-total,
    .woocommerce-checkout-review-order table.shop_table th.product-total,
    .woocommerce-checkout-review-order table.shop_table td.product-total {
        width: 22% !important;
        max-width: 22% !important;
    }

    .woocommerce-checkout-review-order-table .ctiu-cart-preview,
    .woocommerce-checkout-review-order .ctiu-cart-preview {
        max-width: 140px !important;
    }

    .woocommerce-checkout-review-order-table .ctiu-preview-thumb,
    .woocommerce-checkout-review-order .ctiu-preview-thumb {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
    }
}

@media (max-width: 480px) {
    .ctiu-artwork-header {
        align-items: flex-start;
    }

    .ctiu-artwork-header small {
        font-size: 12px;
    }

    .ctiu-upload-card {
        min-height: 145px;
    }
}
