/* Custom Rug Order — Wes mockup */

.page-custom-rugs {
    --custom-cream: #fbfaf7;
    --custom-ink: #1a1a1a;
    --custom-muted: #6b6b6b;
    --custom-line: #e8e4dc;
    --custom-accent: #8b6fd7;
    --custom-accent-hover: #7559c9;
    background: var(--custom-cream);
}

.page-custom-rugs #main {
    min-height: 0;
}

.page-custom-rugs .site-header.site-header--mockup {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--custom-line);
}

.page-custom-rugs .header-mockup__nav a.is-active {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1.5px;
}

/* Hero */
.custom-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(380px, 52vh, 520px);
    padding: clamp(50px, 14vw, 20px) max(24px, calc((100vw - var(--home-shell)) / 2)) clamp(56px, 8vw, 32px);
    text-align: left;
    color: #fff;
    overflow: hidden;
}

.custom-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.custom-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 52% 48%;
}

.custom-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.62) 0%,
        rgba(0, 0, 0, 0.42) 38%,
        rgba(0, 0, 0, 0.18) 68%,
        rgba(0, 0, 0, 0.08) 100%
    );
}

.custom-hero__inner {
    position: relative;
    z-index: 2;
    width: min(36rem, var(--home-shell));
    max-width: 100%;
}

.custom-hero__kicker {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 14px;
}

.custom-hero__title {
    margin: 0 0 16px;
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    line-height: 1.08;
    color: #fff;
}

.custom-hero__lead {
    margin: 0 0 28px;
    max-width: 32rem;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
}

.custom-hero__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: clamp(20px, 3.5vw, 40px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.custom-hero__trust li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 9.5rem;
    color: #fff;
}

.custom-hero__trust-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #fff;
    opacity: 1;
}

.custom-hero__trust-icon svg {
    display: block;
}

.custom-hero__trust li:first-child .custom-hero__trust-icon {
    transform: rotate(-12deg);
}

.custom-hero__trust-label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

.custom-errors {
    width: var(--home-shell);
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: 12px;
    background: #fff5f5;
    border: 1px solid #f5c2c2;
    color: #8b1a1a;
    font-size: 0.9375rem;
}

.custom-errors p {
    margin: 0 0 8px;
    font-weight: 600;
}

.custom-errors ul {
    margin: 0;
    padding-left: 1.2rem;
}

.custom-success {
    width: var(--home-shell);
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: 12px;
    background: #eef9f0;
    border: 1px solid #c8e6c9;
    color: #1b5e20;
    font-weight: 500;
}

/* Order layout */
.custom-order-form {
    padding: clamp(40px, 5vw, 56px) 0 clamp(72px, 8vw, 96px);
}

.custom-order-shell {
    width: var(--home-shell);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: clamp(28px, 4vw, 48px);
    align-items: start;
}

.custom-order-main {
    grid-column: 1;
    min-width: 0;
}

.custom-sidebar {
    grid-column: 2;
    grid-row: 1;
}

.custom-order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(32px, 4vw, 44px);
}

.custom-order-head__title {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    color: var(--custom-ink);
}

.custom-order-head__intro {
    margin: 0;
    max-width: 34rem;
    color: var(--custom-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.custom-order-head__doodle {
    flex-shrink: 0;
    margin: 0;
    font-family: Pacifico, "Segoe Script", cursive;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--custom-ink);
    opacity: 0.85;
    transform: rotate(-4deg);
    white-space: nowrap;
}

/* Steps */
.custom-step {
    margin-bottom: clamp(36px, 4vw, 48px);
}

.custom-step__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.custom-step__num {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--custom-ink);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.custom-step__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--custom-ink);
}

/* Design cards */
.custom-design-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.custom-design-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    cursor: pointer;
    border: 2px solid var(--custom-line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-design-card.is-selected {
    border-color: var(--custom-accent);
    box-shadow: 0 0 0 1px var(--custom-accent);
}

.custom-design-card__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-design-card__radio {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #bbb;
    background: #fff;
    z-index: 2;
}

.custom-design-card.is-selected .custom-design-card__radio {
    border-color: var(--custom-accent);
    background: radial-gradient(circle at center, var(--custom-accent) 0 5px, #fff 5px);
}

.custom-design-card__media {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: clamp(111px, 8.6vw, 129px);
    overflow: hidden;
    background: #f0ede8;
}

.custom-design-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.custom-design-card__copy {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 4.75rem;
    padding: 12px 12px 14px;
}

.custom-design-card__title {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--custom-ink);
    margin-bottom: 4px;
}

.custom-design-card__body {
    display: block;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--custom-muted);
}

/* Upload */
.custom-upload-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 20px;
    align-items: start;
}

.custom-upload-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 28px 20px;
    border: 2px dashed #cfc9be;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.custom-upload-drop.is-dragover {
    border-color: var(--custom-accent);
    background: #faf8ff;
}

.custom-upload-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-upload-drop__icon {
    color: var(--custom-muted);
    margin-bottom: 12px;
}

.custom-upload-drop__title {
    margin: 0 0 6px;
    font-weight: 600;
    color: var(--custom-ink);
}

.custom-upload-drop__meta {
    margin: 0 0 8px;
    font-size: 0.88rem;
    color: var(--custom-muted);
}

.custom-upload-drop__browse {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--custom-accent);
    cursor: pointer;
    text-decoration: underline;
}

.custom-upload-drop__hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--custom-muted);
}

.custom-upload-drop__filename {
    margin: 10px 0 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--custom-ink);
}

.custom-upload-examples__title {
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--custom-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.custom-upload-examples__art {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    background: #f0ede8;
}

/* Size cards */
.custom-size-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.custom-size-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    padding: 14px 10px;
    border: 2px solid var(--custom-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease;
}

.custom-size-card.is-selected {
    border-color: var(--custom-accent);
}

.custom-size-card__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-size-card__radio {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #bbb;
    background: #fff;
}

.custom-size-card.is-selected .custom-size-card__radio {
    border-color: var(--custom-accent);
    background: radial-gradient(circle at center, var(--custom-accent) 0 4px, #fff 4px);
}

.custom-size-card__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--custom-ink);
}

.custom-size-card__price {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--custom-accent);
}

.custom-size-card__hint {
    margin-top: 2px;
    font-size: 0.68rem;
    color: var(--custom-muted);
}

/* Colors */
.custom-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.custom-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: var(--swatch, #ccc);
    cursor: pointer;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.custom-color-swatch.is-selected {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--custom-accent);
    transform: scale(1.05);
}

.custom-color-swatch--custom {
    background: #fff;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--custom-muted);
    line-height: 1;
}

/* Details */
.custom-details {
    position: relative;
}

.custom-details textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px 18px 36px;
    border: 1px solid var(--custom-line);
    border-radius: 14px;
    background: #fff;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
}

.custom-details textarea:focus {
    outline: 2px solid rgba(139, 111, 215, 0.35);
    border-color: var(--custom-accent);
}

.custom-details__counter {
    position: absolute;
    right: 14px;
    bottom: 10px;
    font-size: 0.75rem;
    color: var(--custom-muted);
}

/* Help card */
.custom-help-card {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 20px);
    padding: clamp(20px, 2.5vw, 26px) clamp(20px, 2.8vw, 28px);
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eceae6;
}

.custom-help-card__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--custom-ink);
}

.custom-help-card__copy {
    flex: 1;
    min-width: 0;
}

.custom-help-card__title {
    margin: 0 0 6px;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--custom-ink);
}

.custom-help-card__body {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

.custom-help-card__btn {
    flex-shrink: 0;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid #e5e2dc;
    background: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--custom-ink);
    white-space: nowrap;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-help-card__btn:hover {
    border-color: #d8d4cc;
    color: var(--custom-ink);
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.06);
}

/* Sidebar */
.custom-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.custom-sidebar__step-head {
    display: none;
}

.custom-sidebar__card {
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--custom-line);
    padding: 22px;
}

.custom-sidebar__preview {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--custom-cream);
}

.custom-sidebar__preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.custom-sidebar__estimate-label {
    margin: 0 0 4px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--custom-muted);
}

.custom-sidebar__price {
    margin: 0 0 16px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--custom-ink);
    letter-spacing: -0.02em;
}

.custom-sidebar__summary {
    margin: 0 0 20px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--custom-line);
}

.custom-sidebar__summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.85rem;
}

.custom-sidebar__summary dt {
    margin: 0;
    color: var(--custom-muted);
    font-weight: 500;
}

.custom-sidebar__summary dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    color: var(--custom-ink);
}

.custom-sidebar__fields {
    margin-bottom: 16px;
}

.custom-sidebar__fields-title {
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--custom-muted);
}

.custom-sidebar__fields .form-field {
    margin-bottom: 12px;
}

.custom-sidebar__fields label {
    font-size: 0.82rem;
}

.custom-sidebar__fields input[type="text"],
.custom-sidebar__fields input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--custom-line);
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
}

.custom-sidebar__fields .checkbox-field {
    font-size: 0.78rem;
    line-height: 1.45;
}

.custom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.custom-btn--primary {
    border: none;
    background: var(--custom-accent);
    color: #fff;
}

.custom-btn--primary:hover {
    background: var(--custom-accent-hover);
    color: #fff;
}

.custom-btn--outline {
    border: 2px solid var(--custom-line);
    background: #fff;
    color: var(--custom-ink);
}

.custom-btn--outline:hover {
    border-color: var(--custom-accent);
    color: var(--custom-accent);
}

.custom-sidebar__inspo-title {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--custom-ink);
}

.custom-inspo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.custom-inspo-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    background: #ece8e2;
}

.custom-inspo-more {
    display: block;
    text-align: center;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--custom-ink);
}

.custom-inspo-more:hover {
    color: var(--custom-accent);
}

/* Tablet */
@media (max-width: 1100px) {
    .custom-design-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .custom-order-shell {
        grid-template-columns: 1fr;
    }

    .custom-order-main,
    .custom-sidebar {
        grid-column: 1;
        grid-row: auto;
    }

    .custom-sidebar {
        position: static;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 820px) {
    .custom-hero {
        min-height: min(420px, 72svh);
        padding: 88px 20px 48px;
    }

    .custom-order-head {
        flex-direction: column;
    }

    .custom-order-head__doodle {
        display: none;
    }

    .custom-design-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .custom-design-card__copy {
        min-height: 4.25rem;
        padding: 10px 10px 12px;
    }

    .custom-design-card__title {
        font-size: 0.78rem;
    }

    .custom-design-card__body {
        font-size: 0.68rem;
    }

    .custom-upload-split {
        grid-template-columns: 1fr;
    }

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

    .custom-order-shell {
        gap: 12px;
    }

    .custom-order-main .custom-step:last-child {
        margin-bottom: 8px;
    }

    .custom-sidebar {
        width: 100%;
        gap: 0;
        margin-top: 0;
    }

    .custom-sidebar__step-head {
        display: flex;
        margin-bottom: 14px;
    }

    .custom-sidebar__card--price {
        margin-bottom: 0;
    }

    .custom-btn--outline {
        display: none;
    }
}
