.tho-field-help{display:block;margin-top:6px;font-size:12px;line-height:1.4;color:#666}.tho-legal-check{margin:16px 0}.tho-legal-check label{display:flex;align-items:flex-start;gap:8px}.tho-legal-check input{margin-top:4px}.tho-account-intro{margin:0 0 28px}.tho-card{padding:24px;border:1px solid #e4e4e4;border-radius:8px}.tho-card h2{margin-top:0}.tho-account-fields{margin:32px 0 20px;padding:22px;border:1px solid #e4e4e4}.tho-account-fields legend{padding:0 8px;font-weight:700}

/* THO Regalo v0.3 - publicación de productos */
.tho-publish-card .form-row { margin-bottom: 20px; }
.tho-publish-card textarea,
.tho-publish-card select,
.tho-publish-card input[type="text"],
.tho-publish-card input[type="file"] { width: 100%; box-sizing: border-box; }
.tho-draw-info { padding: 18px 20px; margin: 20px 0; background: rgba(0,0,0,.035); border-radius: 4px; }
.tho-draw-info p { margin: 5px 0 0; }
.tho-product-list { display: grid; gap: 14px; }
.tho-product-item { display: flex; gap: 18px; align-items: center; padding: 14px; background: rgba(0,0,0,.025); }
.tho-product-thumb { width: 90px; min-width: 90px; }
.tho-product-thumb img { width: 90px; height: 90px; object-fit: cover; display: block; }
.tho-product-info h3 { margin: 0 0 8px; }
.tho-product-info p { margin: 3px 0; }
@media (max-width: 640px) {
  .tho-product-item { align-items: flex-start; }
  .tho-publish-card .form-row-first,
  .tho-publish-card .form-row-last { width: 100%; float: none; }
}


/* THO Regalo v0.4 - ficha pública de sorteo */
.tho-draw-summary{max-width:580px}.tho-draw-summary .product_title{margin:12px 0 6px;font-size:38px;line-height:1.08}.tho-draw-badge{display:inline-block;padding:7px 11px;border-radius:999px;font-size:12px;font-weight:800;letter-spacing:.06em;background:#eee}.tho-draw-badge.is-active{background:rgba(91,190,160,.15);color:#087d72}.tho-draw-badge.is-ended{background:#eee;color:#555}.tho-reference{margin:0 0 22px;color:#777;font-size:13px}.tho-draw-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0}.tho-draw-facts>div{padding:14px;background:rgba(0,0,0,.035);border-radius:6px}.tho-draw-facts span,.tho-countdown-box>span{display:block;font-size:12px;color:#777;margin-bottom:3px}.tho-draw-facts strong{display:block;font-size:15px}.tho-countdown-box{padding:18px 20px;border:1px solid #e6e6e6;border-radius:7px;margin:18px 0}.tho-countdown-box>strong{display:block;font-size:20px}.tho-countdown{margin-top:8px;font-weight:800;font-size:18px}.tho-join-button{width:100%;text-align:center;padding:15px 20px!important;font-weight:800!important;margin-top:6px!important}.tho-free-note{text-align:center;font-size:13px;color:#666;margin-top:9px}.tho-owner-note,.tho-draw-notice{padding:14px 16px;border-radius:6px;margin:16px 0}.tho-owner-note,.tho-draw-notice.is-info{background:#f2f2f2}.tho-draw-notice.is-success{background:#e9f8f2;color:#12684e}.tho-draw-notice.is-error{background:#fff0f0;color:#9a2525}.tho-join-form{margin:0}.tho-draw-summary form{margin-bottom:0}
@media(max-width:760px){.tho-draw-summary .product_title{font-size:30px}.tho-draw-facts{grid-template-columns:1fr}.tho-draw-summary{max-width:none}}


/* Ubicaciones normalizadas */
.tho-location-picker{position:relative;width:100%}.tho-location-picker label{display:block;margin-top:8px}.tho-location-results{position:absolute;z-index:9999;left:0;right:0;max-height:280px;overflow-y:auto;background:#fff;border:1px solid #d5d5d5;box-shadow:0 8px 22px rgba(0,0,0,.12)}.tho-location-option{display:block;width:100%;padding:10px 12px;border:0;border-bottom:1px solid #eee;background:#fff;text-align:left;cursor:pointer;font:inherit}.tho-location-option:hover,.tho-location-option:focus{background:#f4f4f4;outline:0}.tho-location-empty{padding:10px 12px;color:#666}.tho-location-postcode[readonly]{background:#f5f5f5;cursor:not-allowed}.tho-location-picker .tho-field-help{display:block;margin:5px 0 8px;font-size:12px;line-height:1.4;color:#777}


/* THO REGALO v0.8 — grids públicos y filtros */
.tho-public-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:24px;
    margin:24px 0 36px;
}
.tho-public-card{
    min-width:0;
    border:1px solid rgba(0,0,0,.10);
    background:#fff;
}
.tho-card-image{
    display:block;
    aspect-ratio:1/1;
    overflow:hidden;
}
.tho-card-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.tho-card-body{padding:16px;}
.tho-card-body h3{margin:4px 0 10px!important;font-size:20px;line-height:1.25;}
.tho-card-body h3 a{text-decoration:none;}
.tho-card-ref{font-size:12px;opacity:.65;text-transform:uppercase;letter-spacing:.06em;}
.tho-card-meta,.tho-card-date,.tho-card-winner{margin:5px 0!important;font-size:14px;line-height:1.45;}
.tho-card-winner{font-size:15px;}
.tho-draw-filters{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr)) auto;
    gap:16px;
    align-items:end;
    padding:20px;
    margin:20px 0 28px;
    border:1px solid rgba(0,0,0,.10);
}
.tho-filter-field{min-width:0;}
.tho-filter-field label{display:block;font-weight:600;margin:0 0 7px;}
.tho-filter-field select{width:100%;min-height:44px;}
.tho-filter-field small{display:block;margin-top:5px;opacity:.7;line-height:1.35;}
.tho-filter-actions{display:flex;flex-direction:column;gap:8px;min-width:120px;}
.tho-filter-actions button{min-height:44px;cursor:pointer;}
.tho-filter-actions a{text-align:center;font-size:13px;}
.tho-empty-results{padding:24px 0;}

@media (max-width:1000px){
    .tho-public-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .tho-draw-filters{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:600px){
    .tho-public-grid{grid-template-columns:1fr;}
    .tho-draw-filters{grid-template-columns:1fr;}
}


/* THO REGALO v0.8.1 — identidad visual */
.tho-draw-filters{
    background:#ffffff;
    border:2px solid #72c1a8;
    border-radius:14px;
    padding:22px;
    gap:18px;
}
.tho-filter-field label{
    color:#00686e;
    font-weight:700;
    font-size:13px;
    letter-spacing:.03em;
    text-transform:uppercase;
}
.tho-filter-field select{
    background:#ffffff;
    color:#111111;
    border:1px solid #72c1a8;
    border-radius:8px;
    min-height:48px;
    padding:0 14px;
}
.tho-filter-field select:focus{
    outline:2px solid #00686e;
    outline-offset:1px;
}
.tho-filter-field small{
    color:#111111;
    opacity:.7;
}
.tho-filter-actions button{
    background:#00686e;
    color:#ffffff;
    border:0;
    border-radius:8px;
    font-weight:700;
    min-height:48px;
    padding:0 22px;
}
.tho-filter-actions button:hover{
    background:#72c1a8;
    color:#111111;
}
.tho-filter-actions a{
    color:#00686e;
    font-weight:600;
}
.tho-public-card{
    border:1px solid #dfe8e5;
    border-radius:12px;
    overflow:hidden;
    background:#ffffff;
}
.tho-card-body{
    display:flex;
    flex-direction:column;
    height:100%;
}
.tho-card-ref{
    color:#00686e;
}
.tho-card-body h3,
.tho-card-body h3 a{
    color:#111111;
}
.tho-card-meta,
.tho-card-date,
.tho-card-winner{
    color:#111111;
}
.tho-card-button{
    display:block;
    width:100%;
    margin-top:14px;
    padding:12px 14px;
    text-align:center;
    background:#72c1a8;
    color:#111111!important;
    border-radius:8px;
    text-decoration:none!important;
    font-weight:700;
    line-height:1.2;
    transition:background .2s ease,color .2s ease;
}
.tho-card-button:hover{
    background:#00686e;
    color:#ffffff!important;
}
@media (max-width:600px){
    .tho-card-button{
        min-height:46px;
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:16px;
    }
}


/* THO REGALO v0.8.2 — ajustes de filtros y tarjetas */

/* Tarjetas: botón contenido dentro de la tarjeta */
.tho-public-card{
    box-sizing:border-box;
}
.tho-card-body{
    box-sizing:border-box;
    padding:16px;
}
.tho-card-button{
    box-sizing:border-box;
    width:auto;
    max-width:100%;
    margin:14px 0 0;
    padding:11px 16px;
    align-self:flex-start;
    min-width:130px;
}
@media (max-width:600px){
    .tho-card-button{
        width:auto;
        max-width:100%;
        min-width:125px;
        padding:11px 15px;
        font-size:15px;
    }
}

/* Barra principal: todos los campos arrancan desde arriba */
.tho-draw-filters{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto !important;
    gap:18px !important;
    align-items:start !important;
}
.tho-filter-field{
    align-self:start !important;
    min-width:0;
}
.tho-filter-field label{
    min-height:20px;
    margin-bottom:8px !important;
}
.tho-filter-field select{
    display:block;
    width:100% !important;
    height:48px !important;
    min-height:48px !important;
    margin:0 !important;
}
.tho-filter-field small{
    min-height:18px;
    margin-top:7px !important;
}
.tho-filter-actions{
    align-self:start !important;
    padding-top:28px;
    min-width:120px;
}
.tho-filter-actions button{
    width:100%;
}

/* En categorías / archivos de WooCommerce, neutralizamos estilos de The7 */
.woocommerce .tho-draw-filters,
.woocommerce-page .tho-draw-filters,
.archive .tho-draw-filters,
.tax-product_cat .tho-draw-filters,
.tax-product_tag .tho-draw-filters{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto !important;
    gap:18px !important;
    align-items:start !important;
    width:100% !important;
    max-width:none !important;
    padding:22px !important;
    margin:24px 0 30px !important;
    background:#ffffff !important;
    border:2px solid #72c1a8 !important;
    border-radius:14px !important;
    box-sizing:border-box !important;
}
.woocommerce .tho-draw-filters .tho-filter-field,
.woocommerce-page .tho-draw-filters .tho-filter-field,
.archive .tho-draw-filters .tho-filter-field,
.tax-product_cat .tho-draw-filters .tho-filter-field,
.tax-product_tag .tho-draw-filters .tho-filter-field{
    float:none !important;
    width:auto !important;
    margin:0 !important;
    padding:0 !important;
}
.woocommerce .tho-draw-filters label,
.woocommerce-page .tho-draw-filters label,
.archive .tho-draw-filters label,
.tax-product_cat .tho-draw-filters label,
.tax-product_tag .tho-draw-filters label{
    display:block !important;
    color:#00686e !important;
    font-weight:700 !important;
    font-size:13px !important;
    line-height:1.35 !important;
    text-transform:uppercase !important;
    letter-spacing:.03em !important;
    margin:0 0 8px !important;
}
.woocommerce .tho-draw-filters select,
.woocommerce-page .tho-draw-filters select,
.archive .tho-draw-filters select,
.tax-product_cat .tho-draw-filters select,
.tax-product_tag .tho-draw-filters select{
    display:block !important;
    float:none !important;
    width:100% !important;
    max-width:none !important;
    height:48px !important;
    min-height:48px !important;
    margin:0 !important;
    padding:0 14px !important;
    border:1px solid #72c1a8 !important;
    border-radius:8px !important;
    background:#ffffff !important;
    color:#111111 !important;
    box-sizing:border-box !important;
}
.woocommerce .tho-draw-filters .tho-filter-actions,
.woocommerce-page .tho-draw-filters .tho-filter-actions,
.archive .tho-draw-filters .tho-filter-actions,
.tax-product_cat .tho-draw-filters .tho-filter-actions,
.tax-product_tag .tho-draw-filters .tho-filter-actions{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    align-self:start !important;
    padding-top:28px !important;
    margin:0 !important;
    min-width:120px;
}
.woocommerce .tho-draw-filters button,
.woocommerce-page .tho-draw-filters button,
.archive .tho-draw-filters button,
.tax-product_cat .tho-draw-filters button,
.tax-product_tag .tho-draw-filters button{
    display:block !important;
    width:100% !important;
    min-height:48px !important;
    margin:0 !important;
    padding:0 20px !important;
    border:0 !important;
    border-radius:8px !important;
    background:#00686e !important;
    color:#ffffff !important;
    font-weight:700 !important;
    text-transform:uppercase !important;
    text-decoration:none !important;
}
.woocommerce .tho-draw-filters .tho-filter-actions a,
.woocommerce-page .tho-draw-filters .tho-filter-actions a,
.archive .tho-draw-filters .tho-filter-actions a,
.tax-product_cat .tho-draw-filters .tho-filter-actions a,
.tax-product_tag .tho-draw-filters .tho-filter-actions a{
    color:#00686e !important;
    font-size:13px !important;
    font-weight:600 !important;
    text-align:center !important;
    text-decoration:underline !important;
}

/* Responsive */
@media (max-width:1000px){
    .tho-draw-filters,
    .woocommerce .tho-draw-filters,
    .woocommerce-page .tho-draw-filters,
    .archive .tho-draw-filters,
    .tax-product_cat .tho-draw-filters,
    .tax-product_tag .tho-draw-filters{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
    .tho-filter-actions,
    .woocommerce .tho-draw-filters .tho-filter-actions,
    .woocommerce-page .tho-draw-filters .tho-filter-actions,
    .archive .tho-draw-filters .tho-filter-actions{
        padding-top:0 !important;
    }
}
@media (max-width:600px){
    .tho-draw-filters,
    .woocommerce .tho-draw-filters,
    .woocommerce-page .tho-draw-filters,
    .archive .tho-draw-filters,
    .tax-product_cat .tho-draw-filters,
    .tax-product_tag .tho-draw-filters{
        grid-template-columns:1fr !important;
        padding:18px !important;
    }
    .tho-filter-actions{
        padding-top:0 !important;
    }
}


/* THO REGALO v0.8.3 — cámara + galería en publicación de producto */
.tho-photo-upload{
    margin-top:18px;
}
.tho-photo-options{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin:14px 0 10px;
}
.tho-photo-option{
    min-width:0;
    padding:16px;
    border:1px solid #72c1a8;
    border-radius:10px;
    background:#ffffff;
}
.tho-photo-label{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:10px 16px;
    margin:0 0 10px !important;
    border-radius:8px;
    background:#00686e;
    color:#ffffff !important;
    font-weight:700;
    cursor:pointer;
    text-align:center;
    box-sizing:border-box;
}
.tho-photo-option input[type="file"]{
    display:block;
    width:100%;
    max-width:100%;
    color:#111111;
    font-size:14px;
}
.tho-photo-note{
    display:block;
    margin-top:8px;
    color:#111111;
    opacity:.7;
    font-size:13px;
    line-height:1.35;
}
@media (max-width:600px){
    .tho-photo-options{
        grid-template-columns:1fr;
    }
    .tho-photo-label{
        width:100%;
    }
    .tho-photo-option{
        padding:14px;
    }
}

/* THO REGALO v0.8.4 — distancia móvil */
.tho-filter-field select#tho_distancia{
    -webkit-appearance:auto;
    appearance:auto;
    touch-action:manipulation;
}
.tho-filter-field select#tho_distancia option:disabled{
    color:#777;
}


/* THO REGALO v0.8.6 — acciones Mis productos */
.tho-product-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:14px;
    align-items:center;
}
.tho-product-actions .button,
.tho-product-actions form{
    margin:0 !important;
}
.tho-product-actions .button{
    min-height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:8px 14px;
    border-radius:7px;
    text-decoration:none;
}
.tho-product-edit{
    background:#72c1a8 !important;
    color:#111111 !important;
}
.tho-product-delete{
    background:#ffffff !important;
    color:#9b1c1c !important;
    border:1px solid #9b1c1c !important;
}
@media (max-width:600px){
    .tho-product-actions{
        flex-direction:column;
        align-items:stretch;
    }
    .tho-product-actions .button,
    .tho-product-actions form,
    .tho-product-actions form button{
        width:100%;
        box-sizing:border-box;
    }
}

.tho-product-locked{
    display:inline-block;
    font-size:13px;
    line-height:1.4;
    color:#666;
    padding:8px 0;
}


/* THO REGALO v0.8.7 — acciones en Mis productos y Borradores */
.tho-product-delete{
    background:#9b1c1c !important;
    color:#ffffff !important;
    border:1px solid #9b1c1c !important;
}
.tho-product-delete:hover,
.tho-product-delete:focus{
    background:#7d1717 !important;
    color:#ffffff !important;
    border-color:#7d1717 !important;
}
.tho-product-reactivate{
    background:#00686e !important;
    color:#ffffff !important;
    border:1px solid #00686e !important;
}
.tho-product-reactivate:hover,
.tho-product-reactivate:focus{
    background:#72c1a8 !important;
    color:#111111 !important;
    border-color:#72c1a8 !important;
}
.tho-draft-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:14px;
    align-items:center;
}
.tho-draft-actions form{
    margin:0 !important;
}
@media (max-width:600px){
    .tho-draft-actions{
        flex-direction:column;
        align-items:stretch;
    }
    .tho-draft-actions .button,
    .tho-draft-actions form,
    .tho-draft-actions form button{
        width:100%;
        box-sizing:border-box;
    }
}


/* THO REGALO v0.8.8 — Borradores */
.tho-product-edit{
    background:#72c1a8 !important;
    color:#ffffff !important;
    border:1px solid #72c1a8 !important;
}
.tho-product-edit:hover,
.tho-product-edit:focus{
    background:#00686e !important;
    color:#ffffff !important;
    border-color:#00686e !important;
}


/* THO REGALO v0.8.9 — instalar acceso directo */
.tho-install-modal{
    display:none;
    position:fixed;
    inset:0;
    z-index:999999;
}
.tho-install-modal.is-open{
    display:block;
}
.tho-install-modal__backdrop{
    position:absolute;
    inset:0;
    background:rgba(17,17,17,.55);
}
.tho-install-modal__panel{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    width:min(92vw,460px);
    max-height:85vh;
    overflow:auto;
    box-sizing:border-box;
    background:#ffffff;
    color:#111111;
    border:2px solid #72c1a8;
    border-radius:14px;
    padding:28px;
}
.tho-install-modal__panel h3{
    color:#00686e;
    margin:0 40px 16px 0 !important;
}
.tho-install-modal__close{
    position:absolute;
    right:14px;
    top:10px;
    width:36px;
    height:36px;
    border:0;
    background:transparent;
    color:#111111;
    font-size:30px;
    line-height:1;
    cursor:pointer;
}
.tho-install-modal ol{
    padding-left:22px;
}
.tho-install-modal li{
    margin-bottom:8px;
}
.tho-install-native-button{
    width:100%;
    min-height:48px;
    border:0;
    border-radius:8px;
    background:#00686e;
    color:#ffffff;
    font-weight:700;
    cursor:pointer;
}
.tho-install-native-button:hover{
    background:#72c1a8;
    color:#111111;
}
.tho-install-fallback{
    margin-top:14px;
}
