/**
 * Spectra Printing - Frontend Styles
 */

:root {
    --sp-primary: #2271b1;
    --sp-primary-dark: #135e96;
    --sp-success: #00a32a;
    --sp-danger: #d63638;
    --sp-border: #c3c4c7;
    --sp-text: #1d2327;
    --sp-text-muted: #646970;
    --sp-bg: #f6f7f7;
    --sp-white: #ffffff;
    --sp-radius: 4px;
    --sp-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ============================================================
   FORM WRAPPER
   ============================================================ */

.spectra-printing-form-wrapper {
    background: var(--sp-white);
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    padding: 32px;
    margin: 20px 0;
    max-width: 720px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--sp-text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ============================================================
   HEADER
   ============================================================ */

.sp-form-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--sp-bg);
}

.sp-form-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: var(--sp-text);
}

.sp-form-subtitle {
    margin: 0;
    color: var(--sp-text-muted);
    font-size: 14px;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.sp-section {
    margin-bottom: 28px;
}

.sp-section:last-child {
    margin-bottom: 0;
}

.sp-section-title {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--sp-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   STEP NUMBERS
   ============================================================ */

.sp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--sp-primary);
    color: var(--sp-white);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================================
   FIELDS
   ============================================================ */

.sp-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.sp-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.sp-field-group:last-child {
    margin-bottom: 0;
}

.sp-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-text);
}

.sp-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--sp-text);
    background: var(--sp-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.sp-input:focus {
    outline: none;
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
}

.sp-input::placeholder {
    color: #a7aaad;
}

.sp-textarea {
    resize: vertical;
    min-height: 80px;
}

.sp-field-hint {
    font-size: 11px;
    color: var(--sp-text-muted);
    margin-top: 2px;
}

/* ============================================================
   RADIO BUTTONS
   ============================================================ */

.sp-radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sp-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--sp-border);
    border-radius: var(--sp-radius);
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1;
    min-width: 160px;
    font-size: 13px;
}

.sp-radio-label:hover {
    border-color: var(--sp-primary);
    background: rgba(34,113,177,0.04);
}

.sp-radio-label:has(input:checked) {
    border-color: var(--sp-primary);
    background: rgba(34,113,177,0.08);
}

.sp-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--sp-primary);
}

.sp-radio-label span {
    font-weight: 600;
}

.sp-price-hint {
    margin-left: auto;
    color: var(--sp-success);
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

/* ============================================================
   ORIENTATION
   ============================================================ */

.sp-orientation-group {
    flex-direction: row;
}

/* ============================================================
   DIMENSIONS
   ============================================================ */

.sp-dimensions-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.sp-dim-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-dim-label {
    font-size: 12px;
    color: var(--sp-text-muted);
    font-weight: 500;
}

.sp-dim-input {
    width: 100px;
}

.sp-dim-sep {
    font-size: 18px;
    font-weight: 700;
    color: var(--sp-text-muted);
    padding-bottom: 8px;
}

/* ============================================================
   UNIT TOGGLE
   ============================================================ */

.sp-unit-toggle {
    display: flex;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    overflow: hidden;
    margin-bottom: 4px;
}

.sp-unit-btn {
    padding: 8px 14px;
    border: none;
    background: var(--sp-white);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-text-muted);
    transition: all 0.15s ease;
}

.sp-unit-btn:first-child {
    border-right: 1px solid var(--sp-border);
}

.sp-unit-btn.active {
    background: var(--sp-primary);
    color: var(--sp-white);
}

.sp-unit-btn:hover:not(.active) {
    background: var(--sp-bg);
}

/* ============================================================
   QUANTITY INPUT
   ============================================================ */

.sp-qty-input {
    width: 120px;
}

/* ============================================================
   FILE UPLOAD
   ============================================================ */

.sp-upload-box {
    margin-bottom: 12px;
}

.sp-upload-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-text);
    margin-bottom: 6px;
    display: block;
}

.sp-upload-area {
    border: 2px dashed var(--sp-border);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: var(--sp-bg);
}

.sp-upload-area:hover,
.sp-upload-area.dragover {
    border-color: var(--sp-primary);
    background: rgba(34,113,177,0.04);
}

.sp-upload-icon {
    font-size: 40px;
    color: #a7aaad;
    display: block;
    margin-bottom: 8px;
}

.sp-upload-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-text);
    margin: 0 0 4px;
}

.sp-upload-hint {
    font-size: 12px;
    color: var(--sp-text-muted);
    margin: 0;
}

.sp-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Upload Progress */
.sp-upload-progress {
    padding: 16px;
    text-align: center;
}

.sp-progress-bar {
    height: 6px;
    background: var(--sp-bg);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.sp-progress-fill {
    height: 100%;
    background: var(--sp-primary);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.sp-progress-text {
    font-size: 13px;
    color: var(--sp-text-muted);
}

/* Upload Result */
.sp-upload-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #d8f0e5;
    border: 1px solid #b4e8c1;
    border-radius: var(--sp-radius);
}

.sp-upload-success-icon {
    color: #1a7f37;
    font-size: 24px;
    flex-shrink: 0;
}

.sp-upload-info {
    flex: 1;
    min-width: 0;
}

.sp-upload-filename {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--sp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-upload-filesize {
    font-size: 12px;
    color: var(--sp-text-muted);
}

.sp-upload-delete {
    color: var(--sp-danger);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.sp-upload-delete:hover {
    background: rgba(214,54,56,0.1);
}

/* Double upload section */
.sp-double-upload {
    margin-top: 12px;
}

/* ============================================================
   PRICE SUMMARY
   ============================================================ */

.sp-price-summary {
    background: var(--sp-bg);
    border-radius: var(--sp-radius);
    padding: 20px;
}

.sp-price-breakdown {
    margin-bottom: 16px;
}

.sp-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
}

.sp-price-row:last-child {
    border-bottom: none;
}

.sp-price-label {
    color: var(--sp-text-muted);
}

.sp-price-value {
    font-weight: 600;
    color: var(--sp-text);
}

.sp-price-total {
    padding-top: 12px !important;
}

.sp-price-total .sp-price-label,
.sp-price-total .sp-price-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--sp-primary-dark);
}

/* Notes */
.sp-notes-group {
    margin-bottom: 16px;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.sp-form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.sp-submit-btn {
    padding: 14px 32px;
    background: var(--sp-primary);
    color: var(--sp-white);
    border: none;
    border-radius: var(--sp-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    width: 100%;
}

.sp-submit-btn:hover:not(:disabled) {
    background: var(--sp-primary-dark);
}

.sp-submit-btn:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

.sp-submit-hint {
    font-size: 12px;
    color: var(--sp-text-muted);
    margin: 0;
    text-align: center;
    width: 100%;
}

/* ============================================================
   STATUS MESSAGES
   ============================================================ */

.sp-status-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--sp-radius);
    font-size: 14px;
    text-align: center;
}

.sp-status-message.success {
    background: #d8f0e5;
    color: #1a7f37;
    border: 1px solid #b4e8c1;
}

.sp-status-message.error {
    background: #fcf0f1;
    color: #b32d2e;
    border: 1px solid #f0c6c6;
}

.sp-status-message.info {
    background: #dbf0fd;
    color: #0a4b78;
    border: 1px solid #c2dbf5;
}

/* ============================================================
   PRICING TABLE (shortcode)
   ============================================================ */

.sp-pricing-table {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sp-pricing-table h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}

.sp-pricing-table table {
    width: 100%;
    border-collapse: collapse;
}

.sp-pricing-table th,
.sp-pricing-table td {
    padding: 10px 16px;
    border: 1px solid var(--sp-border);
    text-align: left;
    font-size: 14px;
}

.sp-pricing-table th {
    background: var(--sp-bg);
    font-weight: 700;
}

/* ============================================================
   SUCCESS / THANK YOU
   ============================================================ */

.spectra-order-success {
    text-align: center;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.spectra-order-success h2 {
    color: #1a7f37;
    font-size: 24px;
    margin-bottom: 12px;
}

.spectra-order-success p {
    color: var(--sp-text-muted);
    font-size: 15px;
    margin: 0 0 8px;
}

/* ============================================================
   ELEMENTOR COMPATIBILITY
   ============================================================ */

.elementor-widget-sp-printing-form .spectra-printing-form-wrapper {
    border: none;
    padding: 0;
    box-shadow: none;
}

.elementor-editor-active .spectra-printing-form-wrapper {
    outline: 2px dashed var(--sp-primary);
    outline-offset: 4px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ============================================================
   WOOCOMMERCE SINGLE PRODUCT — stepped “configure your print” card
   ============================================================ */

/* Quantity is managed via our custom input inside the print config card;
   the WC quantity field is kept for form submission (JS mirrors our value into it). */

.spectra-printing-wc-wrap.sp-wc-card {
    --sp-wc-ink: #1a1a1a;
    --sp-wc-muted: #5c5c5c;
    --sp-wc-line: #e2e4e7;
    --sp-wc-surface: #fafafa;
    --sp-wc-accent: #2c3338;
    --sp-wc-accent-on: #fff;
    margin: 0 0 1.75rem;
    padding: 0;
    border: 1px solid var(--sp-wc-line);
    border-radius: 12px;
    background: var(--sp-white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    font-family: inherit;
    color: var(--sp-wc-ink);
    /* overflow: hidden removed: Add to Cart lives outside this wrap and must be clickable */
}

.sp-wc-card__header {
    padding: 1.35rem 1.35rem 1rem;
    border-bottom: 1px solid var(--sp-wc-line);
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.sp-wc-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--sp-wc-ink);
}

.sp-wc-card__product {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sp-wc-muted);
}

.sp-wc-card__lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--sp-wc-muted);
}

.sp-wc-steps {
    padding: 0.25rem 0 0;
}

.sp-wc-step {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--sp-wc-line);
}

.sp-wc-step:last-of-type {
    border-bottom: none;
}

.sp-wc-step__head {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.sp-wc-step__num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--sp-wc-accent);
    color: var(--sp-wc-accent-on);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 2rem;
    text-align: center;
}

.sp-wc-step__titles {
    flex: 1;
    min-width: 0;
}

.sp-wc-step__label {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--sp-wc-ink);
    margin: 0 0 0.35rem;
}

label.sp-wc-step__label {
    cursor: pointer;
}

.sp-wc-step__hint {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--sp-wc-muted);
}

.sp-wc-step__body {
    margin-left: 0;
}

@media (min-width: 480px) {
    .sp-wc-step__body {
        margin-left: calc(2rem + 0.85rem);
    }
}

/* Full-width selects */
.sp-wc-select--block {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 2.25rem 0.75rem 0.9rem;
    font-size: 1rem;
    line-height: 1.4;
    border: 1px solid var(--sp-wc-line);
    border-radius: 8px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c5c5c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    color: var(--sp-wc-ink);
    box-sizing: border-box;
}

.sp-wc-select--block:focus {
    outline: none;
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

.sp-wc-input {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    border: 1px solid var(--sp-wc-line);
    border-radius: 8px;
    box-sizing: border-box;
    color: var(--sp-wc-ink);
    background: #fff;
}

.sp-wc-input:focus {
    outline: none;
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

.sp-wc-input--qty {
    max-width: 8rem;
}

.sp-wc-qty-meta {
    margin: 0.4rem 0 0;
    font-size: 0.8rem;
    color: var(--sp-wc-muted);
}

/* Feet / Meters toggle */
.sp-wc-unit-tabs--large {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem;
    padding: 4px;
    border-radius: 10px;
    background: var(--sp-wc-surface);
    border: 1px solid var(--sp-wc-line);
    gap: 4px;
    box-sizing: border-box;
}

.sp-wc-unit-tabs--large .sp-wc-unit-btn {
    flex: 1;
    margin: 0;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    background: transparent;
    color: var(--sp-wc-muted);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sp-wc-unit-tabs--large .sp-wc-unit-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.04);
    color: var(--sp-wc-ink);
}

.sp-wc-unit-tabs--large .sp-wc-unit-btn.active {
    background: var(--sp-wc-accent);
    color: var(--sp-wc-accent-on);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Dimensions row */
.sp-wc-dims--card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
}

.sp-wc-dim-field {
    flex: 1;
    min-width: 6.5rem;
    position: relative;
}

.sp-wc-dim-field__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sp-wc-muted);
    margin-bottom: 0.35rem;
}

.sp-wc-dims--card .sp-wc-input.sp-wc-dim {
    width: 100%;
    padding-right: 2.25rem;
}

.sp-wc-dim-unit {
    position: absolute;
    right: 0.75rem;
    bottom: 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sp-wc-muted);
    pointer-events: none;
}

.sp-wc-dims--card .sp-wc-dim-sep {
    padding-bottom: 0.65rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #b0b3b8;
    flex-shrink: 0;
}

.sp-wc-area-bar {
    margin-top: 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    background: var(--sp-wc-surface);
    border: 1px solid var(--sp-wc-line);
}

.sp-wc-area-hint {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sp-wc-muted);
    text-align: center;
}

/* Upload (WC) */
.sp-wc-step--upload .sp-upload-area {
    border-radius: 10px;
    border-color: #cfd2d6;
    background: #fbfbfc;
    padding: 1.75rem 1rem;
}

.sp-wc-step--upload .sp-upload-area:hover {
    border-color: var(--sp-primary);
    background: rgba(34, 113, 177, 0.04);
}

.sp-wc-upload-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: #8c8f94;
}

.sp-wc-upload-icon svg {
    display: block;
}

.sp-wc-step--upload .sp-upload-text {
    font-size: 1rem;
}

.sp-wc-upload-back-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sp-wc-ink);
}

.sp-wc-card .sp-upload-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
}

.sp-upload-check {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #1a7f37;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.75rem;
    text-align: center;
}

.sp-wc-card .sp-upload-delete {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(214, 54, 56, 0.12);
    color: var(--sp-danger);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sp-wc-card .sp-upload-delete:hover {
    background: rgba(214, 54, 56, 0.22);
}

/* Footer total + CTA buttons */
.sp-wc-footer {
    padding: 1.15rem 1.35rem 1.35rem;
    background: var(--sp-wc-surface);
    border-top: 1px solid var(--sp-wc-line);
    /* Ensure no pointer-event issues bleed in from parent */
    position: relative;
    z-index: 1;
}

.sp-wc-footer__divider {
    display: none;
}

.sp-wc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 0.85rem;
    padding: 0;
    border: none;
    font-size: 1.15rem;
}

.sp-wc-total-row__label {
    font-weight: 700;
    color: var(--sp-wc-ink);
}

.sp-wc-price-total {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--sp-primary-dark);
}

.sp-wc-price-total .woocommerce-Price-amount,
.sp-wc-price-total .amount {
    font-weight: inherit;
}

.sp-wc-price-breakdown {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--sp-wc-muted);
    min-height: 1.25em;
}

.sp-wc-price-breakdown .sp-wc-per-suffix {
    font-weight: 600;
    color: var(--sp-wc-muted);
}

.sp-wc-footer__note {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--sp-wc-muted);
}

/* CTA buttons: Add to Cart + Buy Now — live in the print config footer */
.sp-wc-footer .sp-wc-cta-row {
    position: relative;
    z-index: 10;
}

.sp-wc-cta-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.sp-wc-cta-row .single_add_to_cart_button,
.sp-wc-cta-row .sp-wc-btn-buy-now {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.18s ease, opacity 0.18s ease, transform 0.1s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.sp-wc-cta-row .single_add_to_cart_button:active,
.sp-wc-cta-row .sp-wc-btn-buy-now:active {
    transform: scale(0.97);
}

/* Add to Cart: WooCommerce primary style */
.sp-wc-cta-row .single_add_to_cart_button {
    background: #2c3338;
    color: #fff;
}

.sp-wc-cta-row .single_add_to_cart_button:hover:not(:disabled) {
    background: #1d1a1a;
}

.sp-wc-cta-row .single_add_to_cart_button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* Buy Now: distinct brand accent */
.sp-wc-cta-row .sp-wc-btn-buy-now {
    background: #1d1a46;
    color: #fff;
}

.sp-wc-cta-row .sp-wc-btn-buy-now:hover {
    background: #131033;
}

.sp-wc-cta-row .sp-wc-btn-buy-now.loading {
    opacity: 0.7;
    cursor: wait;
}

.sp-wc-cta-row .sp-wc-btn-buy-now:focus {
    outline: 2px solid rgba(29, 26, 70, 0.5);
    outline-offset: 2px;
}

/* Hide WooCommerce's own Add to Cart button — we use our own in the footer. */
.single-product div.product form.cart .single_add_to_cart_button:not(.sp-wc-btn-add-to-cart) {
    display: none !important;
}

/* Our footer buttons must always be visible. */
.sp-wc-footer .sp-wc-cta-row {
    display: flex !important;
    position: relative;
    z-index: 10;
}

.sp-wc-footer .sp-wc-cta-row .single_add_to_cart_button,
.sp-wc-footer .sp-wc-cta-row .sp-wc-btn-buy-now {
    display: inline-block !important;
}

.spectra-printing-wc-wrap button.single_add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .spectra-printing-form-wrapper {
        padding: 20px 16px;
    }

    .sp-fields-row {
        grid-template-columns: 1fr;
    }

    .sp-radio-group {
        flex-direction: column;
    }

    .sp-radio-label {
        min-width: unset;
    }

    .sp-dimensions-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .sp-dim-sep {
        display: none;
    }

    .sp-unit-toggle {
        width: 100%;
    }

    .sp-unit-btn {
        flex: 1;
        text-align: center;
    }

    .sp-wc-card__header,
    .sp-wc-step,
    .sp-wc-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sp-wc-dims--card {
        flex-direction: column;
        align-items: stretch;
    }

    .sp-wc-dims--card .sp-wc-dim-sep {
        display: none;
    }
}

/* ============================================================
   CART + CHECKOUT POLISH
   ============================================================ */

body.woocommerce-cart,
body.woocommerce-checkout {
    --sp-shop-brand: #1d1a46;
    --sp-shop-brand-dark: #131033;
    --sp-shop-text: #1f2937;
    --sp-shop-muted: #607084;
    --sp-shop-border: #d7deea;
    --sp-shop-bg: #f5f7fc;
    --sp-shop-surface: #ffffff;
    --sp-shop-radius: 14px;
    --sp-shop-shadow: 0 16px 32px rgba(17, 24, 39, 0.08);
}

body.woocommerce-cart .wc-block-cart,
body.woocommerce-checkout .wp-block-woocommerce-checkout,
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce {
    color: var(--sp-shop-text);
    font-family: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.woocommerce-cart h1,
body.woocommerce-checkout h1,
body.woocommerce-cart h2,
body.woocommerce-checkout h2,
body.woocommerce-cart h3,
body.woocommerce-checkout h3 {
    color: var(--sp-shop-brand);
    font-weight: 700;
    letter-spacing: -0.01em;
}

body.woocommerce-cart .wc-block-cart a,
body.woocommerce-checkout .wc-block-checkout a,
body.woocommerce-cart .woocommerce a,
body.woocommerce-checkout .woocommerce a {
    color: var(--sp-shop-brand) !important;
}

body.woocommerce-cart .wc-block-cart a:hover,
body.woocommerce-checkout .wc-block-checkout a:hover,
body.woocommerce-cart .woocommerce a:hover,
body.woocommerce-checkout .woocommerce a:hover {
    color: var(--sp-shop-brand-dark) !important;
}

body.woocommerce-cart .wp-block-woocommerce-filled-cart-block,
body.woocommerce-checkout .wp-block-woocommerce-checkout {
    margin-top: 18px;
}

body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart .wc-block-components-sidebar,
body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-sidebar,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper {
    background: var(--sp-shop-surface);
    border: 1px solid var(--sp-shop-border);
    border-radius: var(--sp-shop-radius);
    box-shadow: var(--sp-shop-shadow);
}

body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step {
    padding: 18px 20px;
}

body.woocommerce-cart .wc-block-cart-items__header {
    color: var(--sp-shop-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.woocommerce-cart .wc-block-cart-items__row,
body.woocommerce-cart .wc-block-components-order-summary-item {
    border-bottom-color: #e7edf6;
}

body.woocommerce-cart .wc-block-cart-item__image img,
body.woocommerce-checkout .wc-block-components-order-summary-item__image img,
body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img,
body.woocommerce-checkout .woocommerce-checkout-review-order-table img {
    border: 1px solid #e3e9f3;
    border-radius: 10px;
    overflow: hidden;
}

body.woocommerce-cart .wc-block-components-quantity-selector,
body.woocommerce-cart .quantity .qty,
body.woocommerce-checkout .quantity .qty {
    border: 1px solid var(--sp-shop-border);
    border-radius: 10px;
}

body.woocommerce-cart .wc-block-components-quantity-selector input,
body.woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
    color: var(--sp-shop-text);
}

body.woocommerce-cart .wc-block-components-quantity-selector:focus-within {
    border-color: var(--sp-shop-brand);
    box-shadow: 0 0 0 3px rgba(29, 26, 70, 0.15);
}

body.woocommerce-cart .wc-block-components-formatted-money-amount,
body.woocommerce-checkout .wc-block-components-formatted-money-amount,
body.woocommerce-cart .woocommerce .amount,
body.woocommerce-checkout .woocommerce .amount {
    color: var(--sp-shop-brand);
    font-weight: 700;
}

body.woocommerce-cart .wc-block-components-order-summary .wc-block-components-order-summary-item__description,
body.woocommerce-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__description,
body.woocommerce-cart .woocommerce .product-name .wc-item-meta,
body.woocommerce-checkout .woocommerce .product-name .wc-item-meta {
    color: var(--sp-shop-muted);
    font-size: 12px;
    line-height: 1.5;
}

body.woocommerce-cart .wc-block-components-text-input input,
body.woocommerce-cart .wc-block-components-combobox-control .components-combobox-control__input,
body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox-control .components-combobox-control__input,
body.woocommerce-cart .woocommerce input.input-text,
body.woocommerce-cart .woocommerce select,
body.woocommerce-checkout .woocommerce input.input-text,
body.woocommerce-checkout .woocommerce select,
body.woocommerce-checkout .woocommerce textarea {
    min-height: 46px;
    border: 1px solid var(--sp-shop-border) !important;
    border-radius: 10px !important;
    color: var(--sp-shop-text);
    background: var(--sp-shop-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.woocommerce-cart .wc-block-components-text-input input:focus,
body.woocommerce-cart .wc-block-components-combobox-control .components-combobox-control__input:focus,
body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-combobox-control .components-combobox-control__input:focus,
body.woocommerce-cart .woocommerce input.input-text:focus,
body.woocommerce-cart .woocommerce select:focus,
body.woocommerce-checkout .woocommerce input.input-text:focus,
body.woocommerce-checkout .woocommerce select:focus,
body.woocommerce-checkout .woocommerce textarea:focus {
    border-color: var(--sp-shop-brand) !important;
    box-shadow: 0 0 0 3px rgba(29, 26, 70, 0.12);
    outline: none;
}

body.woocommerce-cart .wc-block-components-button:not(.is-link),
body.woocommerce-checkout .wc-block-components-button:not(.is-link),
body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-cart .woocommerce a.button,
body.woocommerce-cart .woocommerce button.button,
body.woocommerce-checkout .woocommerce button.button,
body.woocommerce-checkout #place_order {
    min-height: 46px;
    padding: 11px 22px;
    border-radius: 10px !important;
    border: 1px solid var(--sp-shop-brand) !important;
    background: var(--sp-shop-brand) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: none;
    box-shadow: 0 8px 18px rgba(29, 26, 70, 0.2);
    transition: transform 0.12s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

body.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
body.woocommerce-checkout .wc-block-components-button:not(.is-link):hover,
body.woocommerce-cart .wc-block-cart__submit-button:hover,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
body.woocommerce-cart .woocommerce a.button:hover,
body.woocommerce-cart .woocommerce button.button:hover,
body.woocommerce-checkout .woocommerce button.button:hover,
body.woocommerce-checkout #place_order:hover {
    background: var(--sp-shop-brand-dark) !important;
    border-color: var(--sp-shop-brand-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(19, 16, 51, 0.24);
}

body.woocommerce-cart .wc-block-components-button:not(.is-link):disabled,
body.woocommerce-checkout .wc-block-components-button:not(.is-link):disabled,
body.woocommerce-cart .woocommerce button.button:disabled,
body.woocommerce-checkout .woocommerce button.button:disabled,
body.woocommerce-checkout #place_order:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.woocommerce-cart .wc-block-components-totals-coupon-link,
body.woocommerce-checkout .wc-block-components-totals-coupon-link,
body.woocommerce-cart .woocommerce .showcoupon {
    color: var(--sp-shop-brand) !important;
    font-weight: 600;
}

body.woocommerce-cart .wc-block-components-notice-banner,
body.woocommerce-checkout .wc-block-components-notice-banner,
body.woocommerce-cart .woocommerce-error,
body.woocommerce-checkout .woocommerce-error,
body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .woocommerce-message {
    border-radius: 10px;
    border-width: 1px;
}

body.woocommerce-cart table.shop_table,
body.woocommerce-checkout table.shop_table,
body.woocommerce-cart .cart_totals,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout .woocommerce-checkout-payment {
    background: var(--sp-shop-surface);
    border: 1px solid var(--sp-shop-border);
    border-radius: var(--sp-shop-radius);
    box-shadow: var(--sp-shop-shadow);
}

body.woocommerce-cart table.shop_table th,
body.woocommerce-checkout table.shop_table th {
    color: var(--sp-shop-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.woocommerce-cart .cart_totals table th,
body.woocommerce-cart .cart_totals table td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    border-top-color: #e7edf6;
}

body.woocommerce-checkout .woocommerce-checkout-payment ul.payment_methods {
    border-bottom-color: #e7edf6;
}

@media (min-width: 1024px) {
    body.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-sidebar,
    body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-sidebar,
    body.woocommerce-cart .cart-collaterals,
    body.woocommerce-checkout #order_review {
        position: sticky;
        top: 110px;
    }
}

@media (max-width: 900px) {
    body.woocommerce-cart .wc-block-cart-items,
    body.woocommerce-cart .wc-block-components-sidebar,
    body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step,
    body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-sidebar,
    body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper,
    body.woocommerce-cart table.shop_table,
    body.woocommerce-checkout table.shop_table,
    body.woocommerce-cart .cart_totals,
    body.woocommerce-checkout #order_review,
    body.woocommerce-checkout .woocommerce-checkout-payment {
        border-radius: 12px;
        box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
    }

    body.woocommerce-cart .wc-block-cart-item__prices,
    body.woocommerce-checkout .wc-block-components-order-summary-item__total-price {
        text-align: left;
    }
}

/* ============================================================
   CART + CHECKOUT ALIGNMENT TUNING
   ============================================================ */

body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-checkout .wp-block-woocommerce-checkout {
    padding-bottom: 44px;
}

body.woocommerce-cart .wc-block-components-sidebar-layout,
body.woocommerce-checkout .wc-block-components-sidebar-layout {
    gap: 26px;
    align-items: flex-start;
}

@media (min-width: 1024px) {
    body.woocommerce-cart .wc-block-components-sidebar-layout,
    body.woocommerce-checkout .wc-block-components-sidebar-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
        gap: 26px;
    }

    body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-main,
    body.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-main,
    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-checkout .wc-block-checkout__main {
        min-width: 0;
    }

    body.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar,
    body.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-sidebar,
    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-checkout .wc-block-checkout__sidebar {
        margin-top: 0 !important;
        width: 100%;
    }
}

body.woocommerce-cart .wc-block-cart-items__header {
    padding: 12px 20px;
}

body.woocommerce-cart .wc-block-cart-items__row {
    padding: 16px 20px;
}

body.woocommerce-cart .wc-block-cart-item__image {
    margin-right: 14px;
}

body.woocommerce-cart .wc-block-cart-item__wrap {
    row-gap: 6px;
}

body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-components-product-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

body.woocommerce-cart .wc-block-cart-item__description,
body.woocommerce-checkout .wc-block-components-order-summary-item__description {
    margin-top: 4px;
    font-size: 12px !important;
    line-height: 1.45 !important;
    white-space: normal;
    word-break: break-word;
}

body.woocommerce-cart .wc-block-components-sidebar > *,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-sidebar > * {
    padding-left: 16px;
    padding-right: 16px;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary {
    padding-top: 8px;
    padding-bottom: 8px;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary-item {
    padding-top: 12px;
    padding-bottom: 12px;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item,
body.woocommerce-cart .wc-block-components-totals-item {
    padding-top: 10px;
    padding-bottom: 10px;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-coupon__content {
    padding: 10px 16px 14px;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-coupon form,
body.woocommerce-cart .wc-block-components-sidebar .wc-block-components-totals-coupon form {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-coupon .wc-block-components-text-input input,
body.woocommerce-cart .wc-block-components-sidebar .wc-block-components-totals-coupon .wc-block-components-text-input input {
    min-height: 42px;
}

body.woocommerce-checkout .wc-block-checkout__actions_row {
    margin-top: 22px;
    padding-top: 14px;
}

@media (max-width: 900px) {
    body.woocommerce-cart .wp-block-woocommerce-cart,
    body.woocommerce-checkout .wp-block-woocommerce-checkout {
        padding-bottom: 30px;
    }

    body.woocommerce-cart .wc-block-cart-items__header,
    body.woocommerce-cart .wc-block-cart-items__row {
        padding-left: 14px;
        padding-right: 14px;
    }

    body.woocommerce-cart .wc-block-components-sidebar > *,
    body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-sidebar > * {
        padding-left: 12px;
        padding-right: 12px;
    }
}
