/* ============================================================
   CUSTOMIZE PAGE — REDESIGNED — fully fluid & responsive
   Uses tokens from home.css: --primary-color, --secondary-color,
   --primary-font, --secondary-font
   Palette: #334633 (deep green), #C9A15D (brass),
            #F7F3F0 / #F6F3EC (warm neutrals)
   Strategy: fluid clamp()-based sizing everywhere instead of
   hard breakpoint values only, so it scales smoothly from
   320px phones up to 1920px+ desktops, with breakpoints as
   structural (layout-shift) checkpoints only.
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- container ---------- */
.category-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
    box-sizing: border-box;
}

.cz-left,
.cz-right {
    width: 100%;
    min-width: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ---------- hero ---------- */
.cz-hero {
    background: linear-gradient(180deg, #F6F3EC 0%, #F9F7F2 100%);
    padding: clamp(32px, 6vw, 64px) 0 clamp(28px, 5vw, 48px);
    margin-bottom: clamp(24px, 4vw, 48px);
    text-align: center;
}

.cz-eyebrow {
    font-family: var(--secondary-font);
    font-size: clamp(10.5px, 1.2vw, 12px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #C9A15D;
    margin-bottom: 10px !important;
}

.cz-hero h1 {
    font-family: 'Lora', serif;
    font-size: clamp(24px, 4.2vw, 42px);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px !important;
    line-height: 1.2;
}

.cz-sub {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(13px, 1.4vw, 15.5px);
    color: #808080;
    max-width: 580px;
    margin: 0 auto !important;
    padding: 0 8px;
    line-height: 1.6;
}

/* ---------- layout ---------- */
.cz-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(20px, 3vw, 40px);
    margin-bottom: clamp(28px, 4vw, 48px);
    width: 100%;
    align-items: start;
}

.cz-left,
.cz-right {
    min-width: 0;
    width: 100%;
}

.cz-block-label {
    font-family: 'Lora', serif;
    font-size: clamp(14px, 1.4vw, 16px);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 14px !important;
    position: relative;
    padding-left: 16px;
    display: flex;
    align-items: center;
}

.cz-block-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C9A15D;
}

/* ---------- left: preview ---------- */
.cz-preview-card {
    background-color: #F7F3F0;
    border-radius: clamp(12px, 1.5vw, 16px);
    padding: clamp(14px, 2.2vw, 24px);
    margin-bottom: clamp(16px, 2vw, 24px);
}

.cz-preview-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: clamp(10px, 1.2vw, 14px);
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #ece6da;
}

.cz-base-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
}

.cz-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10%;
    pointer-events: none;
}

.cz-overlay-text {
    font-family: 'Lora', serif;
    font-size: clamp(14px, 2.4vw, 22px);
    color: #334633;
    background: rgba(255, 255, 255, 0.4);
    padding: 6px 14px;
    border-radius: 6px;
    max-width: 85%;
    word-break: break-word;
    text-align: center;
}

.cz-stage-badges {
    position: absolute;
    top: clamp(10px, 1.5vw, 14px);
    right: clamp(10px, 1.5vw, 14px);
    left: clamp(10px, 1.5vw, 14px);
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.cz-stage-badges span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(51, 70, 51, 0.9);
    color: #fff;
    font-family: var(--secondary-font);
    font-size: clamp(9.5px, 1vw, 11px);
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 5px 11px;
    border-radius: 20px;
    white-space: nowrap;
}

.cz-view-thumbs {
    display: flex;
    gap: clamp(8px, 1.2vw, 12px);
    margin-top: clamp(12px, 1.8vw, 16px);
    flex-wrap: wrap;
}

.cz-thumb {
    width: clamp(48px, 6vw, 68px);
    height: clamp(48px, 6vw, 68px);
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #e4e0d6;
    background: #fff;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.cz-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cz-thumb.active,
.cz-thumb:hover {
    border-color: #334633;
    transform: translateY(-2px);
}

/* ---------- product picker ---------- */
.cz-product-picker {
    background-color: #fff;
    border: 1px solid #f0ece4;
    border-radius: clamp(12px, 1.5vw, 16px);
    padding: clamp(14px, 2.2vw, 24px);
}

.cz-product-scroll {
    display: flex;
    gap: clamp(8px, 1.2vw, 12px);
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.cz-product-scroll::-webkit-scrollbar {
    height: 6px;
}

.cz-product-scroll::-webkit-scrollbar-thumb {
    background: #e4e0d6;
    border-radius: 10px;
}

.cz-product-pill {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: clamp(66px, 8vw, 90px);
    background: transparent;
    border: 1.5px solid #e4e0d6;
    border-radius: 12px;
    padding: clamp(8px, 1vw, 10px);
    cursor: pointer;
    transition: 0.2s ease;
    scroll-snap-align: start;
}

.cz-product-pill img {
    width: clamp(36px, 4.5vw, 52px);
    height: clamp(36px, 4.5vw, 52px);
    object-fit: cover;
    border-radius: 8px;
}

.cz-product-pill span {
    font-family: var(--secondary-font);
    font-size: clamp(10px, 1vw, 11px);
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.2;
}

.cz-product-pill.active,
.cz-product-pill:hover {
    border-color: #334633;
    background-color: #F7F3F0;
}

/* ---------- right: form panels ---------- */
.cz-panel {
    background-color: #fff;
    border: 1px solid #f0ece4;
    border-radius: clamp(12px, 1.5vw, 16px);
    padding: clamp(16px, 2.4vw, 26px);
    margin-bottom: clamp(14px, 2vw, 20px);
}

.cz-input {
    width: 100%;
    border: 1.5px solid #e4e0d6;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: var(--secondary-font);
    font-size: clamp(13px, 1.3vw, 14px);
    color: var(--primary-color);
    outline: none;
    transition: border-color 0.2s ease;
}

.cz-input:focus {
    border-color: #334633;
}

.cz-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 1.8vw, 16px);
    margin-top: clamp(14px, 1.8vw, 16px);
}

.cz-field {
    min-width: 0;
}

.cz-field label {
    display: block;
    font-family: var(--secondary-font);
    font-size: clamp(11.5px, 1.1vw, 12.5px);
    font-weight: 600;
    color: #808080;
    margin-bottom: 8px !important;
}

.cz-select {
    width: 100%;
    border: 1.5px solid #e4e0d6;
    border-radius: 8px;
    padding: 11px 12px;
    font-family: var(--secondary-font);
    font-size: clamp(12.5px, 1.2vw, 13.5px);
    color: var(--primary-color);
    background-color: #fff;
    outline: none;
    max-width: 100%;
}

.cz-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 6px;
    flex-wrap: wrap;
}

.cz-color-dot {
    width: clamp(20px, 2.4vw, 24px);
    height: clamp(20px, 2.4vw, 24px);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px #e4e0d6;
    transition: 0.2s ease;
    flex-shrink: 0;
}

.cz-color-dot.active,
.cz-color-dot:hover {
    box-shadow: 0 0 0 2px #334633;
}

.cz-range {
    width: 100%;
    accent-color: #334633;
    margin-top: 12px;
}

/* upload box */
.cz-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    border: 1.5px dashed #d6cfbf;
    border-radius: 10px;
    padding: clamp(22px, 3.5vw, 34px) clamp(14px, 2.5vw, 20px);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cz-upload-box:hover {
    border-color: #334633;
    background-color: #F7F3F0;
}

.cz-upload-box i {
    font-size: clamp(18px, 2.2vw, 22px);
    color: #334633;
    margin-bottom: 6px;
}

.cz-upload-box p {
    font-family: var(--secondary-font);
    font-size: clamp(12.5px, 1.3vw, 14px);
    color: var(--primary-color);
    margin-bottom: 2px !important;
}

.cz-upload-box p span {
    font-weight: 700;
    color: #334633;
    text-decoration: underline;
}

.cz-upload-hint {
    font-family: var(--secondary-font);
    font-size: clamp(10.5px, 1vw, 11.5px);
    color: #a8a196;
}

.cz-upload-preview {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    background: #F7F3F0;
    border-radius: 8px;
    padding: 10px 14px;
}

.cz-upload-preview.has-file {
    display: flex;
}

.cz-upload-preview img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.cz-upload-preview span {
    font-family: var(--secondary-font);
    font-size: 12.5px;
    color: var(--primary-color);
    word-break: break-word;
}

/* summary panel */
.cz-summary {
    background-color: #F7F3F0;
    border: none;
    position: sticky;
    top: 16px;
}

.cz-summary-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--secondary-font);
    font-size: clamp(13px, 1.3vw, 14px);
    color: #6b6b6b;
    margin-bottom: 10px;
    gap: 8px;
}

.cz-summary-total {
    font-family: 'Lora', serif;
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 700;
    color: var(--primary-color);
    border-top: 1px solid #e6e0d5;
    padding-top: 12px;
    margin-bottom: 20px;
}

.cz-actions {
    display: flex;
    gap: 12px;
}

.cz-btn-fill {
    flex: 1;
    background-color: #334633;
    color: #fff;
    border: none;
    font-family: var(--primary-font);
    font-size: clamp(12.5px, 1.2vw, 14px);
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: clamp(13px, 1.6vw, 15px) 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.cz-btn-fill:hover {
    background-color: #24321f;
    transform: translateY(-2px);
}

.cz-btn-outline {
    width: clamp(44px, 5vw, 52px);
    flex-shrink: 0;
    background-color: transparent;
    border: 1.5px solid #334633;
    color: #334633;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(14px, 1.4vw, 16px);
    transition: 0.25s ease;
}

.cz-btn-outline:hover {
    background-color: #334633;
    color: #fff;
}

.cz-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--secondary-font);
    font-size: clamp(11px, 1.1vw, 12px);
    color: #808080;
    margin: 14px 0 0 !important;
}

.cz-note i {
    color: #C9A15D;
}

/* steps recap card reuse from home.css .hw-card / .hw-steps */
.cz-steps-card {
    margin-bottom: clamp(28px, 4vw, 48px);
}

/* ============================================================
   BREAKPOINTS — structural shifts only (fluid clamp() handles
   the in-between sizing), covering 320px → 1920px+
   ============================================================ */

/* ===== Below 991px: stack the two-column layout ===== */
@media (max-width: 991px) {
    .cz-wrap {
        grid-template-columns: 1fr;
    }

    .cz-summary {
        position: static;
    }
}

/* ===== Tablet portrait (768px - 991px) ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .cz-preview-stage {
        aspect-ratio: 16 / 10;
    }
}

/* ===== EVERYTHING BELOW 768px: full mobile rework ===== */
@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    .category-container {
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
    }

    /* ---- hero ---- */
    .cz-hero {
        padding: 28px 0 22px;
        margin-bottom: 20px;
    }

    .cz-hero h1 {
        font-size: 22px;
        line-height: 1.25;
    }

    .cz-eyebrow {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .cz-sub {
        font-size: 13px;
        padding: 0;
        line-height: 1.5;
    }

    /* ---- layout: force single column, kill any leftover gap issues ---- */
    .cz-wrap {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
        width: 100%;
    }

    .cz-left,
    .cz-right {
        width: 100%;
    }

    .cz-block-label {
        font-size: 14px;
        margin-bottom: 12px !important;
    }

    /* ---- preview ---- */
    .cz-preview-card {
        padding: 14px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .cz-preview-stage {
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }

    .cz-overlay-text {
        font-size: 15px;
        padding: 4px 10px;
    }

    .cz-stage-badges span {
        font-size: 9.5px;
        padding: 4px 9px;
    }

    .cz-view-thumbs {
        gap: 8px;
        margin-top: 12px;
        justify-content: center;
    }

    .cz-thumb {
        width: 52px;
        height: 52px;
    }

    /* ---- product picker: horizontal scroll, no wrapping issues ---- */
    .cz-product-picker {
        padding: 14px;
        border-radius: 12px;
    }

    .cz-product-scroll {
        gap: 8px;
        margin: 0 -14px;
        padding: 0 14px 6px;
    }

    .cz-product-pill {
        width: 70px;
        padding: 8px;
    }

    .cz-product-pill img {
        width: 40px;
        height: 40px;
    }

    .cz-product-pill span {
        font-size: 9.5px;
    }

    /* ---- form panels ---- */
    .cz-panel {
        padding: 16px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .cz-input {
        font-size: 13px;
        padding: 11px 13px;
    }

    /* ---- fields: always single column below 768px ---- */
    .cz-field-row {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 14px;
    }

    .cz-field label {
        font-size: 12px;
        margin-bottom: 6px !important;
    }

    .cz-select {
        font-size: 13px;
        padding: 10px 12px;
    }

    .cz-color-row {
        gap: 8px;
    }

    .cz-color-dot {
        width: 22px;
        height: 22px;
    }

    /* ---- upload box ---- */
    .cz-upload-box {
        padding: 22px 14px;
    }

    .cz-upload-box i {
        font-size: 18px;
    }

    .cz-upload-box p {
        font-size: 13px;
    }

    .cz-upload-hint {
        font-size: 10.5px;
    }

    .cz-upload-preview img {
        width: 38px;
        height: 38px;
    }

    .cz-upload-preview span {
        font-size: 11.5px;
    }

    /* ---- summary / actions ---- */
    .cz-summary-row {
        font-size: 13px;
    }

    .cz-summary-total {
        font-size: 16px;
        padding-top: 10px;
        margin-bottom: 16px;
    }

    .cz-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cz-btn-fill {
        order: 1;
        flex-basis: 100%;
        font-size: 13px;
        padding: 13px 0;
    }

    .cz-btn-outline {
        order: 2;
        width: 100%;
        flex: 1;
        padding: 11px 0;
        font-size: 15px;
    }

    .cz-note {
        font-size: 11px;
    }

    /* ---- how it works recap ---- */
    .cz-steps-card {
        margin-bottom: 24px;
    }
}

/* ===== Small mobile (up to 575px) ===== */
@media (max-width: 575px) {
    .cz-preview-stage {
        aspect-ratio: 1 / 1;
    }
}

/* ===== Extra small mobile (up to 360px) ===== */
@media (max-width: 360px) {
    .cz-hero h1 {
        font-size: 20px;
    }

    .cz-thumb {
        width: 46px;
        height: 46px;
    }

    .cz-product-pill {
        width: 62px;
    }

    .cz-product-pill img {
        width: 34px;
        height: 34px;
    }

    .cz-product-pill span {
        font-size: 9px;
    }

    .cz-color-dot {
        width: 20px;
        height: 20px;
    }
}