/* Shared layout styles */
.page-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar-nav {
    flex-shrink: 0;
    width: 220px;
    position: sticky;
    top: 20px;
}

.sidebar-nav ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    overflow: hidden; 
}

.sidebar-nav li a { 
    display: block; 
    padding: 12px 15px; 
    text-decoration: none; 
    color: #333; 
    border-bottom: 1px solid #ddd; 
    transition: background-color 0.2s ease-in-out; 
}

.sidebar-nav li:last-child a { 
    border-bottom: none; 
}

.sidebar-nav li a:hover { 
    background-color: #f5f5f5; 
}

.sidebar-nav li a.active {
    background-color: var(--third-color);
    color: var(--text-color);
    font-weight: bold;
}

.main-content {
    flex-grow: 1;
    min-width: 0;
}

.sidebar-cart { 
    margin-bottom: 25px; 
}

.sidebar-cart .cta-button { 
    display: block; 
    width: 100%; 
    box-sizing: border-box; 
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.product-card-image-wrapper {
    cursor: pointer; /* Add pointer cursor to indicate it's clickable */
}

/* Lightbox styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
}

.lightbox-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1010;
    display: flex;
    gap: 10px;
}

.lightbox-controls button {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

.download-link {
    display: block;
    margin-bottom: 10px;
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.download-link:hover {
    background-color: #5a6268;
}


/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .page-wrapper {
        flex-direction: column;
    }
    .sidebar-nav {
        width: 100%;
        position: static;
    }
    .main-title-wrapper {
        margin-top: 25px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .lightbox-controls {
        top: 10px;
        left: 10px;
        right: 10px;
        justify-content: center;
    }
}
