/* LUMIÈRE Product Customization — product page + cart */

/* Before-cart: inside ATC form (Astra floats qty/button). After-cart: under PayPal, outside form. */
.woocommerce div.product form.cart .lumiere-pc-section,
.woocommerce div.product .summary .lumiere-pc-section.is-after-cart {
    clear: both;
    display: block;
    float: none;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.35em;
    padding: 1.1em 0 0.4em;
}

.woocommerce div.product .summary .lumiere-pc-section.is-after-cart {
    margin-top: 0.75em;
    padding-top: 0.85em;
}

.lumiere-pc-title {
    margin: 0 0 0.45em;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ast-global-color-2, #111);
}

.lumiere-pc-intro {
    margin: 0 0 0.9em;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ast-global-color-3, #3d3d3d);
}

.lumiere-pc-fields {
    display: flex;
    flex-direction: column;
    gap: 0.85em;
}

.lumiere-pc-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.85em;
}

.lumiere-pc-field-group + .lumiere-pc-field-group {
    padding-top: 0.85em;
    border-top: 1px solid var(--lumiere-border, #e9e4dd);
}

.lumiere-pc-field-group-radio .lumiere-pc-row {
    grid-column: 1 / -1;
}

.lumiere-pc-row {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35em;
}

.lumiere-pc-row > label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ast-global-color-2, #111);
}

.lumiere-pc-row .required {
    color: var(--lumiere-rose-dark, #b0896b);
}

.lumiere-pc-row .lumiere-pc-price {
    margin-left: 0.35em;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--lumiere-rose-dark, #b0896b);
    white-space: nowrap;
}

.lumiere-pc-row input[type="text"],
.lumiere-pc-row textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.7em 0.85em;
    border: 1px solid var(--lumiere-border, #e9e4dd);
    border-radius: 0;
    background: var(--ast-global-color-4, #fff);
    color: var(--ast-global-color-2, #111);
    font-size: 0.92rem;
    line-height: 1.4;
    box-shadow: none;
}

.lumiere-pc-row input[type="text"]:focus,
.lumiere-pc-row textarea:focus {
    outline: none;
    border-color: var(--lumiere-rose, #c9a087);
}

.lumiere-pc-row textarea {
    min-height: 88px;
    resize: vertical;
}

.lumiere-pc-radio-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.lumiere-pc-radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 132px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    text-align: center;
    text-transform: none !important;
}

.lumiere-pc-radio-card.is-compact {
    min-height: 0;
    padding-top: 22px;
}

.lumiere-pc-radio-card.is-compact .lumiere-pc-radio-name {
    padding-top: 4px;
}

.lumiere-pc-radio-card.is-active {
    border: 2px solid #e4201b;
}

.lumiere-pc-radio-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.lumiere-pc-radio-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 3px 7px;
    border-bottom-right-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.lumiere-pc-radio-badge.is-free { background: #6aa237; }
.lumiere-pc-radio-badge.is-plus { background: #1d7ed4; }

.lumiere-pc-radio-check {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e4201b;
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

.lumiere-pc-radio-card.is-active .lumiere-pc-radio-check {
    display: inline-flex;
}

.lumiere-pc-radio-visual {
    display: flex;
    height: 76px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%) 0 0 / 16px 16px,
        linear-gradient(225deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%) 0 0 / 16px 16px,
        linear-gradient(#d7cfc4, #c4bbb0);
    color: rgba(75, 64, 52, 0.55);
    font-size: 1.7rem;
    font-weight: 700;
}

.lumiere-pc-radio-name {
    display: block;
    padding: 8px 6px 10px;
    color: #222;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.lumiere-pc-radio-features {
    margin: 0;
    padding: 0 10px 10px 24px;
    color: #666;
    font-size: 11px;
    line-height: 1.45;
    text-align: left;
}

.lumiere-pc-radio-features li {
    margin: 0;
}

.lumiere-pc-file {
    display: block;
}

/* Visually hidden — do NOT stretch over the CTA.
   Overlaying opacity:0 file inputs only keeps the native
   "Browse" hit-area clickable (often just the bottom strip). */
.lumiere-pc-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.lumiere-pc-file-ui {
    display: flex;
    align-items: center;
    gap: 0.85em;
    min-height: 42px;
    padding: 0.15em 0;
}

.lumiere-pc-file-preview {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border: 1px solid var(--lumiere-border, #e9e4dd);
    background: #fff;
}

.lumiere-pc-file-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lumiere-pc-file-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    min-width: 0;
}

.lumiere-pc-file-cta {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.45em 0.9em;
    border: 1px solid var(--lumiere-rose-dark, #b0896b);
    background: var(--lumiere-rose-dark, #b0896b);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
}

.lumiere-pc-file-cta[hidden] {
    display: none;
}

.lumiere-pc-file-group-hint {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--ast-global-color-3, #888);
}

.lumiere-pc-file-clear {
    margin-top: 0.4em;
    padding: 0;
    border: 0;
    background: none;
    color: var(--lumiere-rose-dark, #b0896b);
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: underline;
}

.lumiere-pc-cart-file,
.lumiere-pc-order-file {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    text-decoration: none;
}

.lumiere-pc-cart-file img,
.lumiere-pc-order-file img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid var(--lumiere-border, #e9e4dd);
}

dl.variation .lumiere-pc-cart-file img {
    display: block;
}

@media (min-width: 783px) {
    .lumiere-pc-field-group-text {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85em;
    }

    .lumiere-pc-field-group-file {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.85em;
    }

    .lumiere-pc-field-group-file .lumiere-pc-file-group-hint {
        grid-column: 1 / -1;
    }
}
