.pd-custom-print-wrap {
    background: var(--e-global-color-0d6bd9a, #f5f5f5);
    border-radius: 8px;
    padding: 24px;
    margin: 0 0 24px 0;
    width: 100%;
    box-sizing: border-box;
}
.pd-custom-print-title {
    font-family: "Cinzel", serif;
    font-size: 20px;
    color: var(--e-global-color-secondary, #4A9745);
    margin: 0 0 4px 0;
}
.pd-custom-print-note {
    font-size: 13px;
    color: #888;
    margin: 0 0 20px 0;
}
.pd-cp-dropzone {
    border: 2px dashed var(--e-global-color-primary, #4A9745);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    background: #fff;
}
.pd-cp-dropzone:hover,
.pd-cp-dropzone.dragover {
    background: var(--e-global-color-0d6bd9a, #f0f7f0);
    border-color: var(--e-global-color-secondary, #4A9745);
}
.pd-cp-dropzone-text {
    font-size: 15px;
    color: var(--e-global-color-secondary, #4A9745);
    margin: 0 0 8px 0;
    font-weight: 600;
}
.pd-cp-dropzone-sub {
    font-size: 12px;
    color: #999;
    margin: 0 0 12px 0;
}
.pd-cp-upload-btn {
    display: inline-block;
    background: var(--e-global-color-primary, #4A9745);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.pd-cp-upload-btn:hover {
    background: var(--e-global-color-secondary, #3a7a35);
}
.pd-cp-files-preview {
    margin-top: 12px;
}
.pd-cp-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 6px;
}
.pd-cp-file-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}
.pd-cp-file-info {
    flex: 1;
    font-size: 13px;
}
.pd-cp-file-name {
    font-weight: 600;
    color: #333;
}
.pd-cp-file-size {
    color: #999;
}
.pd-cp-file-remove {
    color: #c00;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.pd-cp-message-area {
    margin-top: 20px;
}
.pd-cp-message-area label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}
.pd-cp-counter {
    font-weight: 400;
    font-size: 12px;
    color: #999;
}
#pd-cp-message {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}
.pd-cp-save-btn {
    background: var(--e-global-color-primary, #4A9745) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    margin-top: 20px !important;
    width: 100%;
}
.pd-cp-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.pd-cp-status {
    margin-top: 10px;
    font-size: 13px;
}
.pd-cp-status.success {
    color: var(--e-global-color-primary, #4A9745);
}
.pd-cp-status.error {
    color: #c00;
}
form.cart:not(.pd-cp-ready) .quantity,
form.cart:not(.pd-cp-ready) .single_add_to_cart_button,
form.cart:not(.pd-cp-ready) button[type="submit"] {
    display: none !important;
}
.pd-cp-cart-notice {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-bottom: 12px;
    font-style: italic;
}
@media (max-width: 767px) {
    .pd-custom-print-wrap { padding: 16px; }
    .pd-cp-dropzone { padding: 20px 12px; }
    .pd-cp-save-btn { padding: 12px 20px !important; }
}

/* Layout: blocco customization sopra, quantity + add-to-cart sotto a tutta larghezza */
form.cart {
    flex-direction: column;
    align-items: stretch;
}
form.cart .quantity {
    margin: 0 0 12px;
    height: auto;
}
form.cart .single_add_to_cart_button {
    width: 100%;
    height: auto;
    padding: 14px 40px;
}

.pd-cp-reset-btn {
    background: transparent !important;
    color: #888 !important;
    border: 1px solid #bbb !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer;
    margin-top: 10px !important;
    width: 100%;
}
.pd-cp-reset-btn:hover {
    color: #c0392b !important;
    border-color: #c0392b !important;
}

/* Format selection */
.pd-cp-format-area { margin-top: 20px; }
.pd-cp-format-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.pd-cp-format-options { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-cp-format-option { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 10px 14px; }
.pd-cp-format-option input[type="radio"] { accent-color: #4A9745; margin: 0; }
.pd-cp-format-option:has(input:checked) { border-color: #4A9745; background: #f0f7f0; }
.pd-cp-format-name { color: #4A9745; text-decoration: underline; cursor: pointer; }
.pd-cp-format-hint { font-size: 12px; color: #999; margin: 6px 0 0; }

/* Format modal */
.pd-cp-format-modal { position: fixed; inset: 0; z-index: 99999; }
.pd-cp-format-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.pd-cp-format-modal-box { position: relative; max-width: min(560px, 92vw); margin: 6vh auto 0; background: #fff; border-radius: 10px; padding: 20px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.pd-cp-format-modal-close { position: absolute; top: 8px; right: 14px; font-size: 26px; cursor: pointer; color: #666; line-height: 1; }
.pd-cp-format-modal-title { margin: 0 0 12px; font-size: 18px; }
.pd-cp-format-modal-img { max-width: 100%; max-height: 60vh; border-radius: 6px; }
.pd-cp-format-modal-select { display: block; width: 100%; margin-top: 14px; background: #4A9745 !important; color: #fff !important; border: none !important; border-radius: 6px !important; padding: 12px !important; cursor: pointer; }
body.pd-cp-modal-open { overflow: hidden; }
