/* =============================================
   BUTTONS — remove letter-spacing from theme
   ============================================= */
.site-button,
.site-button-secondry { letter-spacing: 0 !important; }

/* =============================================
   INNER PAGE BANNERS
   ============================================= */
.sx-bnr-inr { height: 350px; }

/* =============================================
   INNER PAGE BANNERS & SEPARATORS
   ============================================= */
.bnr-bg-5 { background-image: url('/images/banner/5.jpg'); }
.sx-separator-cross { background-image: url('/images/background/cross-line2.png'); }
.prod-mfp-hidden { display: none; }

/* =============================================
   PRODUCTOS — Sidebar
   ============================================= */
.side-bar { border-right: 1px solid #f0f0f0; }
.widget-title { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #C9B59A; }

/* Search input alignment */
#form-search .input-group { flex-wrap: nowrap; }
#form-search .input-group .form-control { height: 38px; font-size: 14px; padding: 6px 12px; border-radius: 4px 0 0 4px; }
#form-search .input-group-append .btn { height: 38px; line-height: 1; padding: 0 14px; border-radius: 0 4px 4px 0; }

/* Category list */
.category-list { margin: 0; padding: 0; }
.category-list li { border-bottom: 1px solid #f4f4f4; }
.category-list li a,
.category-list li .cat-parent-toggle { display: block; padding: 8px 0; color: #4A4843; font-size: 14px; text-decoration: none; cursor: pointer; transition: color 0.2s; }
.category-list li a:hover,
.category-list li .cat-parent-toggle:hover { color: #C9B59A; }
.category-list li.active > a { color: #C9B59A; font-weight: 600; }
.cat-parent-toggle { display: flex !important; align-items: center; justify-content: space-between; }
.cat-arrow { font-size: 11px; color: #aaa; }
.cat-children { margin: 0; padding: 0 0 6px 14px; }
.cat-children li { border-bottom: none; }
.cat-children li a { padding: 5px 0; font-size: 13px; color: #4A4843; }
.cat-children li.active > a { color: #C9B59A; font-weight: 600; }
.cat-children.collapsed { display: none; }

/* Results header */
.productos-header { border-bottom: 1px solid #eee; padding-bottom: 12px; }
.productos-count { font-size: 13px; }

/* =============================================
   PRODUCTOS — Product card (listado y detalle)
   ============================================= */
.producto-card { background: #fff; border: 1px solid #eee; border-radius: 4px; overflow: hidden; transition: box-shadow 0.3s; height: 100%; display: flex; flex-direction: column; }
.producto-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }
.producto-card-img { position: relative; overflow: hidden; aspect-ratio: 3/4; background: #f8f8f8; display: block; cursor: pointer; }
a.producto-card-img { text-decoration: none; }
.producto-card-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform 0.4s ease; display: block; }
.producto-card:hover .producto-card-img img { transform: scale(1.05); }
.producto-card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 40px; }
.producto-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.producto-codigo { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }
.producto-nombre { font-size: 14px; font-weight: 600; color: #2C2A26; margin: 0; line-height: 1.4; flex: 1; }
.producto-card-body .btn { font-size: 12px; padding: 6px 14px; }
.producto-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.producto-card-actions .btn { flex: 1 1 auto; }
.producto-card-actions .btn-agregar-carrito-list i { margin-right: 4px; }

/* =============================================
   PRODUCTOS — Pagination
   ============================================= */
.pagination { gap: 4px; }
.pagination .page-item .page-link {
    border: none;
    border-radius: 4px;
    color: #4A4843;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 13px;
    background: #f4f4f4;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.pagination .page-item .page-link:hover { background: #e0e0e0; color: #2C2A26; }
.pagination .page-item.active .page-link { background: #C9B59A; color: #fff; }
.pagination .page-item.active .page-link:hover { background: #A89175; }
.pagination .page-item.disabled .page-link { background: transparent; color: #ccc; cursor: default; }

/* =============================================
   PRODUCTO DETALLE — Gallery
   ============================================= */
.prod-gallery { display: flex; flex-direction: column; gap: 12px; }
.prod-main-wrap { position: relative; background: #f8f8f8; border-radius: 6px; overflow: hidden; aspect-ratio: 4/3; }
.prod-main-wrap a { display: block; width: 100%; height: 100%; }
#prod-main-img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; transition: opacity 0.2s; }
.prod-zoom-btn { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,0.45); border: none; color: #fff; width: 36px; height: 36px; border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.prod-zoom-btn:hover { background: rgba(0,0,0,0.7); }

/* Thumbnails */
.prod-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-thumb { border: 2px solid transparent; border-radius: 4px; padding: 0; background: #f8f8f8; cursor: pointer; overflow: hidden; width: 72px; height: 72px; flex-shrink: 0; transition: border-color 0.2s; }
.prod-thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.prod-thumb.active,
.prod-thumb:hover { border-color: #C9B59A; }

/* No image placeholder */
.prod-no-img { background: #f8f8f8; border-radius: 6px; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 60px; }

/* =============================================
   PRODUCTO DETALLE — Info panel
   ============================================= */
.prod-info { padding: 10px 0 0 20px; }
.prod-codigo { font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 10px; }
.prod-nombre { font-size: 26px; font-weight: 700; color: #2C2A26; margin: 0 0 20px; line-height: 1.3; }
.prod-descripcion { color: #4A4843; font-size: 15px; line-height: 1.8; margin-bottom: 30px; border-top: 1px solid #eee; padding-top: 20px; }
/* Specs: garantía y tiempo de entrega */
.prod-specs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; padding: 20px; background: #f8f8f8; border-radius: 6px; }
.prod-spec-item { display: flex; align-items: flex-start; gap: 14px; }
.prod-spec-item > .fa { font-size: 20px; color: #C9B59A; margin-top: 2px; flex-shrink: 0; }
.prod-spec-item > div { display: flex; flex-direction: column; gap: 2px; }
.prod-spec-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: #999; }
.prod-spec-value { font-size: 14px; font-weight: 600; color: #2C2A26; }

.prod-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Badges de certificaciones */
.prod-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.prod-badge { width: 56px; height: 56px; object-fit: contain; padding: 6px; background: #fff; border: 1px solid #eee; border-radius: 6px; transition: transform 0.2s, box-shadow 0.2s; }
.prod-badge:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* Variantes (color y chips) */
.prod-variantes { margin: 0 0 28px; display: flex; flex-direction: column; gap: 18px; }
.prod-variante { padding-bottom: 4px; }
.prod-variante-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #999; margin: 0 0 10px; }

.prod-color-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.prod-color-item { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 64px; }
.prod-color-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #ddd; cursor: pointer; padding: 0; transition: box-shadow 0.2s, transform 0.2s; }
.prod-color-swatch:hover { transform: scale(1.08); box-shadow: 0 0 0 1px #C9B59A; }
.prod-color-swatch.active { box-shadow: 0 0 0 2px #C9B59A; transform: scale(1.08); }
.prod-color-name { font-size: 11px; color: #4A4843; text-align: center; line-height: 1.2; word-break: break-word; }

.prod-chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.prod-chip-list > li { display: inline-flex; flex: 0 0 auto; }
.prod-chip { background: #fff; color: #2C2A26; border: 1px solid #ddd; border-radius: 20px; padding: 6px 14px; font-size: 12.5px; font-weight: 500; line-height: 1.3; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.prod-chip:hover { border-color: #C9B59A; color: #C9B59A; }
.prod-chip.active { background: #C9B59A; border-color: #C9B59A; color: #fff; }

/* Archivos descargables */
.prod-archivos { border-top: 1px solid #eee; padding-top: 20px; }
.prod-archivos-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #999; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.prod-archivos-title .fa { color: #C9B59A; }
.prod-archivos-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.prod-archivo-item { display: flex; }
.prod-archivo-item a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; aspect-ratio: 1 / 1; padding: 12px 8px; background: #f8f8f8; border: 1px solid #eee; border-radius: 8px; color: #2C2A26; text-decoration: none; text-align: center; transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.prod-archivo-item a:hover { background: #fff; border-color: #C9B59A; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.prod-archivo-item .fa { font-size: 40px; color: #C9B59A; line-height: 1; }
.prod-archivo-item .fa-file-pdf-o { color: #c0392b; }
.prod-archivo-item .fa-file-image-o { color: #2980b9; }
.prod-archivo-nombre { font-size: 12px; font-weight: 500; line-height: 1.3; width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }

/* =============================================
   CARRITO — Navbar icon
   ============================================= */
.carrito-icon-link { position: relative; display: inline-flex; align-items: center; }
.carrito-counter { position: absolute; top: -8px; right: -10px; background: #C9B59A; color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.carrito-counter--hidden { display: none !important; }

/* Toast notification */
.carrito-toast { position: fixed; bottom: 30px; right: 30px; background: #2C2A26; color: #fff; padding: 14px 20px; border-radius: 6px; font-size: 14px; display: flex; align-items: center; gap: 10px; z-index: 9999; opacity: 0; transform: translateY(10px); transition: opacity 0.25s, transform 0.25s; max-width: 320px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.carrito-toast .fa { color: #C9B59A; font-size: 18px; flex-shrink: 0; }
.carrito-toast--visible { opacity: 1; transform: translateY(0); }

/* =============================================
   CARRITO — Page
   ============================================= */
.carrito-empty { text-align: center; padding: 80px 20px; }
.carrito-empty .fa { font-size: 64px; color: #ddd; display: block; margin-bottom: 20px; }
.carrito-empty h4 { color: #4A4843; margin-bottom: 10px; }
.carrito-empty p { color: #999; margin-bottom: 24px; }

.carrito-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; border-bottom: 2px solid #C9B59A; padding-bottom: 12px; }
.carrito-titulo { font-size: 18px; font-weight: 700; margin: 0; }
.carrito-limpiar { background: none; border: none; color: #999; font-size: 13px; cursor: pointer; padding: 0; transition: color 0.2s; }
.carrito-limpiar:hover { color: #C9B59A; }

.carrito-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.carrito-item-img { width: 72px; height: 72px; flex-shrink: 0; background: #f8f8f8; border-radius: 4px; overflow: hidden; }
.carrito-item-img img { width: 100%; height: 100%; object-fit: contain; }
.carrito-item-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 24px; }
.carrito-item-info { flex: 1; min-width: 0; }
.carrito-item-codigo { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.carrito-item-nombre { font-size: 14px; font-weight: 600; color: #2C2A26; margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carrito-item-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.carrito-qty-btn { width: 28px; height: 28px; border: 1px solid #ddd; background: #f4f4f4; border-radius: 4px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; transition: background 0.2s; }
.carrito-qty-btn:hover { background: #e0e0e0; }
.carrito-qty-input { width: 46px; height: 28px; text-align: center; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.carrito-item-remove { background: none; border: none; color: #ccc; cursor: pointer; font-size: 16px; padding: 4px; flex-shrink: 0; transition: color 0.2s; }
.carrito-item-remove:hover { color: #C9B59A; }

.carrito-form-wrap { background: #f8f8f8; border-radius: 6px; padding: 28px; }
.carrito-form-wrap .form-group { margin-bottom: 16px; }
.carrito-form-wrap label { font-size: 13px; font-weight: 600; color: #4A4843; margin-bottom: 6px; display: block; }
.carrito-form-wrap .form-control { border-radius: 4px; border: 1px solid #ddd; font-size: 14px; }
.carrito-form-wrap .site-button { width: 100%; text-align: center; margin-top: 8px; }

/* =============================================
   NAVIGATION — Hover underline effect
   ============================================= */
.header-nav .nav.navbar-nav > li > a {
    position: relative;
    transition: color 0.25s;
}
.header-nav .nav.navbar-nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: #C9B59A;
    transition: left 0.25s ease, right 0.25s ease;
}
.header-nav .nav.navbar-nav > li:hover > a::after,
.header-nav .nav.navbar-nav > li.active > a::after,
.header-nav .nav.navbar-nav > li.current-menu-item > a::after {
    left: 0;
    right: 0;
}

/* =============================================
   CLIENTES — Logo grid normalizado
   ============================================= */
.client-logo-pic {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
    transition: box-shadow 0.25s;
}
.client-logo-pic:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.client-logo-pic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.25s, opacity 0.25s;
}
.client-logo-pic:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* =============================================
   BANNERS PUBLICITARIOS — Home
   ============================================= */
.gdm-banners-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; }
.gdm-banners-cell { flex: 0 0 calc(25% - 15px); max-width: calc(25% - 15px); }
.gdm-banner { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: #f5f5f5; }
.gdm-banner > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.gdm-banner img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; margin: auto; object-fit: contain; }

@media (max-width: 1199px) {
    .gdm-banners-cell { flex-basis: calc(33.333% - 14px); max-width: calc(33.333% - 14px); }
}
@media (max-width: 991px) {
    .gdm-banners-cell { flex-basis: calc(50% - 10px); max-width: calc(50% - 10px); }
}
@media (max-width: 575px) {
    .gdm-banners-cell { flex-basis: 100%; max-width: 100%; }
}

.gdm-banners-slider .item { display: flex; align-items: center; justify-content: center; }
.gdm-banners-slider .owl-nav button.owl-prev,
.gdm-banners-slider .owl-nav button.owl-next { background: rgba(122,139,111,0.85); color: #fff; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.gdm-banners-slider .owl-nav button.owl-prev:hover,
.gdm-banners-slider .owl-nav button.owl-next:hover { background: #C9B59A; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
    .logo-header-inner img { height: auto; }
}

/* =============================================
   PRODUCTOS — Mobile filter drawer
   ============================================= */
.filtro-toggle-btn {
    display: none;
}
.filtro-overlay {
    display: none;
}

@media (max-width: 767px) {
    /* Toggle button: pestaña fija lado derecho */
    .filtro-toggle-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1040;
        background: #C9B59A;
        color: #fff;
        border: none;
        padding: 14px 8px;
        border-radius: 6px 0 0 6px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        cursor: pointer;
        box-shadow: -2px 0 8px rgba(0,0,0,0.15);
        writing-mode: horizontal-tb;
    }
    .filtro-toggle-btn i { font-size: 18px; }

    /* Overlay oscuro */
    .filtro-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1045;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .filtro-overlay--visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Panel lateral */
    #filtro-panel {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background: #fff;
        z-index: 1050;
        overflow-y: auto;
        padding: 20px 16px;
        transition: left 0.3s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,0.15);
    }
    #filtro-panel.filtro-abierto {
        left: 0;
    }
    #filtro-panel .side-bar {
        border-right: none;
        padding-right: 0;
    }

    /* Botón cerrar dentro del panel */
    .filtro-cerrar-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        color: #4A4843;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        padding: 0;
        margin-bottom: 20px;
    }
    .filtro-cerrar-btn:hover { color: #C9B59A; }
}

@media (max-width: 767px) {
    .rs-addon-beforeafter-btn { top: 68% !important; }
    .footer-bottom .d-flex {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    .prod-info { padding: 20px 0 0 0; }
    .prod-nombre { font-size: 22px; }
}
