/*
 Theme Name:   OceanWP Child - Creative Group
 Theme URI:    https://creativegroup.com.ar
 Description:  Child theme de OceanWP para Creative Group (catálogo sin precios)
 Author:       Creative Group
 Template:     oceanwp
 Version:      1.1.0
*/

/* ===== VARIABLES DE MARCA ===== */
:root {
    --cg-primary: #1a1a2e;
    --cg-secondary: #16213e;
    --cg-accent: #0f3460;
    --cg-highlight: #e94560;
    --cg-green: #25D366;
    --cg-light: #f8f9fa;
    --cg-text: #333333;
    --cg-text-light: #666666;
}

/* ===== TIPOGRAFÍA ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--cg-text);
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--cg-primary);
}

/* ===== HEADER ===== */
#site-header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Ocultar barra de título de página (Home, Nosotros, Productos, etc.) */
header.page-header,
.page-header {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* ===== MODO CATÁLOGO: OCULTAR PRECIOS Y CARRITO ===== */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    display: none !important;
}
.woocommerce ul.products li.product .button.add_to_cart_button,
.woocommerce ul.products li.product a.added_to_cart,
.woocommerce div.product form.cart,
.woocommerce div.product .single_add_to_cart_button {
    display: none !important;
}

/* ===== GRILLA DE PRODUCTOS ===== */
/* Forzar grilla con filas de igual altura */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    align-items: stretch;
}
.woocommerce ul.products li.product {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
/* Link wrapper: ocupa todo el espacio disponible */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link,
.woocommerce ul.products li.product > a {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
/* Imagen: altura fija, centrada, sin deformar */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link img {
    width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
    background: #f8f8f8;
    border-radius: 8px 8px 0 0;
}
/* Título: altura fija con truncado a 2 líneas */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--cg-primary);
    padding: 10px 12px 5px;
    height: 52px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
/* Categoría encima del título */
.woocommerce ul.products li.product .posted_in,
.woocommerce ul.products li.product span.posted_in {
    font-size: 11px;
    padding: 4px 12px 0;
    display: block;
    color: var(--cg-text-light);
    height: 20px;
    overflow: hidden;
}
/* Botón "Leer más" siempre abajo */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
    margin-top: auto !important;
    margin-bottom: 12px;
    margin-left: 12px;
    align-self: flex-start;
}
.woocommerce ul.products li.product img {
    border-radius: 8px 8px 0 0;
}

/* ===== BOTÓN CONSULTAR (WhatsApp) ===== */
.cg-consultar-btn {
    display: inline-block;
    background-color: var(--cg-green);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    margin-top: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}
.cg-consultar-btn:hover {
    background-color: #128C7E;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,211,102,0.4);
}
.cg-consultar-btn i {
    margin-right: 8px;
}

/* ===== GRILLA DE CATEGORÍAS (HOME) ===== */
.cg-categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
.cg-cat-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--cg-secondary);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}
.cg-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}
.cg-cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.cg-cat-card:hover img {
    opacity: 0.9;
}
.cg-cat-card .cg-cat-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
}

/* ===== HERO SECTION ===== */
.cg-hero {
    background: linear-gradient(135deg, var(--cg-primary), var(--cg-accent));
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}
.cg-hero h1 {
    color: #fff;
    font-size: 42px;
    margin-bottom: 15px;
}
.cg-hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}
.cg-hero .cg-btn-primary {
    display: inline-block;
    background: var(--cg-highlight);
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}
.cg-hero .cg-btn-primary:hover {
    background: #d63851;
    transform: translateY(-2px);
}

/* ===== SIDEBAR FILTROS ===== */
.widget_layered_nav ul li,
.widget_product_categories ul li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}
.widget_layered_nav ul li a,
.widget_product_categories ul li a {
    color: var(--cg-text);
    text-decoration: none;
    transition: color 0.2s;
}
.widget_layered_nav ul li a:hover,
.widget_product_categories ul li a:hover {
    color: var(--cg-accent);
}

/* ===== PRODUCTO INDIVIDUAL ===== */
.woocommerce div.product .product_title {
    font-size: 26px;
    color: var(--cg-primary);
}
.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--cg-text-light);
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.cg-whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 5000;
    transition: transform 0.3s;
}
.cg-whatsapp-float:hover {
    transform: scale(1.1);
}
.cg-whatsapp-float img {
    max-height: 65px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* ===== CONTACTO ===== */
.cg-contacto-info {
    background: var(--cg-light);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.cg-contacto-info p {
    margin-bottom: 10px;
    font-size: 15px;
}
.cg-contacto-info a {
    color: var(--cg-accent);
    font-weight: 600;
}

/* ===== BUSCADOR ===== */
.woocommerce-product-search {
    display: flex;
    gap: 8px;
}
.woocommerce-product-search .search-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.woocommerce-product-search button {
    background: var(--cg-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.3s;
}
.woocommerce-product-search button:hover {
    background: var(--cg-primary);
}

/* ===== SUBMENÚ CATÁLOGOS (mismo estilo que Productos) ===== */
.cg-menu-catalogos {
    position: relative;
}
.cg-menu-catalogos > .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    border-radius: 0 0 4px 4px;
    padding: 10px 0;
    z-index: 9999;
    list-style: none;
    margin: 0;
}
.cg-menu-catalogos:hover > .sub-menu,
.cg-menu-catalogos:focus-within > .sub-menu {
    display: block;
}
.cg-menu-catalogos > .sub-menu li {
    margin: 0;
}
.cg-menu-catalogos > .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--cg-text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, padding-left 0.15s;
    white-space: nowrap;
}
.cg-menu-catalogos > .sub-menu a:hover {
    background: rgba(0,0,0,.04);
    padding-left: 26px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .cg-hero h1 { font-size: 28px; }
    .cg-hero { padding: 50px 15px; }
    .cg-categorias-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cg-cat-card .cg-cat-label {
        font-size: 13px;
        padding: 10px;
    }
}
