/* =========================================================
   TU PERRO — EDICIÓN PERSONALIZADA · PRODUCTO 20926
   ========================================================= */

.turo-custom-dog-product .turo-custom-dog {
    margin: 22px 0 20px;
    padding: 22px;
    border: 1px solid #e7e7e7;
    border-radius: 22px;
    background: #fff;
    font-family: var(--turo-font-family);
}

.turo-custom-dog__header { margin-bottom: 22px; }
.turo-custom-dog__eyebrow {
    display: inline-block;
    margin-bottom: 7px;
    color: #568203;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.turo-custom-dog__header h3 {
    margin: 0 0 5px;
    color: #111;
    font-size: clamp(24px, 2.4vw, 31px);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: .98;
    text-transform: uppercase;
}
.turo-custom-dog__header p { margin: 0; color: #666; font-size: 13px; }

.turo-custom-dog__field {
    display: block;
    min-width: 0;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}
.turo-custom-dog__field:last-child { margin-bottom: 0; }
.turo-custom-dog__label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: #111;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}
.turo-custom-dog__label em { color: #568203; font-style: normal; }
.turo-custom-dog__field > small,
.turo-custom-dog__photo-tip { display: block; margin: 7px 0 0; color: #777; font-size: 11px; line-height: 1.45; }

.turo-custom-dog__field input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
}
.turo-custom-dog__field textarea {
    width: 100%; min-height: 120px; padding: 14px 16px; border: 1px solid #dedede; border-radius: 16px; background: #fff; color: #222; font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; box-shadow: none;
}
.turo-custom-dog__field input[type="text"]:focus,
.turo-custom-dog__field textarea:focus {
    border-color: #568203;
    outline: 2px solid rgba(86,130,3,.12);
    outline-offset: 1px;
}

.turo-custom-dog__swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.turo-custom-dog__swatch { position: relative; flex: 0 0 auto; min-width: 0; cursor: pointer; }
.turo-custom-dog__swatch input { position: absolute; opacity: 0; pointer-events: none; }
.turo-custom-dog__swatch > span:last-child {
    display: flex;
    align-items: center;
    width: auto;
    min-width: 118px;
    min-height: 39px;
    padding: 0 12px 0 36px;
    border: 1px solid #dedede;
    border-radius: 999px;
    background: #fff;
    color: #222;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.turo-custom-dog__swatch-dot {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 9px;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px rgba(0,0,0,.12);
    transform: translateY(-50%);
}
.turo-custom-dog__swatch input:checked ~ span:last-child {
    border-color: var(--option-color, #111);
    background: var(--option-color, #111);
    color: var(--option-text, #fff);
}
.turo-custom-dog__swatch input:focus-visible ~ span:last-child { outline: 2px solid #568203; outline-offset: 2px; }

.turo-custom-dog__file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
}
.turo-custom-dog__upload {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1.5px dashed #cfcfcf;
    border-radius: 15px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}
.turo-custom-dog__upload:hover,
.turo-custom-dog__upload.is-ready { border-color: #568203; background: #fbfceF; }
.turo-custom-dog__upload-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}
.turo-custom-dog__upload-copy { display: flex; flex-direction: column; min-width: 0; }
.turo-custom-dog__upload-copy strong { color: #111; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.turo-custom-dog__upload-copy small { color: #777; font-size: 10px; }
.turo-custom-dog__upload-file {
    max-width: 145px;
    overflow: hidden;
    color: #666;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.turo-custom-dog__preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f5f7ef;
    color: #568203;
    font-size: 11px;
    font-weight: 800;
}
.turo-custom-dog__preview[hidden] { display: none; }
.turo-custom-dog__preview img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }

@media (max-width: 767px) {
    .turo-custom-dog-product .turo-custom-dog { margin-top: 18px; padding: 18px; border-radius: 18px; }
    .turo-custom-dog__header h3 { font-size: 25px; }
    .turo-custom-dog__swatches { display: flex; flex-wrap: wrap; gap: 7px; }
    .turo-custom-dog__swatch > span:last-child { min-height: 37px; padding-right: 10px; font-size: 10px; }
    .turo-custom-dog__upload { grid-template-columns: 40px minmax(0,1fr); }
    .turo-custom-dog__upload-file { grid-column: 2; max-width: 100%; margin-top: -7px; }
}

/* Producto personalizado 20926: el sticky Add to Cart de Astra vuelve a renderizar
   el formulario completo (incluidos los campos personalizados). En este producto
   lo desactivamos para evitar duplicados y el layout roto al hacer scroll. */
body.postid-20926 .ast-sticky-add-to-cart {
	display: none !important;
}

/* Aclaración: el selector corresponde a las tiritas del diseño, no a la polera. */
.turo-custom-dog__color-help {
    display: block;
    margin: 5px 0 10px;
    color: #737373;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

/* =========================================================
   POLERAS PERSONALIZADAS — LAYOUT DESKTOP
   Tu Perro + Tu Gato
   ========================================================= */

@media (min-width: 1024px) {
    /* Más espacio útil: estos productos tienen un configurador más largo
       que una ficha tradicional. */
    body.turo-personalized-single .site-content .ast-container {
        width: min(100% - 48px, 1460px);
        max-width: 1460px;
        margin-inline: auto;
        padding-inline: 0;
    }

    body.turo-personalized-single .site-content .site-main {
        width: 100%;
        max-width: none;
    }

    body.turo-personalized-single.single-product div.product {
        display: grid;
        grid-template-columns: minmax(0, .86fr) minmax(560px, 1.14fr);
        gap: clamp(38px, 4vw, 64px);
        align-items: start;
    }

    /* La galería acompaña el proceso mientras se configura la polera. */
    body.turo-personalized-single.single-product div.product div.images {
        position: sticky;
        top: 118px;
        align-self: start;
        width: 100% !important;
        margin: 0 !important;
    }

    body.turo-personalized-single .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image {
        border-radius: 34px;
        overflow: hidden;
    }

    body.turo-personalized-single.single-product div.product .summary {
        width: 100% !important;
        max-width: none;
        margin: 0 !important;
        padding: clamp(30px, 3vw, 42px);
        border-radius: 28px;
        box-shadow: 0 18px 50px rgba(17,17,17,.055);
    }

    body.turo-personalized-single.single-product div.product .summary .product_title {
        max-width: 760px;
        font-size: clamp(46px, 4vw, 62px);
        line-height: .98;
    }

    body.turo-personalized-single .woocommerce-product-details__short-description {
        max-width: 760px;
        font-size: 15px;
        line-height: 1.62;
    }

    body.turo-personalized-single form.cart,
    body.turo-personalized-single table.variations {
        width: 100%;
    }

    /* El formulario personalizado forma parte del configurador, no otra
       tarjeta dentro de la tarjeta principal. */
    body.turo-personalized-single.turo-custom-dog-product .turo-custom-dog {
        margin: 26px 0 10px;
        padding: 26px 0 0;
        border: 0;
        border-top: 1px solid #e8e8e8;
        border-radius: 0;
        background: transparent;
    }

    body.turo-personalized-single .turo-custom-dog__header {
        margin-bottom: 24px;
    }

    body.turo-personalized-single .turo-custom-dog__header h3 {
        font-size: clamp(30px, 2.5vw, 38px);
    }

    body.turo-personalized-single .turo-custom-dog__swatches {
        gap: 10px;
    }

    body.turo-personalized-single .turo-custom-dog__swatch > span:last-child {
        min-height: 42px;
        padding-right: 14px;
        font-size: 12px;
    }

    body.turo-personalized-single .turo-custom-dog__upload {
        min-height: 82px;
        padding: 15px 16px;
    }

    body.turo-personalized-single .turo-print-placement__card {
        min-height: 72px;
        padding: 14px 16px;
    }


    /* Astra duplica la compra en su barra sticky. En un configurador largo
       resulta confuso y puede repetir controles. */
    body.turo-personalized-single .ast-sticky-add-to-cart {
        display: none !important;
    }
}

/* Aviso de producción — productos personalizados */
body.turo-personalized-single .turo-personalized-production-note {
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #e5e1c6;
    border-radius: 18px;
    background: #fff9c7;
    color: #111;
    font-size: 13px;
    line-height: 1.55;
}
body.turo-personalized-single .turo-personalized-production-note strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 800;
}
body.turo-personalized-single .turo-personalized-production-note p {
    margin: 0;
}
body.turo-personalized-single .turo-personalized-production-note p + p {
    margin-top: 5px;
    font-weight: 700;
}

/* =========================================================
   PERSONALIZADAS — UX CONFIGURADOR 2026-09-22
   Modelo/talla integrados en "Crea tu polera" + descripción compacta.
   ========================================================= */
body.turo-personalized-single .woocommerce-product-details__short-description > p:first-child {
    margin-bottom: 8px;
}
body.turo-personalized-single .turo-description-more {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
}
body.turo-personalized-single .turo-description-more summary {
    width: fit-content;
    cursor: pointer;
    color: #111;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}
body.turo-personalized-single .turo-description-more[open] summary { margin-bottom: 8px; }
body.turo-personalized-single .turo-description-more p { margin: 0 0 8px; }

body.turo-personalized-single .turo-custom-dog__variation-slot {
    margin: 0 0 14px;
}
body.turo-personalized-single .turo-custom-dog__variation-slot table.variations {
    margin: 0 !important;
}
body.turo-personalized-single .turo-custom-dog__variation-slot .turo-selection-status {
    margin-top: 10px;
}
body.turo-personalized-single .turo-custom-dog__size-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 24px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #f5f7ef;
    color: #444;
    font-size: 11px;
    line-height: 1.4;
}
body.turo-personalized-single .turo-custom-dog__size-help a {
    flex: 0 0 auto;
    color: #111;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}
body.turo-personalized-single .turo-custom-dog__accessory input[type="text"] {
    width: 100%;
}

@media (max-width: 767px) {
    body.turo-personalized-single .woocommerce-product-details__short-description {
        font-size: 13px;
        line-height: 1.5;
    }
    body.turo-personalized-single .turo-custom-dog__size-help {
        display: block;
        margin-bottom: 20px;
        padding: 11px 12px;
    }
    body.turo-personalized-single .turo-custom-dog__size-help a {
        display: inline-block;
        margin-top: 5px;
    }
    body.turo-personalized-single .turo-custom-dog__header { margin-bottom: 18px; }
    body.turo-personalized-single .turo-custom-dog__header p { font-size: 12px; }
}

/* Ajustes finales UX personalizadas — 2026-09-22 */
body.turo-personalized-single .woocommerce-breadcrumb { display: none !important; }
body.turo-personalized-single .turo-single-summary-story { border-bottom: 0 !important; padding-bottom: 0 !important; margin-bottom: 0 !important; }
body.turo-personalized-single.turo-custom-dog-product .turo-custom-dog { border-top: 0 !important; padding-top: 18px !important; margin-top: 18px !important; }
body.turo-personalized-single .turo-custom-dog__variation-slot .turo-option-label { display:flex; align-items:center; gap:8px; margin:0 0 8px; font-weight:800; font-size:12px; color:#111; }
body.turo-personalized-single .turo-custom-dog__variation-slot .turo-option-step { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:#111; color:#fff; font-size:10px; line-height:1; }
body.turo-personalized-single .turo-print-placement__label { display:flex; align-items:center; gap:8px; }
body.turo-personalized-single .turo-custom-dog__quantity-wrap { margin: 20px 0 16px; }
body.turo-personalized-single .turo-custom-dog__quantity-wrap > small { display:block; margin:4px 0 10px; color:#777; font-size:11px; }
body.turo-personalized-single .turo-custom-dog__quantity-wrap .quantity { margin:0 !important; float:none !important; }

/* Halloween Personalizadas reutiliza el configurador base. Solo define estados propios de sus swatches. */
.turo-custom-dog--halloween .turo-custom-dog__swatches--shirt { display: flex; flex-wrap: wrap; }
.turo-custom-dog--halloween .turo-custom-dog__swatch[hidden] { display: none !important; }
.turo-custom-dog--halloween .turo-custom-dog__colors:disabled { opacity: .55; }
.turo-custom-dog--halloween .turo-custom-dog__swatch-dot[style*="#ffffff"] { border-color: #cfcfcf; }

/* Varias mascotas — personalizadas perro/gato */
body.turo-personalized-single .turo-custom-dog__pet-count-help,
body.turo-personalized-single .turo-custom-dog__pets-help { display:block; margin:4px 0 10px; color:#777; font-size:11px; }
body.turo-personalized-single .turo-custom-dog__pet-count-options { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
body.turo-personalized-single .turo-custom-dog__pet-count-option { position:relative; margin:0; cursor:pointer; }
body.turo-personalized-single .turo-custom-dog__pet-count-option input { position:absolute; opacity:0; pointer-events:none; }
body.turo-personalized-single .turo-custom-dog__pet-count-option span { display:flex; align-items:center; justify-content:center; min-height:44px; padding:9px 8px; border:1px solid #ddd; border-radius:13px; background:#fff; color:#111; font-size:12px; font-weight:800; text-align:center; transition:.18s ease; }
body.turo-personalized-single .turo-custom-dog__pet-count-option input:checked + span { border:2px solid #111; background:#111; color:#fff; }
body.turo-personalized-single .turo-custom-dog__pet-card { margin-top:12px; padding:14px; border:1px solid #e2e2e2; border-radius:16px; background:#fafafa; }
body.turo-personalized-single .turo-custom-dog__pet-card[hidden] { display:none !important; }
body.turo-personalized-single .turo-custom-dog__pet-card-title { display:block; margin-bottom:10px; font-size:12px; font-weight:900; }
body.turo-personalized-single .turo-custom-dog__pet-card > label > span,
body.turo-personalized-single .turo-custom-dog__pet-photo > span { display:block; margin-bottom:6px; font-size:11px; font-weight:800; }
body.turo-personalized-single .turo-custom-dog__pet-card input[type="text"] { width:100%; margin-bottom:12px; }
body.turo-personalized-single .turo-custom-dog__pet-card .turo-custom-dog__upload { background:#fff; }
@media (max-width:767px) {
 body.turo-personalized-single .turo-custom-dog__pet-count-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
