/* ============================================================
   Custom Order Forms — Frontend Styles v1.3
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

.cof-form-wrapper {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 16px 80px; /* bottom padding for mobile bar */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2d2d2d;
}

.cof-form-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.cof-form-desc  { color: #555; margin-bottom: 24px; }

/* ---- Steps Indicator ---- */
.cof-steps-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.cof-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cof-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #777;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: background .3s, color .3s;
}

.cof-step-dot.active    .cof-step-num { background: #1a1a2e; color: #fff; }
.cof-step-dot.completed .cof-step-num { background: #27ae60; color: #fff; }

.cof-step-label { font-size: .75rem; color: #888; white-space: nowrap; }
.cof-step-dot.active    .cof-step-label { color: #1a1a2e; font-weight: 600; }
.cof-step-dot.completed .cof-step-label { color: #27ae60; }

.cof-step-line { flex: 1; height: 2px; background: #e0e0e0; margin: 0 8px 20px; transition: background .3s; }
.cof-step-line.done { background: #27ae60; }

/* ---- Error Banner ---- */
.cof-error-banner {
    background: #fdf0ef;
    border: 1px solid #e74c3c;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: .9rem;
}

/* ---- #1 Step Transitions ---- */
.cof-step { display: none; }

.cof-step.active {
    display: block;
    animation: cofFadeSlideIn .35s cubic-bezier(.4,0,.2,1) both;
}

.cof-step.exit {
    animation: cofFadeSlideOut .25s cubic-bezier(.4,0,.2,1) both;
}

@keyframes cofFadeSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes cofFadeSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

/* Step 1 layout */
.cof-step-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 700px) {
    .cof-step-layout { grid-template-columns: 1fr; }
    .cof-summary-sidebar { display: none; } /* replaced by mobile bar */
}

/* ---- Field Groups ---- */
.cof-field-group {
    margin-bottom: 12px;
    padding: 16px;
    border-radius: 10px;
    transition: background .18s;
}

.cof-field-group:hover { background: #fafafa; }

/* Conditional hidden sections */
.cof-field-group.cof-hidden {
    display: none !important;
}

.cof-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: .95rem;
}

.cof-required { color: #e74c3c; margin-left: 2px; }
.cof-help-text { font-size: .85rem; color: #777; margin: -4px 0 8px; }

.cof-field-error {
    color: #e74c3c;
    font-size: .82rem;
    margin-top: 4px;
    min-height: 18px;
}

/* ---- #3 Card Check Badge ---- */
.cof-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(.5);
    transition: opacity .18s, transform .2s cubic-bezier(.34,1.56,.64,1);
}

.cof-card-check::after { content: '✓'; }

.cof-radio-card.selected   .cof-card-check,
.cof-checkbox-card.selected .cof-card-check {
    opacity: 1;
    transform: scale(1);
}

/* ---- Radio / Checkbox Cards — 3 per row ---- */
.cof-radio-cards,
.cof-checkbox-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .cof-radio-cards,
    .cof-checkbox-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 380px) {
    .cof-radio-cards,
    .cof-checkbox-cards { grid-template-columns: 1fr; }
}

.cof-radio-card,
.cof-checkbox-card {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0;                /* no padding — image flush to edges */
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s, transform .15s;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    font-size: .9rem;
    min-height: 80px;
    overflow: hidden;
}

.cof-radio-card:hover,
.cof-checkbox-card:hover {
    border-color: #1a1a2e;
    box-shadow: 0 4px 14px rgba(26,26,46,.1);
    transform: translateY(-2px);
}

.cof-radio-card input,
.cof-checkbox-card input { position: absolute; opacity: 0; width: 0; height: 0; }

.cof-radio-card.selected,
.cof-checkbox-card.selected {
    border-color: #1a1a2e;
    background: #f0f4ff;
    box-shadow: 0 4px 14px rgba(26,26,46,.12);
}

/* Image — flush to top and sides, same style as summary thumbnail */
.cof-radio-card img,
.cof-checkbox-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* Text content wrapper — only area with padding */
.cof-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 10px;
    flex: 1;
}

/* Cards without images — center content vertically */
.cof-radio-card:not(:has(img)) .cof-card-body,
.cof-checkbox-card:not(:has(img)) .cof-card-body {
    padding: 18px 14px;
}

.cof-option-label { font-weight: 500; line-height: 1.3; }
.cof-option-price { font-size: .8rem; color: #27ae60; font-weight: 600; }

/* ---- Inputs ---- */
.cof-text-input,
.cof-select,
.cof-textarea,
.cof-qty-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d8d8e0;
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    color: #2d2d2d;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
}

.cof-text-input:focus,
.cof-select:focus,
.cof-textarea:focus,
.cof-qty-input:focus {
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}

.cof-textarea { resize: vertical; }

/* ---- #4 Quantity Stepper ---- */
.cof-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #d8d8e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}

.cof-qty-stepper:focus-within {
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}

.cof-qty-btn {
    background: #f5f5f8;
    border: none;
    width: 42px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    color: #1a1a2e;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.cof-qty-btn:hover { background: #1a1a2e; color: #fff; }
.cof-qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.cof-qty-btn:disabled:hover { background: #f5f5f8; color: #1a1a2e; }

.cof-qty-stepper .cof-qty-input {
    width: 70px;
    border: none;
    border-left: 1.5px solid #e0e0e8;
    border-right: 1.5px solid #e0e0e8;
    border-radius: 0;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 6px;
    box-shadow: none;
    outline: none;
}

/* hide native spinners */
.cof-qty-stepper .cof-qty-input::-webkit-inner-spin-button,
.cof-qty-stepper .cof-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cof-qty-stepper .cof-qty-input[type=number] { -moz-appearance: textfield; }

/* ---- File Upload ---- */
.cof-upload-wrapper { display: flex; flex-direction: column; gap: 10px; }

.cof-upload-zone {
    border: 2px dashed #c8c8d4;
    border-radius: 10px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s, background .18s;
}

.cof-upload-zone:hover,
.cof-upload-zone:focus { border-color: #1a1a2e; background: #f8f8ff; outline: none; }
.cof-upload-zone.drag-over { border-color: #4a6cf7; background: #eef1ff; }

.cof-upload-icon  { font-size: 2.2rem; margin-bottom: 8px; }
.cof-upload-prompt{ font-size: .95rem; color: #444; margin: 0 0 4px; }
.cof-upload-info  { font-size: .8rem; color: #999; margin: 0; }

.cof-upload-progress {
    border-radius: 6px;
    overflow: hidden;
    background: #e8e8ee;
    height: 8px;
    position: relative;
}

.cof-upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1a1a2e, #4a6cf7);
    border-radius: 6px;
    transition: width .15s ease;
}

.cof-upload-progress-label {
    display: block;
    font-size: .78rem;
    color: #555;
    margin-top: 4px;
    text-align: right;
}

.cof-upload-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f0faf4;
    border: 1.5px solid #27ae60;
    border-radius: 10px;
    padding: 14px 16px;
}

.cof-preview-thumb-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: #e8e8ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.cof-preview-img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.cof-preview-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cof-preview-filename { font-size: .9rem; font-weight: 600; color: #1a1a2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cof-preview-filesize { font-size: .78rem; color: #777; }

.cof-upload-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    font-size: .82rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.cof-upload-remove::before { content: '✕  '; font-size: .72rem; }
.cof-upload-remove:hover { background: #fdf0ef; color: #e74c3c; }
.cof-upload-error { color: #e74c3c; font-size: .82rem; min-height: 18px; }

/* ---- Summary Sidebar ---- */
.cof-summary-box {
    background: #f7f7fb;
    border: 1px solid #e4e4ee;
    border-radius: 12px;
    overflow: hidden;
    position: sticky;
    top: 24px;
}

/* Form thumbnail */
.cof-summary-thumbnail {
    width: 100%;
    line-height: 0;
}

.cof-summary-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Inner padding wrapper — applied to everything below the image */
.cof-summary-title,
.cof-summary-lines,
.cof-summary-total-row,
.cof-summary-note {
    padding-left: 20px;
    padding-right: 20px;
}

.cof-summary-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    padding-top: 18px;
    padding-bottom: 14px;
    color: #1a1a2e;
}

.cof-summary-lines { margin-bottom: 12px; }

.cof-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    padding: 6px 20px;
    border-bottom: 1px solid #e8e8ee;
    color: #555;
    gap: 8px;
    animation: cofFadeSlideIn .2s ease both;
    transition: background .15s;
}

.cof-summary-line:hover { background: #efeffa; }

.cof-summary-line-label { flex: 1; min-width: 0; }
.cof-summary-line-value { color: #1a1a2e; font-weight: 500; flex-shrink: 0; max-width: 110px; text-align: right; }

/* Edit icon */
.cof-summary-edit {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #bbb;
    font-size: .8rem;
    border-radius: 4px;
    transition: color .15s, background .15s;
    line-height: 1;
}

.cof-summary-edit:hover { color: #1a1a2e; background: #e4e4ee; }

/* Highlight pulse when scrolled-to */
@keyframes cofFieldHighlight {
    0%   { background: #e8eeff; box-shadow: 0 0 0 3px #4a6cf7; }
    70%  { background: #e8eeff; box-shadow: 0 0 0 3px #4a6cf7; }
    100% { background: transparent; box-shadow: none; }
}

.cof-field-highlight {
    animation: cofFieldHighlight 1.4s ease forwards;
    border-radius: 10px;
}

.cof-summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    border-top: 1px solid #e4e4ee;
    margin-top: 4px;
}

.cof-live-total { font-size: 1.3rem; transition: color .2s; }
.cof-live-total.bump { color: #4a6cf7; }

.cof-summary-note {
    font-size: .78rem;
    color: #999;
    margin: 0;
    padding-bottom: 16px;
    text-align: center;
}

/* ---- #2 Mobile sticky bar ---- */
.cof-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #fff;
    padding: 14px 20px;
    z-index: 100;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}

.cof-mobile-bar-label { font-size: .85rem; opacity: .75; }
.cof-mobile-bar-total { font-size: 1.2rem; font-weight: 700; }

@media (max-width: 700px) {
    .cof-mobile-bar { display: flex; }
}

/* ---- Step Navigation ---- */
.cof-step-nav { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.cof-btn {
    padding: 13px 26px;
    border-radius: 8px;
    border: none;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .18s, transform .12s, background .18s, box-shadow .18s;
    font-family: inherit;
}

.cof-btn:disabled { opacity: .6; cursor: not-allowed; }
.cof-btn:active   { transform: scale(.98); }

.cof-btn-next,
.cof-btn-submit {
    background: #1a1a2e;
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,26,46,.2);
}

.cof-btn-next:hover,
.cof-btn-submit:hover {
    background: #2d2d50;
    box-shadow: 0 6px 18px rgba(26,26,46,.28);
    transform: translateY(-1px);
}

.cof-btn-back {
    background: transparent;
    color: #555;
    border: 1.5px solid #ccc;
}

.cof-btn-back:hover { border-color: #999; color: #333; }

/* ---- Step 2 ---- */
.cof-step-heading   { font-size: 1.2rem; margin-bottom: 20px; }
.cof-section-heading{ font-size: 1rem; font-weight: 600; color: #555; margin: 24px 0 12px; border-top: 1px solid #eee; padding-top: 16px; }

.cof-contact-grid,
.cof-shipping-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 600px) {
    .cof-contact-grid,
    .cof-shipping-grid { grid-template-columns: 1fr; }
}

.cof-col-full { grid-column: 1 / -1; }

.cof-account-opt { margin: 20px 0 0; }
.cof-checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; color: #555; }

/* ---- Step 3 Success ---- */
.cof-success-box { text-align: center; padding: 48px 24px; max-width: 520px; margin: 0 auto; }

.cof-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: cofSuccessPop .5s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes cofSuccessPop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.cof-success-box h2    { font-size: 1.6rem; margin-bottom: 12px; color: #1a1a2e; }
.cof-success-message   { color: #555; margin-bottom: 28px; }
.cof-success-details   { background: #f7f7fb; border-radius: 8px; padding: 16px 20px; text-align: left; margin-bottom: 20px; }
.cof-success-row       { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; font-size: .9rem; }
.cof-success-row:last-child { border-bottom: none; }
.cof-account-note      { color: #27ae60; font-size: .9rem; margin-top: 12px; }

/* ================================================================
   v1.5 ADDITIONS
================================================================ */

/* #1 — Sticky floating summary (appears after scrolling past sidebar) */
.cof-sticky-summary {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #fff;
    padding: 10px 20px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
    transform: translateY(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.cof-sticky-summary.visible { transform: translateY(0); }

.cof-sticky-summary-label { font-size: .85rem; opacity: .7; }
.cof-sticky-summary-total { font-size: 1.1rem; font-weight: 700; }

@media (max-width: 700px) {
    /* Mobile already has bar at bottom — don't show top bar too */
    .cof-sticky-summary { display: none; }
}

/* #3 — Price delta flash next to total */
.cof-price-delta {
    font-size: .8rem;
    font-weight: 700;
    margin-left: 6px;
    opacity: 0;
    transition: opacity .1s;
    vertical-align: middle;
}
.cof-price-delta.positive { color: #27ae60; }
.cof-price-delta.negative { color: #e74c3c; }
.cof-price-delta.show {
    opacity: 1;
    animation: cofDeltaFade 1.6s ease forwards;
}
@keyframes cofDeltaFade {
    0%   { opacity: 1; transform: translateY(0); }
    60%  { opacity: 1; transform: translateY(-4px); }
    100% { opacity: 0; transform: translateY(-8px); }
}

/* #2 — Success screen improvements */
.cof-success-box { animation: cofFadeSlideIn .4s ease both; }

.cof-success-next-steps {
    background: #f7f7fb;
    border-radius: 10px;
    padding: 20px;
    margin-top: 24px;
    text-align: left;
}
.cof-success-next-steps h4 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
    margin: 0 0 14px;
}
.cof-next-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: .88rem;
}
.cof-next-step:last-child { border-bottom: none; }
.cof-next-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.cof-next-step-text { color: #555; line-height: 1.4; }
.cof-next-step-text strong { color: #1a1a2e; display: block; margin-bottom: 2px; }

.cof-success-print {
    background: none;
    border: 1.5px solid #ccc;
    color: #555;
    padding: 9px 18px;
    border-radius: 7px;
    font-size: .88rem;
    cursor: pointer;
    margin-top: 16px;
    transition: border-color .15s, color .15s;
}
.cof-success-print:hover { border-color: #1a1a2e; color: #1a1a2e; }

/* #7 — Currency switcher */
.cof-currency-switcher {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.cof-currency-btn {
    padding: 5px 12px;
    border: 1.5px solid #d8d8e0;
    border-radius: 20px;
    background: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    color: #555;
}
.cof-currency-btn.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

/* #8 — Min/max quantity warning */
.cof-qty-warning {
    font-size: .8rem;
    color: #e67e22;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Admin: collapse/expand buttons */
#cof-collapse-all, #cof-expand-all { margin-left: 4px; }

/* Admin: duplicate section button */
.cof-section-duplicate {
    background: none;
    border: none;
    color: #2271b1;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    padding: 0 3px;
}
.cof-section-duplicate:hover { color: #1a5276; }

/* Admin: min/max qty fields */
.cof-qty-minmax-wrap { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #ddd; }
.cof-qty-minmax-row  { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-bottom: 8px; }

/* Analytics page */
.cof-analytics-wrap .cof-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 900px) {
    .cof-analytics-wrap .cof-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
.cof-kpi-card {
    background: #fff;
    border: 1px solid #e0e0e8;
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.cof-kpi-icon  { font-size: 1.8rem; }
.cof-kpi-value { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; line-height: 1; }
.cof-kpi-label { font-size: .8rem; color: #888; margin-top: 3px; }
.cof-analytics-box {
    background: #fff;
    border: 1px solid #e0e0e8;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.cof-analytics-box h3 { margin: 0 0 16px; font-size: 14px; color: #50575e; text-transform: uppercase; letter-spacing: .04em; }

/* ================================================================
   v1.6 ADDITIONS
================================================================ */

/* Save Draft button */
.cof-btn-save-draft {
    background: transparent;
    color: #777;
    border: 1.5px dashed #ccc;
    font-size: .85rem;
    padding: 10px 18px;
}
.cof-btn-save-draft:hover { border-color: #1a1a2e; color: #1a1a2e; }

/* Form notice (success/info inline) */
.cof-error-banner.cof-notice-success {
    background: #f0faf4;
    border-color: #27ae60;
    color: #1a7928;
}

/* Settings grid */
.cof-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 900px) { .cof-settings-grid { grid-template-columns: 1fr; } }

/* ================================================================
   v1.7 ADDITIONS
================================================================ */

/* Color swatches */
.cof-color-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.cof-color-swatch-label { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.cof-color-swatch-label input { position: absolute; opacity: 0; width: 0; height: 0; }
.cof-color-swatch {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid transparent;
    box-shadow: 0 0 0 1px #ccc;
    transition: box-shadow .15s, transform .15s;
    display: block;
}
.cof-color-swatch-label:hover .cof-color-swatch { transform: scale(1.1); box-shadow: 0 0 0 2px #1a1a2e; }
.cof-color-swatch-label input:checked ~ .cof-color-swatch { box-shadow: 0 0 0 3px #1a1a2e; transform: scale(1.15); }
.cof-swatch-name { font-size: .75rem; color: #555; text-align: center; max-width: 60px; }

/* Star rating */
.cof-star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.cof-star-label { cursor: pointer; }
.cof-star-label input { position: absolute; opacity: 0; width: 0; height: 0; }
.cof-star { font-size: 2rem; color: #ddd; transition: color .1s; display: block; }
.cof-star-label:hover .cof-star,
.cof-star-label:hover ~ .cof-star-label .cof-star { color: #f39c12; }
.cof-star-label input:checked ~ .cof-star-label .cof-star { color: #f39c12; }
.cof-star-label input:checked + .cof-star,
.cof-star-label:has(input:checked) .cof-star { color: #f39c12; }
.cof-star-value-display { font-size: .82rem; color: #777; margin-top: 4px; }

/* Date input */
.cof-date-input { max-width: 220px; }

/* Coupon row */
.cof-coupon-row { padding: 16px; }
.cof-coupon-msg.success { color: #27ae60; }
.cof-coupon-msg.error   { color: #e74c3c; }
.cof-coupon-discount-line {
    font-size: .9rem; color: #27ae60; font-weight: 600;
    padding: 5px 20px; border-bottom: 1px solid #e8e8ee;
}
.cof-btn-apply-coupon {
    background: transparent; color: #1a1a2e; border: 1.5px solid #1a1a2e;
    font-size: .85rem; padding: 10px 16px; white-space: nowrap;
}
.cof-btn-apply-coupon:hover { background: #1a1a2e; color: #fff; }
