@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Jost:wght@300;400;500&display=swap');

.ccc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Jost', sans-serif;
    color: #3D2B1F;
}

.ccc-hero {
    background: #FFFCF8;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid #E8D5C4;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.ccc-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(242, 196, 176, 0.18);
    pointer-events: none;
}

.ccc-hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.12);
    pointer-events: none;
}

.ccc-tagline {
    font-size: 11px;
    letter-spacing: .18em;
    color: #C9A96E;
    text-transform: uppercase;
    margin-bottom: .8rem;
}

.ccc-hero h4 {
    font-family: "Playfair Display" !important;
    font-size: 48px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: capitalize !important;
    margin-bottom: .8rem;
}

.ccc-hero p {
    font-size: 15px;
    color: #7A5C48;
    max-width: 480px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

.ccc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.ccc-badge {
    font-size: 11px;
    padding: 5px 14px;
    border: 1px solid #E8D5C4;
    border-radius: 20px;
    color: #7A5C48;
    background: #FFFCF8;
}

.ccc-order-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 720px) {
    .ccc-order-layout {
        grid-template-columns: 1fr;
    }
}

.ccc-panel {
    background: #FFFCF8;
    border: 1px solid #E8D5C4;
    border-radius: 16px;
    padding: 1.5rem;
}

.ccc-panel-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: #3D2B1F;
}

.ccc-size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ccc-size-card {
    border: 1.5px solid #E8D5C4;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all .25s;
    background: #FFFCF8;
}

.ccc-size-card:hover {
    border-color: #C97B5A;
}

.ccc-size-card.selected {
    border-color: #B85C3A;
    background: #FEF5F0;
}

.ccc-size-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
    color: #3D2B1F;
}

.ccc-size-desc {
    font-size: 10px;
    color: #A88570;
}

.ccc-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

.ccc-qty-input {
    width: 54px;
    height: 28px;
    border: 1px solid #E8D5C4;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-family: 'Jost', sans-serif;
    background: #FDF8F2;
}

.ccc-qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #E8D5C4;
    border-radius: 6px;
    background: #FFFCF8;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7A5C48;
}

.ccc-qty-btn:hover {
    border-color: #C97B5A;
    color: #C97B5A;
}

.ccc-min-qty-note {
    font-size: 15px;
    color: #C9A96E;
    margin-top: 8px;
    text-align: center;
    margin-bottom: 8px;
}

.ccc-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 1rem;
}

.ccc-color-swatch {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}

.ccc-color-swatch:hover {
    border-color: #C97B5A;
}

.ccc-color-swatch.selected {
    border-color: #B85C3A;
}

.ccc-swatch-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 auto 4px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
}

.ccc-swatch-name {
    font-size: 10px;
    color: #7A5C48;
}

.ccc-design-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ccc-tab-btn {
    padding: 6px 14px;
    border: 1.5px solid #E8D5C4;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    background: #FFFCF8;
    color: #7A5C48;
    transition: all .2s;
    font-family: 'Jost', sans-serif;
}

.ccc-tab-btn.active {
    background: #B85C3A;
    color: #fff;
    border-color: #B85C3A;
}

.ccc-template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1rem;
}

.ccc-template-card {
    border: 1.5px solid #E8D5C4;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all .2s;
    background: #FFFCF8;
}

.ccc-template-card:hover {
    border-color: #C97B5A;
}

.ccc-template-card.selected {
    border-color: #B85C3A;
    box-shadow: 0 0 0 2px rgba(184, 92, 58, 0.15);
}

.ccc-template-thumb {
    width: 100%;
    aspect-ratio: 9/16;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    background-size: cover;
    background-position: center;
}

.ccc-template-name {
    font-size: 10px;
    color: #7A5C48;
    padding: 4px 6px;
    text-align: center;
}

.ccc-personalize-box {
    background: #FDF8F2;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.ccc-personalize-title {
    font-size: 12px;
    font-weight: 500;
    color: #7A5C48;
    margin-bottom: .8rem;
}

.ccc-field-row {
    margin-bottom: .7rem;
}

.ccc-field-label {
    font-size: 11px;
    color: #A88570;
    margin-bottom: 3px;
    display: block;
}

.ccc-field-input {
    width: 100%;
    height: 32px;
    border: 1px solid #E8D5C4;
    border-radius: 7px;
    padding: 0 10px;
    font-size: 13px;
    font-family: 'Jost', sans-serif;
    background: #FFFCF8;
}

.ccc-field-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #E8D5C4;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: 'Jost', sans-serif;
    resize: vertical;
}

.ccc-field-input:focus,
.ccc-field-textarea:focus {
    outline: none;
    border-color: #C97B5A;
}

.ccc-font-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.ccc-font-chip {
    padding: 4px 10px;
    border: 1px solid #E8D5C4;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    background: #FFFCF8;
    color: #7A5C48;
}

.ccc-font-chip.active {
    border-color: #B85C3A;
    color: #B85C3A;
    background: #FEF5F0;
}

.ccc-upload-zone {
    border: 2px dashed #E8D5C4;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
}

.ccc-upload-zone:hover {
    border-color: #C97B5A;
}

.ccc-upload-icon {
    font-size: 32px;
    margin-bottom: .5rem;
}

.ccc-upload-text {
    font-size: 13px;
    color: #7A5C48;
}

.ccc-upload-sub {
    font-size: 11px;
    color: #A88570;
    margin-top: 4px;
}

.ccc-notice-box {
    background: #FFF8EE;
    border: 1px solid #E8CC90;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 12px;
    color: #7A5C20;
    line-height: 1.6;
}

.ccc-notice-box strong {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
}

.ccc-preview-panel {
    background: #FFFCF8;
    border: 1px solid #E8D5C4;
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

.ccc-preview-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #3D2B1F;
}

.ccc-can-preview-wrap {
    display: flex;
    justify-content: center;
    min-height: 220px;
}

.ccc-order-summary {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #E8D5C4;
    display: flex;
    flex-direction: column;
    min-height: 145px;
}

.ccc-summary-details {
    flex: 1 1 auto;
}

.ccc-summary-totals {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #E8D5C4;
}

.ccc-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: #7A5C48;
    margin-bottom: 5px;
}

.ccc-summary-row span {
    text-align: right;
}

.ccc-summary-row.total {
    font-size: 14px;
    font-weight: 500;
    color: #3D2B1F;
    margin-bottom: 5px;
}

.ccc-btn-primary {
    text-transform: capitalize;
    width: 100%;
    padding: 13px;
    background: #B85C3A;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
    margin-top: 1rem;
    font-family: 'Jost', sans-serif;
}

.ccc-btn-primary:hover {
    background: #A34E30;
}

.ccc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ccc-btn-secondary {
    width: 100%;
    padding: 11px;
    background: transparent;
    color: #C97B5A;
    border: 1.5px solid #C97B5A;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    font-family: 'Jost', sans-serif;
}

.ccc-step-panel {
    display: none;
}

.ccc-step-panel.active {
    display: block;
}

.ccc-hidden {
    display: none !important;
}

.ccc-cart-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #B85C3A;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    animation: cccSlideIn 0.3s ease;
    font-size: 14px;
}

@keyframes cccSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ccc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: cccSpin 0.6s linear infinite;
    margin-right: 8px;
}

@keyframes cccSpin {
    to {
        transform: rotate(360deg);
    }
}

.ccc-progress-bar {
    width: 100%;
    height: 4px;
    background: #E8D5C4;
    border-radius: 2px;
    overflow: hidden;
}

.ccc-progress-fill {
    width: 0%;
    height: 100%;
    background: #B85C3A;
    transition: width 0.3s;
}
.ccc-template-desc {
    font-size: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
}

.ccc-checkout-wrap {
    /*max-width: 900px;*/
    margin: 40px auto;
    padding: 24px;
    background: #FFFCF8;
    border: 1px solid #E8D5C4;
    border-radius: 16px;
    font-family: 'Jost', sans-serif;
    color: #3D2B1F;
}

.ccc-checkout-wrap h2,
.ccc-checkout-wrap h3 {
    font-family: 'Playfair Display', serif;
    margin-top: 0;
}

.ccc-checkout-summary {
    background: #FDF8F2;
    border: 1px solid #E8D5C4;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
}

.ccc-checkout-summary table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.ccc-checkout-summary th,
.ccc-checkout-summary td {
    padding: 10px;
    border-bottom: 1px solid #E8D5C4;
    text-align: left;
}

.ccc-checkout-summary tfoot th {
    font-weight: 600;
}

.ccc-checkout-design p {
    margin: 6px 0;
}

.ccc-checkout-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #7A5C48;
}

.ccc-checkout-form label span {
    color: #B85C3A;
}

.ccc-checkout-form input,
.ccc-checkout-form textarea {
    width: 100%;
    border: 1px solid #E8D5C4;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    font-family: 'Jost', sans-serif;
}

.ccc-checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ccc-checkout-grid p,
.ccc-checkout-form p {
    margin: 0 0 14px;
}

.ccc-link-btn {
    display: inline-block;
    width: auto;
    text-decoration: none;
    padding-left: 22px;
    padding-right: 22px;
}

.ccc-thank-you p {
    font-size: 15px;
}

@media (max-width: 720px) {
    .ccc-checkout-grid {
        grid-template-columns: 1fr;
    }
}


.ccc-uploaded-artwork-live-preview {
    width: 140px;
    height: 220px;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 6px;
    box-sizing: border-box;
}


.ccc-full-live-preview {
    width: 140px;
    height: 220px;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 6px;
    box-sizing: border-box;
}

/* Full replacement preview for premade SVG templates and uploaded artwork */
#canPreview.ccc-svg-preview-hidden {
    display: none !important;
}

.ccc-full-live-preview {
    display: none;
    width: 140px;
    height: 220px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    border: 0;
    padding: 0;
    box-sizing: border-box;
}

.ccc-full-live-preview.is-active {
    display: block !important;
}


/* Full selected SVG or uploaded artwork preview */
.ccc-can-preview-wrap {
    align-items: center;
}

.ccc-full-live-preview.is-active {
    display: block !important;
}


.ccc-payment-box {
    background: #FDF8F2;
    border: 1px solid #E8D5C4;
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
}

.ccc-payment-box h3 {
    margin-bottom: 12px;
}

.ccc-payment-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #E8D5C4;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    margin-bottom: 10px;
}

.ccc-payment-option input {
    width: auto;
    margin-top: 4px;
}

.ccc-payment-option strong,
.ccc-payment-option small {
    display: block;
}

.ccc-payment-option small {
    color: #7A5C48;
    margin-top: 4px;
}

.ccc-payment-warning {
    background: #FFF3CD;
    border: 1px solid #F0D98C;
    color: #664D03;
    padding: 12px;
    border-radius: 10px;
}

.ccc-checkout-product-name {
    margin: 8px 0 14px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #E8D5C4;
    border-radius: 10px;
}


.ccc-size-image-wrap {
    width: 100%;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.ccc-size-image {
    max-width: 88px;
    max-height: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.ccc-checkout-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ccc-checkout-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #d0d0d0;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.ccc-checkout-qty-btn:hover {
    background: #f7f7f7;
}
.ccc-checkout-qty-input {
    width: 74px;
    text-align: center;
    padding: 6px;
}
.ccc-checkout-summary-updating {
    opacity: 0.55;
    pointer-events: none;
}
.ccc-checkout-warning {
    margin: 10px 0;
    padding: 10px 12px;
    border-left: 4px solid #d63638;
    background: #fff5f5;
    color: #8a1f11;
}

.ccc-step-warning {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-left: 4px solid #d63638;
    border-radius: 8px;
    background: #fff5f5;
    color: #8a1f11;
    font-size: 13px;
    line-height: 1.4;
}

.ccc-color-qty-wrap {
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ccc-color-qty-wrap label {
    font-size: 10px;
    color: #7A5C48;
}

.ccc-color-qty-input {
    width: 54px;
    border: 1px solid #E8D5C4;
    border-radius: 6px;
    padding: 5px 4px;
    text-align: center;
    font-size: 12px;
    background: #fff;
    color: #3D2B1F;
}

.ccc-color-swatch.selected .ccc-color-qty-input {
    border-color: #B85C3A;
}

#cccCheckoutSubmitBtn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Customer dashboard and invoice links */
.ccc-dashboard {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
}
.ccc-dashboard-table {
    width: 100%;
    border-collapse: collapse;
}
.ccc-dashboard-table th,
.ccc-dashboard-table td {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 12px 10px;
    text-align: left;
}
.ccc-dashboard-table th {
    font-weight: 700;
    background: rgba(0,0,0,0.03);
}
.ccc-link-btn {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 7px 11px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.14);
    text-decoration: none;
    line-height: 1.2;
}

/* Updated size/color step flow */
.ccc-size-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ccc-size-step-qty-grid {
    background: #FDF8F2;
    border: 1px solid #E8D5C4;
    border-radius: 14px;
    padding: 14px;
    margin: 0 0 16px;
}

.ccc-size-step-title {
    font-size: 12px;
    font-weight: 600;
    color: #7A5C48;
    margin-bottom: 10px;
    letter-spacing: .02em;
}

.ccc-size-step-empty {
    padding: 12px;
    border-radius: 10px;
    background: #fff5f5;
    color: #8a1f11;
    font-size: 13px;
}

.ccc-size-step-qty-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(232, 213, 196, .8);
}

.ccc-size-step-qty-row:last-child {
    border-bottom: 0;
}

.ccc-size-step-label {
    font-size: 14px;
    color: #3D2B1F;
    font-weight: 500;
}

.ccc-size-step-qty-control {
    display: inline-grid;
    grid-template-columns: 34px 58px 34px;
    align-items: center;
    border: 1px solid #9BCB88;
    border-radius: 0;
    background: #fff;
    overflow: hidden;
}

.ccc-size-step-qty-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: #fff;
    color: #111;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.ccc-size-step-qty-input {
    width: 58px;
    height: 34px;
    border: 0;
    text-align: center;
    background: #fff;
    color: #111;
    font-size: 15px;
    font-family: 'Jost', sans-serif;
    padding: 0;
}

.ccc-size-step-qty-input:focus,
.ccc-size-step-qty-btn:focus {
    outline: 2px solid rgba(184, 92, 58, .25);
    outline-offset: -2px;
}

.ccc-color-swatch.is-current:not(.selected) {
    border-color: #E8D5C4;
}

.ccc-summary-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #A88570;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 8px 0 5px;
}

/* Color quantity inputs are intentionally removed in this flow. */
.ccc-color-qty-wrap,
.ccc-color-qty-input {
    display: none !important;
}

/* Responsive polish */
@media (max-width: 1024px) {
    .ccc-order-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 1.25rem;
    }

    .ccc-panel,
    .ccc-preview-panel {
        padding: 1.2rem;
    }
}

@media (max-width: 820px) {
    .ccc-order-layout {
        grid-template-columns: 1fr;
    }

    .ccc-preview-panel {
        position: static;
        order: -1;
    }

    .ccc-size-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ccc-color-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ccc-template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ccc-container {
        padding: 1rem .75rem;
    }

    .ccc-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .ccc-panel,
    .ccc-preview-panel,
    .ccc-checkout-wrap {
        padding: 1rem;
        border-radius: 12px;
    }

    .ccc-size-grid,
    .ccc-color-grid,
    .ccc-template-grid {
        grid-template-columns: 1fr;
    }

    .ccc-size-card {
        min-height: auto;
        padding: 14px 10px;
    }

    .ccc-size-step-qty-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ccc-size-step-qty-control {
        width: 100%;
        grid-template-columns: 44px 1fr 44px;
    }

    .ccc-size-step-qty-btn,
    .ccc-size-step-qty-input {
        height: 40px;
    }

    .ccc-summary-row {
        align-items: flex-start;
    }

    .ccc-summary-row span {
        max-width: 58%;
        word-break: break-word;
    }

    .ccc-checkout-summary {
        overflow-x: auto;
    }

    .ccc-checkout-summary table {
        min-width: 560px;
    }
}

/* Live preview/sidebar quantity controls for selected sizes */
.ccc-summary-size-qty-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 6px 0 10px;
}

.ccc-summary-size-qty-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #3D2B1F;
}

.ccc-summary-size-label {
    font-weight: 500;
    line-height: 1.25;
}

.ccc-summary-qty-control {
    grid-template-columns: 28px 42px 28px;
}

.ccc-summary-qty-control .ccc-size-step-qty-btn,
.ccc-summary-qty-control .ccc-size-step-qty-input {
    height: 28px;
}

.ccc-summary-qty-control .ccc-size-step-qty-btn {
    width: 28px;
    font-size: 15px;
}

.ccc-summary-qty-control .ccc-size-step-qty-input {
    width: 42px;
    font-size: 13px;
}

@media (max-width: 640px) {
    .ccc-summary-size-qty-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ccc-summary-qty-control {
        width: 100%;
        grid-template-columns: 40px 1fr 40px;
    }

    .ccc-summary-qty-control .ccc-size-step-qty-btn,
    .ccc-summary-qty-control .ccc-size-step-qty-input {
        height: 38px;
    }

    .ccc-summary-qty-control .ccc-size-step-qty-btn,
    .ccc-summary-qty-control .ccc-size-step-qty-input {
        width: auto;
    }
}

/* Dynamic size quantity update */
#cccSizeQtyGrid:empty { display: none; }
.ccc-step-warning {
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid #e0a3a3;
    background: #fff3f3;
    color: #8a1f1f;
    border-radius: 10px;
    font-size: 14px;
}
.ccc-size-card.selected {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.ccc-summary-size-qty-row {
    gap: 10px;
}
@media (max-width: 560px) {
    .ccc-summary-size-qty-row {
        align-items: stretch;
    }
    .ccc-summary-size-label {
        width: 100%;
    }
    .ccc-summary-qty-control {
        width: 100%;
        justify-content: space-between;
    }
}

/* Multi-color selection: clear checkbox state, no color quantity fields */
.ccc-color-swatch {
    position: relative;
    user-select: none;
}

.ccc-color-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.ccc-color-selected-mark {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    background: #B85C3A;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.ccc-color-swatch.selected .ccc-color-selected-mark {
    display: flex;
}

.ccc-color-swatch.selected {
    border-color: #B85C3A !important;
    background: rgba(184, 92, 58, .06);
}

.ccc-color-swatch:focus {
    outline: 2px solid rgba(184, 92, 58, .28);
    outline-offset: 2px;
}

/* Size + color quantity allocation */
.ccc-color-breakdown-panel {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(184, 92, 58, .18);
    border-radius: 16px;
    background: rgba(255, 250, 247, .85);
}

.ccc-color-breakdown-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.ccc-color-breakdown-head strong {
    color: #3D2B1F;
    font-size: 15px;
}

.ccc-color-breakdown-head span,
.ccc-color-breakdown-empty {
    color: #8B6B5A;
    font-size: 13px;
    line-height: 1.45;
}

.ccc-color-breakdown-size {
    padding: 12px;
    border: 1px solid rgba(61, 43, 31, .08);
    border-radius: 14px;
    background: #fff;
    margin-bottom: 12px;
}

.ccc-color-breakdown-size-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #3D2B1F;
}

.ccc-color-breakdown-size-title span {
    color: #B85C3A;
    font-size: 13px;
    font-weight: 600;
}

.ccc-color-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ccc-color-breakdown-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(61, 43, 31, .08);
    border-radius: 12px;
    background: #fff;
}

.ccc-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .1);
}

.ccc-color-breakdown-name {
    font-size: 13px;
    color: #3D2B1F;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ccc-size-color-qty-input {
    width: 78px;
    height: 34px;
    border: 1px solid rgba(61, 43, 31, .16);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    background: #fff;
}

.ccc-color-breakdown-assigned {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
}

.ccc-color-breakdown-assigned.is-ok {
    color: #217a43;
}

.ccc-color-breakdown-assigned.is-warning,
.ccc-color-breakdown-warning {
    color: #8a1f1f;
}

.ccc-color-breakdown-warning {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #e0a3a3;
    background: #fff3f3;
    border-radius: 10px;
    font-size: 13px;
}

.ccc-summary-color-breakdown-text {
    font-size: 12px;
    line-height: 1.5;
    color: #3D2B1F;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(184, 92, 58, .06);
    word-break: break-word;
}

.ccc-admin-color-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.ccc-admin-color-breakdown-table th,
.ccc-admin-color-breakdown-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
}

.ccc-admin-color-breakdown-table th {
    background: #f8f9fa;
    font-weight: 600;
}

@media (max-width: 640px) {
    .ccc-color-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .ccc-color-breakdown-size-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .ccc-color-breakdown-item {
        grid-template-columns: 18px minmax(0, 1fr) 70px;
    }

    .ccc-size-color-qty-input {
        width: 70px;
    }
}

/* Clean live preview summary: sizes total + color quantity lines */
.ccc-summary-size-total-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ccc-summary-size-total-row {
    padding: 10px;
    border: 1px solid rgba(61, 43, 31, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .68);
}

.ccc-summary-size-total-row .ccc-summary-row {
    padding: 0;
    border-bottom: 0;
}

.ccc-summary-color-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(184, 92, 58, .06);
    color: #3D2B1F;
    font-size: 12px;
    line-height: 1.35;
}

.ccc-summary-color-line strong {
    white-space: nowrap;
    color: #B85C3A;
}

@media (max-width: 640px) {
    .ccc-summary-color-line,
    .ccc-summary-size-total-row .ccc-summary-row {
        align-items: flex-start;
    }
}

/* Customer dashboard order status cards */
.ccc-dashboard-order-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 18px 0 24px;
}

.ccc-dashboard-order-card {
    border: 1px solid rgba(61, 43, 31, .12);
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.ccc-dashboard-order-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.ccc-dashboard-order-card-head strong {
    display: block;
    color: #2f2118;
    font-size: 16px;
}

.ccc-dashboard-order-card-head span {
    display: block;
    color: #777;
    font-size: 13px;
    margin-top: 2px;
}

.ccc-dashboard-status-badge {
    border-radius: 999px;
    padding: 6px 10px;
    background: #f5efe9;
    color: #6f412d;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.ccc-dashboard-order-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.ccc-dashboard-order-grid div {
    border-radius: 12px;
    background: #faf7f4;
    padding: 10px;
}

.ccc-dashboard-order-grid span {
    display: block;
    color: #777;
    font-size: 12px;
    margin-bottom: 4px;
}

.ccc-dashboard-order-grid strong {
    color: #2f2118;
    font-size: 13px;
}

.ccc-dashboard-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 700px) {
    .ccc-dashboard-table {
        display: none;
    }

    .ccc-dashboard-order-card-head,
    .ccc-dashboard-order-grid {
        grid-template-columns: 1fr;
    }

    .ccc-dashboard-order-grid {
        display: grid;
    }
}

/* Update: color quantity controls like + 0 - and scratch upload helper */
.ccc-color-breakdown-item {
    grid-template-columns: 18px minmax(0, 1fr) 116px;
}

.ccc-color-breakdown-qty-control {
    display: inline-grid;
    grid-template-columns: 32px 48px 32px;
    align-items: center;
    border: 1px solid rgba(61, 43, 31, .18);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.ccc-size-color-qty-btn {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    font-weight: 600;
}

.ccc-size-color-qty-btn:hover {
    background: rgba(184, 92, 58, .08);
}

.ccc-color-breakdown-qty-control .ccc-size-color-qty-input {
    width: 48px;
    height: 32px;
    border: 0;
    border-left: 1px solid rgba(61, 43, 31, .12);
    border-right: 1px solid rgba(61, 43, 31, .12);
    border-radius: 0;
    text-align: center;
    font-size: 14px;
    -moz-appearance: textfield;
}

.ccc-color-breakdown-qty-control .ccc-size-color-qty-input::-webkit-outer-spin-button,
.ccc-color-breakdown-qty-control .ccc-size-color-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ccc-scratch-upload-box {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(61, 43, 31, .10);
}

.ccc-scratch-upload-btn {
    margin-right: 10px;
}

.ccc-scratch-upload-help,
.ccc-scratch-uploaded-file {
    display: block;
    margin-top: 8px;
    color: #8B6B5A;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .ccc-color-breakdown-item {
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .ccc-color-breakdown-qty-control {
        grid-column: 1 / -1;
        width: 100%;
        grid-template-columns: 44px 1fr 44px;
    }

    .ccc-color-breakdown-qty-control .ccc-size-color-qty-input {
        width: 100%;
    }
}

/* Correction: selected colors append under selected size rows in the live preview/sidebar */
.ccc-summary-helper-text {
    margin-top: 8px;
    color: #8B6B5A;
    font-size: 12px;
    line-height: 1.4;
}

.ccc-summary-color-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.ccc-summary-color-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.ccc-summary-color-editor-row > span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ccc-summary-color-editor-row .ccc-color-dot {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
}

.ccc-summary-color-editor-row .ccc-color-breakdown-qty-control {
    grid-template-columns: 40px 60px 40px;
}

.ccc-summary-color-editor-row .ccc-size-color-qty-btn {
    width: 40px;
    height: 28px;
    font-size: 16px;
    display: flex;
    align-items: center;
    color: #000;
    justify-content: flex-end;
    margin-left: -2px;
}

.ccc-summary-color-editor-row .ccc-color-breakdown-qty-control .ccc-size-color-qty-input {
    width: 60px;
    height: 28px;
}

@media (max-width: 640px) {
    .ccc-summary-color-editor-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ccc-summary-color-editor-row .ccc-color-breakdown-qty-control {
        width: 100%;
        grid-template-columns: 42px 1fr 42px;
    }

    .ccc-summary-color-editor-row .ccc-color-breakdown-qty-control .ccc-size-color-qty-input {
        width: 100%;
    }
}

/* Step 2 selected color card layout */
#step2 .ccc-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 24px;
    align-items: start;
}

#step2 .ccc-color-swatch {
    position: relative;
    min-height: 120px;
    padding: 18px 16px;
    border: 1px solid #ead9cf;
    border-radius: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
}

#step2 .ccc-color-swatch.selected {
    align-items: stretch;
    border: 2px solid #d57a4f;
    box-shadow: 0 0 0 3px rgba(213, 122, 79, 0.14);
}

#step2 .ccc-color-swatch .ccc-color-selected-mark {
    position: absolute;
    right: 10px;
    top: 10px;
}

#step2 .ccc-color-swatch .ccc-swatch-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    margin: 0 auto;
}

#step2 .ccc-color-swatch .ccc-swatch-name {
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
    color: #8f6b57;
}

#step2 .ccc-inline-size-qty-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

#step2 .ccc-inline-size-qty-row {
    display: block;
    /*align-items: center;*/
    /*justify-content: space-between;*/
    /*gap: 10px;*/
    padding: 10px 12px;
    border: 1px solid #e6dfda;
    border-radius: 14px;
    background: #f7f3f0;
}

#step2 .ccc-inline-size-label {
    font-size: 14px;
    color: #6b4c3f;
    flex: 1 1 auto;
    margin-bottom:10px;
}

#step2 .ccc-inline-size-controls, #step2 .ccc-inline-size-qty-row .ccc-color-breakdown-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #d7d4cf;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    justify-content: center;
}

#step2 .ccc-inline-size-controls .ccc-size-color-qty-btn, #step2 .ccc-inline-size-qty-row .ccc-size-color-qty-btn {
    width: 32px;
    height: 32px;
    border: 0;
    background: #fff;
    color: #1d2b48;
    font-size: 22px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#step2 .ccc-inline-size-controls .ccc-size-color-qty-input,
#step2 .ccc-inline-size-qty-row .ccc-size-color-qty-input {
    width: 46px;
    height: 32px;
    border: 0;
    border-left: 1px solid #e1ddd8;
    border-right: 1px solid #e1ddd8;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1d2b48;
    padding: 0 4px;
    background: #fff;
}

#cccColorBreakdownPanel {
    display: none !important;
}

@media (max-width: 767px) {
    #step2 .ccc-color-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #step2 .ccc-inline-size-qty-row {
        padding: 10px;
    }

    #step2 .ccc-inline-size-label {
        font-size: 13px;
    }

    #step2 .ccc-inline-size-controls .ccc-size-color-qty-input,
    #step2 .ccc-inline-size-qty-row .ccc-size-color-qty-input {
        width: 42px;
    }
}
