/*
Theme Name: Hub
Theme URI: https://hub.liquid-themes.com/
Author: Liquid Themes
Author URI: https://themeforest.net/user/liquidthemes
Description: Smart, Powerful and Unlimited Customizable WordPress Theme.
Version: 4.4.1
License: GNU General Public License
License URI: license.txt
Text Domain: hub
Tags: responsive, retina, rtl-language-support, blog, portfolio, custom-colors, live-editor
*/

/*--------------------------------------------------------------
Accessibility
--------------------------------------------------------------*/
/* Text meant only for screen readers. */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:hover,
.screen-reader-text:active,
.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	color: #21759b;
	display: block;
	font-size: 14px;
	font-size: 0.875rem;
	font-weight: bold;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
	/* Above WP toolbar. */
}

/*--------------------------------------------------------------
Alignments
--------------------------------------------------------------*/
.alignleft {
	display: inline;
	float: left;
	margin-right: 1.5em;
}

.alignright {
	display: inline;
	float: right;
	margin-left: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/*--------------------------------------------------------------
Captions
--------------------------------------------------------------*/
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin: 0 auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

/*--------------------------------------------------------------
Galleries
--------------------------------------------------------------*/
.gallery {
	margin-bottom: 1.5em;
}

.gallery-item {
	display: inline-block;
	vertical-align: top;
	width: 100%;
	padding-left: 5px;
	padding-right: 5px;
}

.gallery-columns-2 .gallery-item {
	max-width: 50%;
}

.gallery-columns-3 .gallery-item {
	max-width: 33.33%;
}

.gallery-columns-4 .gallery-item {
	max-width: 25%;
}

.gallery-columns-5 .gallery-item {
	max-width: 20%;
}

.gallery-columns-6 .gallery-item {
	max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
	max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
	max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
	max-width: 11.11%;
}

.gallery-caption {
	display: block;
}

.wp-block-gallery {
	margin-bottom: 1em;
}

.blocks-gallery-caption {
	margin-top: 0;
}

/*--------------------------------------------------------------
Button
--------------------------------------------------------------*/
.wp-block-button__link {
	--wp-btn-border-radius: 1.5em;
	border-radius: var(--wp-btn-border-radius);
	line-height: 1.35em;
}

.wp-block-button.is-style-squared .wp-block-button__link {
	--wp-btn-border-radius: 0;
}

/*--------------------------------------------------------------
Cover
--------------------------------------------------------------*/
.wp-block-cover.has-background-dim {
	color: #fff;
}

.wp-block-cover.has-background-dim a {
	color: inherit;
}

.wp-block-group.has-background,
.has-background {
	margin-bottom: 1.5em;
}

/*--------------------------------------------------------------
Blockquote
--------------------------------------------------------------*/
.wp-block-pullquote blockquote {
	border: none;
}


/*--------------------------------------------------------------
Galeria productos
--------------------------------------------------------------*/
/* Estilos para galería vertical tipo Shopify */
.lqd-woo-single-images {
    position: relative;
}

/* Contenedor principal de la galería */
.woocommerce-product-gallery {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: flex-start;
}

/* Columna de thumbnails verticales */
.flex-control-thumbs {
    display: flex !important;
    flex-direction: column !important;
    order: 1;
    width: 80px;
    max-height: 500px;
    overflow-y: auto;
    gap: 8px;
    padding-right: 10px;
}

.flex-control-thumbs li {
    width: 80px !important;
    height: 80px !important;
    margin: 0 !important;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.flex-control-thumbs li.flex-active-slide {
    border-color: #007cba;
}

.flex-control-thumbs li:hover {
    border-color: #999;
}

.flex-control-thumbs li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

/* Imagen principal */
.woocommerce-product-gallery__wrapper {
    order: 2;
    flex: 1;
    max-width: calc(100% - 95px);
}

.woocommerce-product-gallery__image {
    margin: 0 !important;
    width: 100% !important;
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Scrollbar personalizada para thumbnails */
.flex-control-thumbs::-webkit-scrollbar {
    width: 4px;
}

.flex-control-thumbs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.flex-control-thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.flex-control-thumbs::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Botones de navegación (opcional) */
.flex-direction-nav {
    display: none; /* Ocultar flechas ya que usamos thumbnails */
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce-product-gallery {
        flex-direction: column;
    }
    
    .flex-control-thumbs {
        flex-direction: row !important;
        width: 100% !important;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        order: 2;
        margin-top: 15px;
        padding-right: 0;
        padding-bottom: 10px;
    }
    
    .flex-control-thumbs li {
        flex-shrink: 0;
        width: 60px !important;
        height: 60px !important;
    }
    
    .woocommerce-product-gallery__wrapper {
        order: 1;
        max-width: 100%;
    }
}

/* Ajustes adicionales para el tema Liquid */
.lqd-woo-single-images .woocommerce-product-gallery {
    margin: 0;
}

/* Efectos de hover en imagen principal */
.woocommerce-product-gallery__image:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Indicador de zoom (si está habilitado) */
.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce-product-gallery__trigger:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

/* Ajustes para variaciones de productos */
.variations_form .variations {
    margin-top: 20px;
}

/* Loader para cambio de imágenes */
.woocommerce-product-gallery__image.loading {
    opacity: 0.7;
}

.woocommerce-product-gallery__image.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}