/*
Theme Name: Tema Objeto
Description: Tema minimalista y elegante para WooCommerce, diseñado específicamente para Objeto Permanente. Incluye sidebar fijo, galería de productos optimizada, diseño responsive y customizer avanzado.
Version: 2.0.0
Author: Objeto Permanente
Author URI: https://objetopermanente.com
Text Domain: tema-objeto
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: e-commerce, custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, blog, portfolio, responsive, woocommerce
*/

/* ============================================================================
   RESET Y BASE
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000;
    background: #fff;
}

/* ============================================================================
   LAYOUT PRINCIPAL
   ============================================================================ */
body {
    overflow-x: hidden;
}

body.home {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ============================================================================
   SIDEBAR
   ============================================================================ */
.sidebar {
    /* Los estilos de background, backdrop-filter y padding se aplican dinámicamente desde PHP */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1001;
    transform: translateX(0);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-text {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #000;
    text-transform: uppercase;
}

.logo-image {
    max-width: 100%;
    height: auto;
}

/* ============================================================================
   NAVEGACIÓN DEL SIDEBAR
   ============================================================================ */
.sidebar-nav {
    flex: 1;
    margin-bottom: 40px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 15px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 0;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.sidebar-nav a:hover {
    color: #666;
    border-bottom-color: #000;
}

.sidebar-nav a.active {
    color: #000;
    font-weight: 400;
}

/* ============================================================================
   SIDEBAR FOOTER
   ============================================================================ */
.sidebar-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.sidebar-footer .widget {
    margin-bottom: 15px;
}

.sidebar-footer select {
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #000;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-footer select:focus {
    outline: none;
}

/* ============================================================================
   BOTÓN MÓVIL
   ============================================================================ */
.mobile-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1002;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #000;
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ============================================================================
   OVERLAY
   ============================================================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================================
   CONTENIDO PRINCIPAL
   ============================================================================ */
.main-content {
    margin-left: 0;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ============================================================================
   SLIDER DEL HOME
   ============================================================================ */
.home-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active,
.slider-dot:hover {
    background: #fff;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.footer {
    background: #000;
    color: #fff;
    padding: 60px 0 30px;
    position: relative;
    z-index: 100;
    width: 100%;
    clear: both;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-logo {
    text-align: center;
    margin-bottom: 20px;
}

.footer-logo .logo-text {
    color: #fff;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-section h3 {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section p,
.footer-section a {
    font-size: 12px;
    line-height: 1.8;
    color: #ccc;
    text-decoration: none;
    font-weight: 300;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    margin-top: 40px;
}

.footer-bottom p {
    font-size: 11px;
    color: #999;
    font-weight: 300;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .home-slider {
        height: 100vh;
    }
    
    .slider-nav {
        bottom: 20px;
    }
}

@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .main-content {
        margin-left: 310px !important;
        width: calc(100% - 310px) !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .mobile-toggle {
        display: none !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    /* Asegurar que el contenido respete el sidebar */
    .container {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

/* ============================================================================
   UTILIDADES
   ============================================================================ */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ============================================================================
   ANIMACIONES
   ============================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease;
}

.slide-in-right {
    animation: slideInRight 0.3s ease;
}