/* Adaptaciones a WordPress — el diseño base son las hojas originales de /legacy */

/* Cabecera: buscador */
#search .search form { position: relative; }
#search .hs-search-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: #6d0000; padding: 4px 8px; cursor: pointer; font-size: 15px; line-height: 1; box-shadow: none; }
#search .search-query { padding-right: 32px; }

/* Pase de imágenes de portada */
#showplus_images_slider { border-style: none; height: 382px; width: 1170px; max-width: 100%; position: relative; }
#showplus_images_slider .showplus, #showplus_images_slider .showplus-images { height: 382px; width: 1170px; max-width: 100%; position: relative; overflow: hidden; margin: 0; padding: 0; list-style: none; }
#showplus_images_slider .showplus-images li { margin: 0; padding: 0; list-style: none; width: 100%; height: 100%; }
#showplus_images_slider .showplus-images img { width: 100%; height: 100%; object-fit: cover; display: block; }
#showplus_images_slider .showplus-navigation { display: none; }
@media (max-width: 1199px) { #showplus_images_slider, #showplus_images_slider .showplus, #showplus_images_slider .showplus-images { height: auto; aspect-ratio: 1170 / 382; } }
/* En móvil el banner es el doble de alto: la foto rellena el hueco recortada desde el centro */
@media (max-width: 767px) { #showplus_images_slider, #showplus_images_slider .showplus, #showplus_images_slider .showplus-images { aspect-ratio: 1170 / 764; } #showplus_images_slider .showplus-images img { object-position: 50% 50%; } #showplus_images_slider img[src*="banner-04"] { object-position: 40% 50%; } #showplus_images_slider img[src*="banner-06"] { object-position: 68% 50%; } }

/* Banda de accesos (promo) */
#promo .moduletable_content table { max-width: 100%; }
#promo .moduletable_content img { max-width: 100%; height: auto; }

/* Botones de compartir (sustituyen a "Me gusta" / "Tweet") */
.hs-share { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; }
.hs-share-btn { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 3px; color: #fff !important; font: bold 11px/22px Arial, sans-serif; text-decoration: none !important; }
.hs-share-btn svg { width: 13px; height: 13px; fill: #fff; }
.hs-share-fb { background: #1877f2; }
.hs-share-x { background: #000; }
.hs-share-wa { background: #25d366; }
.hs-share-btn:hover { opacity: .85; }

/* Contenido migrado: imágenes responsivas sin romper los flotados del original */
.hs-content img, .hs-intro img, .category-desc img { max-width: 100%; height: auto; }
.hs-content iframe, .hs-intro iframe { max-width: 100%; }
.hs-content table { max-width: 100%; }
.hs-content audio { max-width: 100%; }
.alignleft { float: left; margin: 0 15px 10px 0; }
.alignright { float: right; margin: 0 0 10px 15px; }
.aligncenter { display: block; margin: 0 auto 10px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: #888; text-align: center; }

/* Lightbox (antes Slimbox) */
.hs-lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); z-index: 99999; display: none; align-items: center; justify-content: center; flex-direction: column; padding: 20px; }
.hs-lightbox.on { display: flex; }
.hs-lightbox img { max-width: 95vw; max-height: 85vh; box-shadow: 0 0 30px #000; background: #fff; padding: 6px; }
.hs-lb-close { position: absolute; top: 10px; right: 18px; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; }
.hs-lb-cap { color: #eee; margin-top: 8px; }

/* Agenda (aspecto de DPCalendar) */
.hs-agenda-nav { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 8px; gap: 6px; }
.hs-agenda-nav .btn-group { display: flex; flex: 0 0 auto; }
.hs-agenda-nav .btn-mini { padding: 4px 12px; font-size: 14px; line-height: 20px; border: 1px solid #ccc; background: linear-gradient(#fff, #e6e6e6); color: #333; border-radius: 0; margin-left: -1px; }
.hs-agenda-nav .btn-mini.active { background: #ddd; box-shadow: inset 0 2px 4px rgba(0,0,0,.15); }
.hs-agenda-izq .btn-mini:nth-child(3) { margin-left: 8px; }
.hs-agenda-nav h2.hs-agenda-titulo { margin: 0; background: none; text-align: center; flex: 1; }
.hs-calendario { width: 100%; border-collapse: collapse; table-layout: fixed; }
.hs-calendario th { background: none; color: #333; padding: 4px 2px; font-weight: bold; font-size: 12px; text-align: center; border: 1px solid #ddd; }
.hs-calendario td { border: 1px solid #ddd; vertical-align: top; height: 90px; padding: 2px 4px; font-size: 12px; background: #fff; }
.hs-calendario td.vacio .num { color: #bbb; }
.hs-calendario td.hoy { background: #fcf8e3; }
.hs-calendario .num { display: block; color: #555; font-size: 13px; text-align: right; }
.hs-calendario .acto { display: block; background: #6d0000; color: #fff !important; border-radius: 3px; padding: 1px 4px; margin-bottom: 2px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.hs-agenda-lista { margin: 10px 0 0 18px; }
.hs-agenda-lista .fecha { color: #6d0000; font-weight: bold; }
@media (max-width: 767px) { .hs-calendario td { height: auto; } .hs-agenda-nav { flex-wrap: wrap; } .hs-agenda-nav h2.hs-agenda-titulo { order: -1; flex-basis: 100%; } }
@media print { #header, #sidebar, #footer, #icecarousel, .hs-agenda-nav .btn-group { display: none !important; } }
.dp-upcoming-calendar { float: left; width: 44px; text-align: center; margin: 0 10px 4px 0; position: relative; border: 1px solid #ddd; }
.dp-upcoming-calendar-background { height: 12px; }
.dp-upcoming-text-month { font-size: 10px; text-transform: uppercase; color: #6d0000; }
.dp-upcoming-text-day { font-size: 20px; font-weight: bold; line-height: 24px; }

/* Vídeos */
#avs_gallery .avs_thumb_inner { display: block; text-decoration: none; }
#avs_gallery .avs_img_container { display: block; }
#avs_gallery .avs_clear { clear: both; }
.hs-video-player { position: relative; padding-top: 56.25%; margin-bottom: 15px; }
.hs-video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Formularios */
.hs-hp { position: absolute !important; left: -9999px !important; }
.hs-form-ok, .hs-bol-msg { background: #e6efc2; border: 1px solid #c6d880; padding: 10px; color: #264409; }
.acyterms { font-size: 12px; }

/* Galerías */
.gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery .gallery-item { margin: 0; }
.gallery img { border: 0 !important; }

/* Mapas incrustados */
.hs-mapa { max-width: 100%; }

/* Ajustes generales */
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
img { max-width: 100%; }

/* Iconos de redes (renovados) */
.hs-redes { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.hs-red { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #6d0000; transition: transform .15s, background .15s; }
.hs-red svg { width: 18px; height: 18px; fill: #fff; }
.hs-red:hover { transform: translateY(-2px); }
.hs-red-facebook:hover { background: #1877f2; }
.hs-red-x:hover { background: #000; }
.hs-red-youtube:hover { background: #ff0000; }
.hs-red-flickr:hover { background: #0063dc; }
.hs-red-whatsapp:hover { background: #25d366; }
.hs-red-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.hs-red-agenda:hover { background: #a30000; }
.hs-contacta { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border-radius: 16px; background: #6d0000; color: #fff !important; font-weight: bold; font-size: 12px; text-decoration: none !important; white-space: nowrap; }
.hs-contacta svg { width: 16px; height: 16px; fill: #fff; }
.hs-contacta:hover { background: #a30000; }

/* Banners aleatorios (se muestra uno al azar) */
.hs-aleatorio .hs-banner + .hs-banner { display: none; }
.hs-aleatorio.js .hs-banner { display: none; }
.hs-aleatorio.js .hs-banner.on { display: block; }
.hs-banner img { max-width: 100%; height: auto; }
.hs-fb-page iframe { width: 100%; }
#avs_pagination .counter { display: none; }

/* Tienda (presentación de HikaShop) */
.hikashop_products .hikashop_product { float: left; margin-bottom: 15px; margin-right: 1.33%; }
.hikashop_products .hikashop_product_column_4 { margin-right: 0; }
.hikashop_products .hikashop_product_column_1 { clear: left; }
.hikashop_products .hikashop_subcontainer { text-align: center; border: 0; box-shadow: none; }
.hikashop_products .hikashop_product_image { display: flex; align-items: center; justify-content: center; }
.hikashop_products .hikashop_product_price_full { text-align: center; display: block; }
.hikashop_products .hikashop_product_stock table { margin: 4px auto; }
.hikashop_products .hikashop_product_quantity_field { width: 25px; text-align: center; }
@media (max-width: 979px) { .hikashop_products .hikashop_product { width: 48% !important; margin-right: 4% !important; } .hikashop_products .hikashop_product_column_2, .hikashop_products .hikashop_product_column_4 { margin-right: 0 !important; } .hikashop_products .hikashop_product_column_3 { clear: left; } }
@media (max-width: 600px) { .hikashop_products .hikashop_product { width: 100% !important; float: none; margin-right: 0 !important; } }
#sidebar .acymailing_module .button.btn-primary, .woocommerce #sidebar .button.subbutton { background: #0074cc linear-gradient(#0088cc, #0044cc); color: #fff; border-color: #0044cc; }

#copyright .widget { margin-bottom: 0; }
.hikashop_products .hikashop_product_name, .hikashop_products .hikashop_product_name a { text-align: center; color: #6d0000; }
#acymodifyform label.radio { display: inline-block; padding-left: 18px; margin-right: 10px; }
#acymodifyform td.acystatus { white-space: nowrap; }
#acymodifyform legend { margin-bottom: 10px; }
.woocommerce .hikashop_products input.button.hikashop_cart_input_button { font-weight: normal; font-size: 12px; padding: 4px 10px; background: linear-gradient(#fff, #e6e6e6); color: #333; border: 1px solid #ccc; border-radius: 4px; }
.woocommerce #sidebar input.button, .woocommerce #sidebar .button { font-weight: normal; font-size: 13px; padding: 4px 12px; border-radius: 4px; }
.woocommerce #sidebar .acymailing_module input.button { padding: 4px 12px; font-size: 14px; line-height: 20px; height: 30px; }
.woocommerce div.product form.cart .button, .woocommerce .button.alt { background: #6d0000 !important; color: #fff !important; }
.woocommerce div.product p.price { color: #2c8296; font-style: italic; }
/* Móvil: las fotos flotantes de las noticias pasan a ocupar el ancho para que el texto no quede estrecho */
@media (max-width: 600px) {
  .hs-content img[style*="float"], .hs-intro img[style*="float"], .hs-content img[align], .hs-intro img[align],
  .hs-content a.hs-zoom[style*="float"], .hs-intro a.hs-zoom[style*="float"], .category-desc img[style*="float"] { float: none !important; display: block; margin: 0 auto 10px !important; max-width: 100%; height: auto; }
  .hs-content table, .hs-content tbody, .hs-content tr, .hs-content td { max-width: 100%; }
}
.ice-megamenu-toggle a, .ice-megamenu-toggle a:hover, .ice-megamenu-toggle a:focus { color: #fff; text-decoration: none; }

/* Boletín (página): como el componente AcyMailing */
#acymodifyform { font-size: 14px; }
#acymodifyform table.acymailing_form td, #acymodifyform #acyuserinfo td, #acymodifyform #acyusersubscription td { padding: 4px 6px; font-size: 14px; }
#acymodifyform td.key { width: 150px; }
#acymodifyform .list_name { font-size: 14px; font-weight: bold; }
#acymodifyform .list_description { font-size: 13px; }
/* Tienda: fotos de producto en caja cuadrada con el producto entero (como las miniaturas 250x250 de HikaShop) */
.hikashop_products .hikashop_product_image_subdiv { width: 218px !important; height: 218px; display: flex; align-items: center; justify-content: center; background: #fff; }
.hikashop_products .hikashop_product_listing_image { max-width: 218px !important; max-height: 218px !important; width: auto; height: auto; }
.hikashop_products_pagination_bottom { clear: both; padding: 6px 0; font-size: 12px; color: #666; }
.hikashop_products_pagination_bottom .hikashop_results_counter { float: right; }

/* Paginación de vídeos: altura según contenido (en móvil se parte en dos filas y no debe solaparse con lo siguiente) */
div #avs_pagination { height: auto; overflow: hidden; }
div #avs_pagination ul { overflow: hidden; }
div #avs_pagination ul li { margin-bottom: 4px; }

/* Fotos ampliables: cursor de lupa */
a.hs-zoom { cursor: zoom-in; }
.hs-lightbox img { cursor: zoom-out; }
.hs-lightbox { z-index: 2147483000; }
