/* ============================================================
   AWP Frontend Styles — v1.3.1
   ============================================================ */

:root {
    --awp-primary:        #1a5fa8;
    --awp-primary-dark:   #124780;
    --awp-primary-light:  #ebf4ff;
    --awp-primary-mid:    #c5dcf5;
    --awp-accent:         #0d9563;
    --awp-accent-light:   #e6f7f0;
    --awp-border:         #d0d8e2;
    --awp-border-strong:  #adbbd0;
    --awp-radius:         10px;
    --awp-radius-sm:      6px;
    --awp-shadow:         0 1px 4px rgba(15,23,42,0.07);
    --awp-shadow-md:      0 3px 12px rgba(15,23,42,0.10);
    --awp-shadow-lg:      0 8px 28px rgba(15,23,42,0.13);
    --awp-text:           #0f172a;
    --awp-text-2:         #334155;
    --awp-muted:          #64748b;
    --awp-error:          #dc2626;
    --awp-error-light:    #fef2f2;
    --awp-error-border:   #fca5a5;
    --awp-success:        #0d9563;
    --awp-success-light:  #e6f7f0;
    --awp-warning-bg:     #fffbeb;
    --awp-warning-border: #f59e0b;
    --awp-warning-text:   #78350f;
    --awp-transition:     0.18s ease;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
div#awp-print-options {
    width: 100%;
}

.awp-print-options {
    margin: 28px 0;
    font-family: inherit;
    color: var(--awp-text);
}

/* ── Section title ───────────────────────────────────────────── */
.awp-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--awp-text);
    margin-bottom: 22px;
    padding-bottom: 13px;
    border-bottom: 3px solid var(--awp-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.awp-section-title svg {
    width: 20px;
    height: 20px;
    color: var(--awp-primary);
    flex-shrink: 0;
}

/* ── Field group ─────────────────────────────────────────────── */
.awp-field-group {
    margin-bottom: 24px;
}

.awp-field-group.awp-has-error .awp-select-field,
.awp-field-group.awp-has-error .awp-textarea {
    border-color: var(--awp-error-border);
    background-color: var(--awp-error-light);
}

.awp-field-group.awp-has-error .awp-radio-image-group,
.awp-field-group.awp-has-error .awp-checkbox-group,
.awp-field-group.awp-has-error .awp-turnaround-group,
.awp-field-group.awp-has-error .awp-radio-group {
    outline: 2px solid var(--awp-error-border);
    border-radius: var(--awp-radius-sm);
    outline-offset: 3px;
}

/* ── Labels ──────────────────────────────────────────────────── */
.awp-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 9px;
    color: var(--awp-text);
    letter-spacing: -0.01em;
}

.awp-label--required::after {
    content: ' *';
    color: var(--awp-error);
}

.awp-description {
    font-size: 13px;
    color: var(--awp-muted);
    margin: 0 0 12px;
    line-height: 1.55;
}

/* ── Select ──────────────────────────────────────────────────── */
.awp-select-field {
    width: 100%;
    max-width: 100%;
    padding: 10px 38px 10px 13px;
    border: 1.5px solid var(--awp-border);
    border-radius: var(--awp-radius-sm);
    font-size: 14px;
    background: #fff;
    color: var(--awp-text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    cursor: pointer;
    transition: border-color var(--awp-transition), box-shadow var(--awp-transition);
    box-shadow: var(--awp-shadow);
}

.awp-select-field:focus {
    border-color: var(--awp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,95,168,0.15);
}

.awp-select-field:hover:not(:focus) {
    border-color: var(--awp-border-strong);
}

/* ── Radio image group ────────────────────────────────────────── */
.awp-radio-image-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.awp-radio-image-option {
    position: relative;
    cursor: pointer;
}

.awp-radio-image-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.awp-radio-image-option .awp-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 16px;
    border: 2px solid var(--awp-border);
    border-radius: var(--awp-radius);
    background: #fff;
    min-width: 96px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--awp-text-2);
    transition:
        border-color var(--awp-transition),
        background    var(--awp-transition),
        box-shadow    var(--awp-transition),
        transform     var(--awp-transition);
    box-shadow: var(--awp-shadow);
}

.awp-radio-image-option img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 5px;
}

.awp-radio-image-option input[type="radio"]:checked ~ .awp-option-label,
.awp-radio-image-option.awp-selected .awp-option-label {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
    box-shadow: 0 0 0 3px rgba(26,95,168,0.18), var(--awp-shadow);
    color: var(--awp-primary);
    font-weight: 600;
}

.awp-radio-image-option .awp-option-label:hover {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--awp-shadow-md);
}

/* ── Turnaround group ─────────────────────────────────────────── */
.awp-turnaround-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.awp-turnaround-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid var(--awp-border);
    border-radius: var(--awp-radius-sm);
    background: #fff;
    cursor: pointer;
    transition:
        border-color var(--awp-transition),
        background   var(--awp-transition),
        box-shadow   var(--awp-transition);
    box-shadow: var(--awp-shadow);
}

.awp-turnaround-option:hover {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
}

.awp-turnaround-option:has(input:checked),
.awp-turnaround-option.awp-selected {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
    box-shadow: 0 0 0 2px rgba(26,95,168,0.14);
}

.awp-turnaround-option input {
    accent-color: var(--awp-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.awp-ta-label {
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    color: var(--awp-text);
}

/* ── Radio group (stickers, large format) ────────────────────── */
.awp-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.awp-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1.5px solid var(--awp-border);
    border-radius: var(--awp-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color var(--awp-transition), background var(--awp-transition);
    box-shadow: var(--awp-shadow);
}

.awp-radio-option:hover,
.awp-radio-option.awp-selected,
.awp-radio-option:has(input:checked) {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
}

.awp-radio-option input {
    accent-color: var(--awp-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.awp-radio-label {
    font-size: 14px;
    font-weight: 500;
}

/* ── Checkbox group ───────────────────────────────────────────── */
.awp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.awp-checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1.5px solid var(--awp-border);
    border-radius: var(--awp-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color var(--awp-transition), background var(--awp-transition);
    box-shadow: var(--awp-shadow);
}

.awp-checkbox-option:hover {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
}

.awp-checkbox-option:has(input:checked),
.awp-checkbox-option.awp-selected {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
}

.awp-checkbox-option input[type="checkbox"] {
    accent-color: var(--awp-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.awp-checkbox-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--awp-text-2);
}

/* ── Textarea ─────────────────────────────────────────────────── */
.awp-textarea {
    width: 100%;
    max-width: 560px;
    padding: 10px 13px;
    border: 1.5px solid var(--awp-border);
    border-radius: var(--awp-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--awp-text);
    background: #fff;
    resize: vertical;
    transition: border-color var(--awp-transition), box-shadow var(--awp-transition);
    box-sizing: border-box;
    box-shadow: var(--awp-shadow);
}

.awp-textarea:focus {
    border-color: var(--awp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,95,168,0.15);
}

/* ── Price badge ──────────────────────────────────────────────── */
.awp-price-badge {
    display: inline-block;
    background: var(--awp-accent-light);
    color: var(--awp-accent);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid rgba(13,149,99,0.2);
}

.awp-price-badge--ta {
    background: #fef3c7;
    color: #78350f;
    border-color: rgba(245,158,11,0.3);
}

.awp-price-badge--free {
    background: var(--awp-accent-light);
    color: var(--awp-accent);
    border-color: rgba(13,149,99,0.2);
}

/* ── Quantity tier boxes ─────────────────────────────────────── */
.awp-tier-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.awp-tier-box {
    min-width: 64px;
    padding: 10px 18px;
    border: 2px solid var(--awp-border);
    border-radius: var(--awp-radius-sm);
    background: #f8fafc;
    color: var(--awp-text);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition:
        background   var(--awp-transition),
        border-color var(--awp-transition),
        color        var(--awp-transition),
        box-shadow   var(--awp-transition);
    box-shadow: var(--awp-shadow);
    line-height: 1.2;
}

.awp-tier-box:hover:not(.awp-tier-box--active) {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
    color: var(--awp-primary);
}

/* Selected / active state — matches the screenshot's dark box */
.awp-tier-box--active {
    background: var(--awp-primary) !important;
    border-color: var(--awp-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(26,95,168,0.30) !important;
}

/* "Custom" box — slightly different label style */
.awp-tier-box--custom {
    font-size: 13px;
    color: var(--awp-muted);
    border-style: dashed;
}

.awp-tier-box--custom:hover:not(.awp-tier-box--active) {
    color: var(--awp-primary);
    border-style: solid;
}

.awp-tier-box--custom.awp-tier-box--active {
    border-style: solid !important;
}

/* ── Custom quantity input ────────────────────────────────────── */
.awp-custom-qty-wrap {
    margin-top: 2px;
    margin-bottom: 4px;
}

.awp-qty-input-row {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 240px;
}

.awp-qty-btn {
    width: 38px;
    height: 42px;
    border: 1.5px solid var(--awp-border);
    background: #f8fafc;
    color: var(--awp-text);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background var(--awp-transition), border-color var(--awp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.awp-qty-btn:hover {
    background: var(--awp-primary-light);
    border-color: var(--awp-primary);
    color: var(--awp-primary);
}

.awp-qty-minus {
    border-radius: var(--awp-radius-sm) 0 0 var(--awp-radius-sm);
    border-right: none;
}

.awp-qty-plus {
    border-radius: 0 var(--awp-radius-sm) var(--awp-radius-sm) 0;
    border-left: none;
}

.awp-qty-input {
    width: 80px !important;
    height: 42px;
    border: 1.5px solid var(--awp-border);
    border-radius: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--awp-text);
    background: #fff;
    -moz-appearance: textfield;
    padding: 0 8px;
    transition: border-color var(--awp-transition), box-shadow var(--awp-transition);
}

.awp-qty-input::-webkit-outer-spin-button,
.awp-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.awp-qty-input:focus {
    outline: none;
    border-color: var(--awp-primary);
    box-shadow: 0 0 0 3px rgba(26,95,168,0.12);
    z-index: 1;
    position: relative;
}

.awp-qty-input.awp-qty-input--error {
    border-color: var(--awp-error);
    background: var(--awp-error-light);
}

.awp-qty-units-label {
    margin-left: 10px;
    font-size: 13px;
    color: var(--awp-muted);
    white-space: nowrap;
}

.awp-qty-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--awp-muted);
    line-height: 1.5;
}

.awp-qty-error {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--awp-error);
}

/* ── Apparel size matrix ──────────────────────────────────────── */
.awp-matrix-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--awp-radius-sm);
    box-shadow: var(--awp-shadow);
    border: 1.5px solid var(--awp-border);
}

.awp-size-matrix {
    border-collapse: collapse;
    min-width: 500px;
    font-size: 13px;
    width: 100%;
}

.awp-size-matrix th,
.awp-size-matrix td {
    border: 1px solid var(--awp-border);
    padding: 8px 7px;
    text-align: center;
    vertical-align: middle;
}

.awp-size-matrix thead th {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--awp-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.awp-size-matrix .awp-matrix-color-col {
    text-align: left;
    min-width: 120px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.awp-size-matrix .awp-matrix-color-label {
    text-align: left;
    font-weight: 600;
    background: #f8fafc;
    color: var(--awp-text-2);
}

.awp-matrix-input {
    width: 56px;
    padding: 5px 6px;
    border: 1.5px solid var(--awp-border);
    border-radius: 5px;
    text-align: center;
    font-size: 13px;
    color: var(--awp-text);
    background: #fff;
    transition: border-color var(--awp-transition), background var(--awp-transition);
}

.awp-matrix-input:focus {
    border-color: var(--awp-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,95,168,0.12);
}

.awp-matrix-input.awp-matrix-input--active {
    border-color: var(--awp-primary-mid);
    background: var(--awp-primary-light);
    font-weight: 700;
    color: var(--awp-primary);
}

.awp-matrix-row-total,
.awp-col-total,
.awp-grand-qty-total {
    font-weight: 700;
    color: var(--awp-primary);
    background: var(--awp-primary-light) !important;
}

.awp-size-matrix tfoot td {
    background: var(--awp-primary-light);
    font-weight: 700;
    color: var(--awp-primary);
    font-size: 12px;
}

/* ── Artwork section ──────────────────────────────────────────── */
.awp-artwork-choice {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.awp-artwork-radio-option {
    position: relative;
    cursor: pointer;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.awp-artwork-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.awp-artwork-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    border: 2px solid var(--awp-border);
    border-radius: var(--awp-radius);
    background: #fff;
    transition:
        border-color var(--awp-transition),
        background   var(--awp-transition),
        box-shadow   var(--awp-transition);
    box-shadow: var(--awp-shadow);
    height: 100%;
    box-sizing: border-box;
}

.awp-artwork-radio-option input:checked ~ .awp-artwork-card {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
    box-shadow: 0 0 0 3px rgba(26,95,168,0.15);
}

.awp-artwork-card:hover {
    border-color: var(--awp-primary);
    box-shadow: var(--awp-shadow-md);
}

.awp-artwork-icon {
    line-height: 1;
    margin-bottom: 4px;
    display: block;
}

.awp-artwork-icon svg {
    width: 28px;
    height: 28px;
    color: var(--awp-primary);
}

.awp-artwork-card strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--awp-text);
    line-height: 1.3;
}

.awp-artwork-sub {
    font-size: 12px;
    color: var(--awp-muted);
    line-height: 1.4;
}

/* ── Upload zone ──────────────────────────────────────────────── */
.awp-upload-zone {
    margin-top: 14px;
}

.awp-dropzone {
    border: 2.5px dashed var(--awp-border);
    border-radius: var(--awp-radius);
    background: #fafcff;
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition:
        border-color var(--awp-transition),
        background   var(--awp-transition),
        box-shadow   var(--awp-transition);
}

.awp-dropzone:hover,
.awp-dropzone.awp-drag-over {
    border-color: var(--awp-primary);
    background: var(--awp-primary-light);
    box-shadow: inset 0 0 0 1px var(--awp-primary);
}

.awp-upload-icon {
    display: block;
    margin-bottom: 10px;
}

.awp-upload-icon svg {
    width: 36px;
    height: 36px;
    color: var(--awp-primary);
    opacity: 0.75;
}

.awp-dropzone-text {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--awp-text-2);
    line-height: 1.5;
}

.awp-file-trigger {
    color: var(--awp-primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.awp-dropzone-sub {
    font-size: 12px;
    color: var(--awp-muted);
    margin: 0;
}

.awp-file-input-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ── Upload status ────────────────────────────────────────────── */
.awp-upload-status {
    margin-top: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px solid var(--awp-border);
    border-radius: var(--awp-radius-sm);
}

.awp-upload-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.awp-upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--awp-primary), #3b82f6);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.awp-upload-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--awp-text);
    flex-wrap: wrap;
}

#awp_upload_filename {
    font-weight: 700;
}

#awp_upload_size {
    color: var(--awp-muted);
    font-size: 12px;
}

.awp-remove-upload-btn {
    border: 1px solid var(--awp-error-border);
    background: none;
    color: var(--awp-error);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    transition: background var(--awp-transition);
    margin-left: auto;
}

.awp-remove-upload-btn:hover {
    background: var(--awp-error-light);
}

.awp-upload-message {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 500;
}

.awp-upload-message.awp-success { color: var(--awp-success); }
.awp-upload-message.awp-error   { color: var(--awp-error); }

/* ── Design fee notice ────────────────────────────────────────── */
.awp-design-fee-notice {
    padding: 14px 18px;
    background: var(--awp-warning-bg);
    border: 1.5px solid var(--awp-warning-border);
    border-radius: var(--awp-radius);
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.55;
}

.awp-design-fee-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.awp-design-fee-icon svg {
    width: 18px;
    height: 18px;
    color: #d97706;
}

/* ── Proof checkbox ───────────────────────────────────────────── */
.awp-proof-group {
    padding: 18px 20px;
    background: var(--awp-warning-bg);
    border: 1.5px solid var(--awp-warning-border);
    border-radius: var(--awp-radius);
    box-shadow: var(--awp-shadow);
    transition: border-color var(--awp-transition);
}

.awp-proof-group.awp-has-error {
    border-color: var(--awp-error-border);
    background: var(--awp-error-light);
}

.awp-proof-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}

.awp-proof-checkbox {
    margin-top: 2px;
    accent-color: var(--awp-primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.awp-proof-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--awp-warning-text);
}

/* ── Price box ────────────────────────────────────────────────── */
.awp-price-box {
    border-radius: var(--awp-radius);
    overflow: hidden;
    margin-top: 12px;
    box-shadow: var(--awp-shadow-lg);
    border: 1.5px solid var(--awp-primary-mid);
}

.awp-price-box-header {
    background: linear-gradient(135deg, var(--awp-primary) 0%, #2d7de0 100%);
    color: #fff;
    padding: 13px 20px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.awp-price-box-header svg {
    width: 15px;
    height: 15px;
    opacity: 0.85;
}

.awp-price-breakdown {
    background: var(--awp-primary-light);
    padding: 14px 20px 0;
    font-size: 13px;
    color: var(--awp-muted);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.awp-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.awp-breakdown-row + .awp-breakdown-row {
    border-top: 1px dashed var(--awp-primary-mid);
    padding-top: 6px;
}

.awp-price-total {
    background: var(--awp-primary-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--awp-primary-mid);
    padding: 14px 20px 16px;
    margin-top: 4px;
}

.awp-price-total-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--awp-text);
}

.awp-price-total-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--awp-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    transition: opacity var(--awp-transition), transform var(--awp-transition);
}

.awp-price-total-value.awp-price-updating {
    opacity: 0.4;
    transform: scale(0.95);
}

.awp-price-unit {
    background: var(--awp-primary-light);
    font-size: 12px;
    color: var(--awp-muted);
    text-align: right;
    padding: 2px 20px 14px;
}

.awp-price-unit strong {
    color: var(--awp-text-2);
}

.awp-calculating {
    background: var(--awp-primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--awp-muted);
    padding: 10px 20px 12px;
}

/* ── Spinner ──────────────────────────────────────────────────── */
.awp-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--awp-primary-mid);
    border-top-color: var(--awp-primary);
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    animation: awp-spin 0.65s linear infinite;
}

@keyframes awp-spin {
    to { transform: rotate(360deg); }
}

/* ── Field error ──────────────────────────────────────────────── */
.awp-field-error {
    color: var(--awp-error);
    font-size: 12px;
    font-weight: 600;
    margin: 7px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Utility ──────────────────────────────────────────────────── */
.awp-hidden { display: none !important; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
    .awp-artwork-choice {
        flex-direction: column;
    }

    .awp-artwork-radio-option {
        max-width: 100%;
    }

    .awp-radio-image-group {
        gap: 8px;
    }

    .awp-price-total-value {
        font-size: 24px;
    }

    .awp-turnaround-group,
    .awp-radio-group {
        gap: 6px;
    }

    .awp-section-title {
        font-size: 15px;
    }
}

/* ── Apparel matrix: mobile card-per-color layout ─────────────── */
/* On narrow viewports the 2D grid is replaced with a card per color.
   Each card uses flexbox so the size labels (via ::before) and inputs
   sit correctly in a 4-column grid without fighting the table reset. */
@media (max-width: 720px) {
    .awp-matrix-wrapper {
        overflow-x: visible;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    /* Flatten table structure to block/flex */
    .awp-size-matrix,
    .awp-size-matrix thead,
    .awp-size-matrix tbody,
    .awp-size-matrix tfoot {
        display: block;
        width: 100%;
       min-width: auto;
    }

    .awp-size-matrix th,
    .awp-size-matrix td {
        display: block;
        border: none;
        padding: 0;
        width: 100%;
        min-width: 0;
    }

    /* Hide the desktop column-header row */
    .awp-size-matrix thead {
        display: none;
    }

    /* Each color row → flex card; flex-wrap lets the size cells
       flow into a multi-column grid while keeping the color heading
       and row-total spanning the full width */
    .awp-size-matrix tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        background: #fff;
        border: 1.5px solid var(--awp-border);
        border-radius: var(--awp-radius-sm);
        box-shadow: var(--awp-shadow);
        margin-bottom: 12px;
        padding: 12px 14px;
    }

    /* Color name spans the full card width as heading */
    .awp-size-matrix .awp-matrix-color-label {
        flex: 0 0 100%;
        width: 100%;
        background: transparent;
        font-size: 14px;
        font-weight: 700;
        color: var(--awp-primary);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--awp-border);
        margin-bottom: 2px;
    }

    /* Each size cell: 4 columns, flex-column so ::before sits above input */
    .awp-size-matrix tbody td[data-size] {
        flex: 0 0 calc(25% - 5px);
        width: calc(25% - 5px);
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Size label rendered from the td's data-size attribute */
    .awp-size-matrix tbody td[data-size]::before {
        content: attr(data-size) !important;
        display: block;
        font-size: 11px !important;
        font-weight: 700 !important;
        color: var(--awp-text-2) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        margin-bottom: 4px;
        text-align: center;
        width: 100%;
    }

    .awp-matrix-input {
        width: 100%;
        padding: 8px 4px;
        font-size: 14px;
        text-align: center;
    }

    /* Row total: full-width footer inside each card */
    .awp-size-matrix .awp-row-total {
        flex: 0 0 100%;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 8px;
        margin-top: 2px;
        border-top: 1px dashed var(--awp-border);
        background: transparent !important;
        font-size: 13px;
    }

    .awp-size-matrix .awp-row-total::before {
        content: attr(data-label) ":";
        color: var(--awp-text-2);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 11px;
    }

    /* Footer: show only the grand total, hide per-size column totals */
    .awp-size-matrix tfoot tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        background: var(--awp-primary-light);
        border: 1.5px solid var(--awp-primary-mid);
        border-radius: var(--awp-radius-sm);
        padding: 10px 14px;
    }

    .awp-size-matrix tfoot td {
        display: none;
        background: transparent;
        width: auto;
    }

    .awp-size-matrix tfoot td:first-child,
    .awp-size-matrix .awp-grand-qty-total {
        display: block;
        width: auto;
        padding: 0;
        font-size: 14px;
    }

    .awp-size-matrix .awp-grand-qty-total {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    /* Narrowest screens: drop to 3-column grid for size inputs */
    .awp-size-matrix tbody td[data-size] {
        flex: 0 0 calc(33.333% - 5px);
        width: calc(33.333% - 5px);
    }
}
