/* ==========================================================================
   Product Showcase Section
   ========================================================================== */
.product-showcase {
    padding: 60px 20px;
    background-color: var(--neutral-medium);
    text-align: left;
}

#products-heading {
    scroll-margin-top: var(--navbar-height);
}

/* ==========================================================================
   Header
   ========================================================================== */
.product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.product-header h2 {
    font-size: clamp(13px, 1.6vw, 15px);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin: 0 0 10px;
}

.product-header h3 {
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.product-container {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

/* ==========================================================================
   Categories Menu
   ========================================================================== */
.categories-menu {
    width: 32%;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.categories-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category {
    margin-bottom: 6px;
}

.category:last-child {
    margin-bottom: 0;
}

.category-title {
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: var(--white);
    color: var(--text-color);
    border: none;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

.category-title:hover {
    background-color: rgba(0, 123, 255, 0.06);
}

.category-title[aria-expanded="true"] {
    background-color: var(--secondary-color);
    color: var(--white);
}

.toggle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    color: var(--secondary-color);
    background-color: var(--neutral-light);
    border-radius: 50%;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

.category-title[aria-expanded="true"] .toggle {
    background-color: var(--white);
    color: var(--secondary-color);
}

.models-list {
    list-style: none;
    padding: 0 0 0 8px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.models-list.open {
    max-height: 500px;
    padding-top: 4px;
    padding-bottom: 6px;
}

.models-list li {
    margin: 2px 0;
}

.models-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--neutral-dark);
    font-size: 14px;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

.models-list a::before {
    content: '\1F4C4';
    font-size: 13px;
    flex-shrink: 0;
}

.models-list a:hover {
    background-color: rgba(0, 123, 255, 0.06);
    color: var(--secondary-color);
}

/* ==========================================================================
   Product Display
   ========================================================================== */
.product-display {
    width: 68%;
}

.pdf-viewer {
    height: 800px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background-color: var(--white);
    overflow: hidden;
}

#pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   Placeholder en Product Display
   ========================================================================== */
.placeholder {
    height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: var(--neutral-dark);
    position: relative;
    overflow: hidden;
}

.placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0, 123, 255, 0.08), rgba(0, 0, 0, 0.02)),
        url('../impresoras/Ricoh.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    z-index: 0;
}

.placeholder > * {
    position: relative;
    z-index: 1; /* Contenido por encima del fondo */
}

.placeholder img {
    max-width: 320px;
    height: auto;
    margin-bottom: 24px;
    box-shadow: none;
    border: none;
}

.placeholder h3 {
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
}

.placeholder p {
    font-size: 16px;
    max-width: 420px;
    line-height: 1.6;
    color: var(--neutral-dark);
}

/* ==========================================================================
   PDF Modal (mobile)
   ========================================================================== */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.pdf-modal-content {
    position: relative;
    width: clamp(280px, 95vw, 1000px);
    height: clamp(400px, 90vh, 1200px);
    max-height: calc(100vh - 40px);
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--neutral-light);
    border-bottom: 1px solid var(--neutral-medium);
}

.pdf-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.pdf-modal-actions {
    display: flex;
    gap: 10px;
}

.pdf-download-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pdf-download-btn:hover {
    background-color: var(--secondary-hover);
    box-shadow: var(--shadow-sm);
}

.pdf-modal-close {
    background: none;
    border: none;
    font-family: inherit;
    line-height: 1;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.pdf-modal-close:hover {
    background-color: var(--neutral-medium);
    color: #ff0000;
}

#pdf-modal-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Mobile Styles (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .product-showcase {
        padding: 30px 10px;
    }

    .product-header {
        margin-bottom: 24px;
    }

    .product-container {
        flex-direction: column;
        gap: 15px;
    }

    .categories-menu {
        width: 100%;
        padding: 12px;
    }

    .category-title {
        font-size: 15px;
        padding: 12px 14px;
    }

    .toggle {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }

    .models-list a {
        font-size: 14px;
    }

    .product-display {
        width: 100%;
    }

    .pdf-viewer {
        display: none; /* Hide default PDF viewer on mobile */
    }

    .pdf-modal {
        display: none; /* Hidden by default, shown via JS */
        z-index: 2000;
    }

    .placeholder {
        height: clamp(300px, 40vh, 500px);
        padding: 24px 15px;
        font-size: clamp(14px, 3vw, 16px);
    }

    .placeholder img {
        max-width: clamp(150px, 50vw, 250px);
        margin-bottom: 15px;
    }

    .placeholder h3 {
        font-size: clamp(16px, 4vw, 18px);
    }

    .placeholder p {
        font-size: clamp(12px, 2.5vw, 14px);
        max-width: 90%;
        line-height: 1.4;
    }
}
