/*
 Theme Name:     Twenty Twenty-Four Child
 Theme URI:      https://tu-sitio.com
 Description:    Tema Hijo para Óptica Lentes de Contacto
 Author:         Jonathan
 Template:       twentytwentyfour
 Version:        1.0.0
*/

/* ==========================================
   1. ESTILOS GLOBALES Y RESET
   ========================================== */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.woocommerce-products-header__title.page-title,
.woocommerce .page-title,
.catalogo-por-secciones .contenedor-subtitulo {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
}

/* ==========================================
   2. VISIBILIDAD DEL BUSCADOR Y FIBOSEARCH
   ========================================== */
.wp-block-search,
.header-search-wrapper,
.search-icon-container {
    display: none !important;
}

body.post-type-archive-product .wp-block-search,
body.post-type-archive-product .header-search-wrapper,
body.post-type-archive-product .search-icon-container,
body.tax-product_cat .wp-block-search,
body.tax-product_cat .header-search-wrapper,
body.tax-product_cat .search-icon-container,
body.tax-product_tag .wp-block-search,
body.tax-product_tag .header-search-wrapper,
body.tax-product_tag .search-icon-container,
body.single-product .wp-block-search,
body.single-product .header-search-wrapper,
body.single-product .search-icon-container {
    display: flex !important;
}

.dgwt-wcas-has-img,
.dgwt-wcas-suggestion,
.dgwt-wcas-suggestions-wrapp {
    z-index: 9999999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.dgwt-wcas-st-link,
.dgwt-wcas-st-thumb,
.dgwt-wcas-st-title {
    pointer-events: auto !important;
}

.site-header,
.header-container,
.header-actions,
.header-search,
.search-dropdown {
    overflow: visible !important;
}

/* ==========================================
   3. FICHA DE PRODUCTO INDIVIDUAL
   ========================================== */
.single-product .price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 20px !important;
}

.single-product .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 25px;
}

.single-product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 30px !important;
}

.single-product .quantity input.qty {
    width: 65px !important;
    height: 48px !important;
    border: 1px solid #cccccc !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background-color: #f9f9f9 !important;
}

.single-product .single_add_to_cart_button {
    height: 48px !important;
    background-color: #3B3B3B !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0 30px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

.single-product .single_add_to_cart_button:hover {
    background-color: #7DF9F1 !important;
    color: #1a1a1a !important;
    transform: translateY(-2px);
}

.single-product .stock {
    font-size: 14px;
    font-weight: 500;
    color: #2e7d32;
    margin-bottom: 15px;
}

.single-product .woocommerce-cart-form,
.single-product .cart-collaterals,
.single-product .wc-block-mini-cart,
.single-product .widget_shopping_cart,
.single-product div:has(> .cart-count) + div:not(.site-header),
.single-product .woocommerce-breadcrumb {
    display: none !important;
}

/* ==========================================
   4. FOOTER GLOBAL Y SUB-FOOTER
   ========================================== */
.main-footer {
    background-color: #111111;
    color: #ffffff;
    padding: 60px 20px 25px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
}

.footer-logo {
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.footer-brand-desc {
    font-size: 14px;
    color: #aaaaaa;
    line-height: 1.5;
    margin-bottom: 16px;
}

.footer-socials a {
    color: #ffffff;
    font-size: 13px;
    margin-right: 12px;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-socials a:hover {
    opacity: 1;
}

.footer-heading {
    font-size: 16px;
    margin-bottom: 18px;
    color: #ffffff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaaaaa;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #7DF9F1;
}

.footer-divider {
    height: 1px;
    background-color: #222222;
    margin: 40px 0 20px 0;
}

.sub-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #888888;
}

.sub-footer-legal a {
    color: #888888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sub-footer-legal a:hover {
    color: #ffffff;
}

.sub-footer-legal .sep {
    margin: 0 8px;
    color: #444444;
}

/* Botón turquesa con ícono de carrito en SVG */
.woocommerce-cart .button,
.woocommerce-cart .wp-block-button__link,
.wc-block-grid__product-add-to-cart button,
.wc-block-grid__product-add-to-cart .wp-block-button__link {
    background-color: #7DF9F1 !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
    line-height: 0 !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

/* Efecto hover */
.woocommerce-cart .button:hover,
.wc-block-grid__product-add-to-cart button:hover,
.wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
    background-color: #5ef5eb !important;
    transform: scale(1.08) !important;
}

/* Dibujar el ícono vectorial del carrito dentro del botón */
.woocommerce-cart .button::before,
.wc-block-grid__product-add-to-cart button::before,
.wc-block-grid__product-add-to-cart .wp-block-button__link::before {
    content: '' !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    background-color: #1a1a1a !important; /* Color oscuro para el carrito */
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>') no-repeat center / contain !important;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>') no-repeat center / contain !important;
}

.woocommerce-cart .button::after,
.wc-block-grid__product-add-to-cart .wp-block-button__link::after {
    display: none !important;
    content: none !important;
}

/* ==========================================
   5. REGLAS RESPONSIVAS
   ========================================== */
@media screen and (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sub-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
