:root {
    --primary: #276955;
    --primary-light: #92d4bb;
    --secondary: #00c77c;
    --secondary-hover: #00a868;
    --secondary-accent: #40e395;
    --bg-main: #ffffff;
    --bg-secondary: #f4f7f5;
    --bg-card: #ffffff;
    --text-main: #0e1512;
    --text-muted: #5e6863;
    --border-color: #e2e8df;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 199, 124, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 199, 124, 0.12);
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   RESET & CORE BASE
   ========================================================================== */
.hidden { display: none !important; }


h1, h2, h3, .font-headline {
    font-family: 'Syne', sans-serif;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    line-height: 1.5;
}

/* Header & Navbar */
.header-tienda {
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-brand {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: -0.5px;
}

.logo-brand span {
    color: var(--secondary);
}

.search-box {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    border: 1.5px solid var(--border-color);
    border-radius: 9999px;
    background: var(--bg-secondary);
    outline: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.search-box input:focus {
    background: var(--bg-main);
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 199, 124, 0.15);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-cart {
    background: var(--secondary);
    color: #002110;
    border: none;
    padding: 0.65rem 1.3rem;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 199, 124, 0.25);
}

.btn-cart:hover {
    background: var(--secondary-accent);
    transform: translateY(-1px);
}

.cart-count {
    background: #002110;
    color: var(--secondary-accent);
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Layout Principal */
.main-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
}

/* Sidebar Filtros */
.sidebar-filters {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-list {
    list-style: none;
}

.filter-item {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 600;
    transition: all 0.2s;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.filter-item:hover, .filter-item.active {
    background: rgba(0, 199, 124, 0.1);
    color: #006c41;
    border-left: 3px solid var(--secondary);
}

/* Catalogo Productos Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.product-img-wrap {
    background: #f8faf8;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.product-img-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.3rem;
    font-family: 'JetBrains Mono', monospace;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    cursor: pointer;
}

.product-title:hover {
    color: var(--secondary-hover);
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
}

.btn-add-cart {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: var(--secondary);
    color: #002110;
    border-color: var(--secondary);
}

/* Modal Detalle */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 21, 18, 0.6);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-backdrop.open {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.btn-close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   HEADER & USER DROPDOWNS
   Garantiza visibilidad por hover en desktop o clase .show por clic
   ========================================================================== */
.group:hover > #dropdown-office,
.group:hover > #dropdown-windows,
.group\/user:hover > #user-dropdown-menu,
#dropdown-office.show,
#dropdown-windows.show,
#user-dropdown-menu.show,
.user-dropdown-menu.show {
    display: block !important;
}

/* ==========================================================================
   SLIDER CTA WRAPPER
   Posiciona el botón de acción centrado en la mitad izquierda del slider
   ========================================================================== */
.slider-cta-wrap {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
@media (min-width: 640px) {
    .slider-cta-wrap {
        bottom: 2.5rem;
        left: 33%;
    }
}

