/* PDF-like Viewer Styles */

.selonya-catalog-viewer-main {
    background: #f0f2f5;
    min-height: 100vh;
    padding: 0;
}

.catalog-viewer-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    min-height: 100vh;
}

/* Header */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 2px solid #eaeaea;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.catalog-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
}

.pdf-download-btn {
    background: #3498db;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.pdf-download-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Catalog Items Container */
.catalog-items-stacked {
    padding: 0;
}

.catalog-item {
    background: white;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ed;
    overflow: hidden;
    max-width: 95%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* Page Container */
.catalog-item .page-container {
    padding: 40px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* Header inside each page */
.catalog-item .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 30px;
}

.catalog-item .header .left,
.catalog-item .header .center, 
.catalog-item .header .right {
    flex: 1;
    font-size: 12px;
    color: #7f8c8d;
}

.catalog-item .header .center {
    text-align: center;
}

.catalog-item .header .right {
    text-align: right;
}

/* Style 1: Left Big Image + Right Stacked Variations */
.layout-style1 {
    display: flex;
    gap: 40px;
    flex: 1;
    align-items: flex-start;
    height: 100%;
}

.layout-style1 .left-block {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.layout-style1 .left-block .main-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    object-fit: cover;
}

.layout-style1 .design-code {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.layout-style1 .right-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.layout-style1 .variations {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.layout-style1 .variation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.layout-style1 .variation:hover {
    border-color: #3498db;
    background: white;
    transform: translateX(5px);
}

.layout-style1 .variation img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.layout-style1 .var-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Style 2: Centered Main + Circular Thumbs Around */
.layout-style2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
}

.layout-style2 .main-image {
    max-width: 400px;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    object-fit: cover;
}

.layout-style2 .variations {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 600px;
}

.layout-style2 .variation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.layout-style2 .variation img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.layout-style2 .variation:hover img {
    border-color: #3498db;
    transform: scale(1.1);
}

.layout-style2 .design-code {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 10px;
}

/* Style 3: Grid Layout */
.layout-style3 {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
}

.layout-style3 .main-image {
    max-width: 400px;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    object-fit: cover;
    align-self: center;
}

.layout-style3 .grid-variations {
    width: 100%;
}

.layout-style3 .variations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    justify-items: center;
}

.layout-style3 .variation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.layout-style3 .variation:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.layout-style3 .variation img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.layout-style3 .design-code {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-top: 10px;
}

/* Text and Image Pages */
.text-block {
    padding: 40px;
    font-size: 18px;
    line-height: 1.6;
    color: #2c3e50;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: center;
}

.center-image .main-image {
    max-width: 500px;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    object-fit: cover;
}

.caption {
    font-size: 16px;
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
}

/* No items message */
.no-items-message {
    text-align: center;
    padding: 80px 20px;
    color: #7f8c8d;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .catalog-item {
        max-width: 98%;
        margin: 20px auto;
    }
    
    .catalog-item .page-container {
        padding: 30px;
    }
    
    .layout-style1 {
        gap: 30px;
    }
    
    .layout-style1 .left-block .main-image {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .catalog-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .catalog-header h1 {
        font-size: 24px;
    }
    
    .catalog-item {
        margin: 15px auto;
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .catalog-item .page-container {
        padding: 20px;
        min-height: 400px;
    }
    
    .layout-style1 {
        flex-direction: column;
        gap: 20px;
    }
    
    .layout-style1 .right-block {
        max-height: none;
        overflow: visible;
    }
    
    .layout-style1 .variations {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .layout-style1 .variation {
        flex: 0 0 calc(50% - 10px);
    }
    
    .layout-style3 .variations {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .catalog-item .page-container {
        padding: 15px;
    }
    
    .layout-style1 .variation {
        flex: 0 0 100%;
    }
    
    .layout-style3 .variations {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .layout-style1 .left-block .main-image,
    .layout-style2 .main-image,
    .layout-style3 .main-image,
    .center-image .main-image {
        max-width: 100%;
    }
}







/* Enhanced PDF Viewer Styles */
.selonya-catalog-viewer-main {
    background: #2c3e50; /* Dark grey background */
    min-height: 100vh;
    padding: 20px 0;
}

.catalog-viewer-container {
    max-width: 100%;
    margin: 0 auto;
    background: #2c3e50; /* Dark grey background */
    min-height: 100vh;
}

/* Catalog Items Container with dark background */
.catalog-items-stacked {
    padding: 0;
    background: #2c3e50; /* Dark grey background */
}

.catalog-item {
    background: white;
    margin: 40px auto; /* Increased margin between pages */
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    border: 1px solid #e1e8ed;
    overflow: hidden;
    max-width: 90%; /* Slightly narrower for better margins */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.catalog-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 50px rgba(0,0,0,0.25);
}

/* Enhanced Page Container */
.catalog-item .page-container {
    padding: 50px;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Improved Image Styles with Better Sizes */
.layout-style1 .left-block .main-image {
    width: 100%;
    max-width: 600px; /* Larger main image */
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    object-fit: cover;
    cursor: zoom-in; /* Indicate image is clickable */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.layout-style1 .left-block .main-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

/* Enhanced Design Code with Product Link */
.design-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.design-code {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    padding: 12px 24px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.product-link:hover,.product-link:active,.product-link:focus {
    background: #2980b9;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
	color: white;
}


.product-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Improved Variation Images */
.layout-style1 .variation img {
    width: 140px; /* Larger variation images */
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.layout-style1 .variation img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Style 2 Improvements */
.layout-style2 .main-image {
    max-width: 500px; /* Larger */
    max-height: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    object-fit: cover;
    cursor: zoom-in;
}

.layout-style2 .variation img {
    width: 100px; /* Larger circular thumbs */
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #e9ecef;
}

/* Style 3 Improvements */
.layout-style3 .main-image {
    max-width: 500px; /* Larger */
    max-height: 500px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    object-fit: cover;
    cursor: zoom-in;
}

.layout-style3 .variation img {
    width: 140px; /* Larger grid images */
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

/* Center Image Improvements */
.center-image .main-image {
    max-width: 600px; /* Larger */
    max-height: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
    object-fit: cover;
    cursor: zoom-in;
}

/* Lightbox/Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Mobile zoom instructions */
.mobile-zoom-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    text-align: center;
    opacity: 0.8;
    display: none;
}

@media (max-width: 768px) {
    .mobile-zoom-hint {
        display: block;
    }
    
    .catalog-item {
        margin: 25px auto;
        max-width: 95%;
        border-radius: 12px;
    }
    
    .catalog-item .page-container {
        padding: 30px;
        min-height: 500px;
    }
    
    .layout-style1 .left-block .main-image,
    .layout-style2 .main-image,
    .layout-style3 .main-image,
    .center-image .main-image {
        max-width: 100%;
    }
    
    .design-code {
        font-size: 22px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .catalog-item {
        margin: 20px auto;
        max-width: 98%;
    }
    
    .catalog-item .page-container {
        padding: 20px;
    }
    
    .design-code-container {
        flex-direction: column;
        gap: 10px;
    }
}







.product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    flex-shrink: 0; /* Prevent shrinking on mobile */
}

.product-link svg {
    width: 20px !important; /* Force size */
    height: 20px !important;
    fill: currentColor;
}

/* Mobile-specific link icon sizes */
@media (max-width: 768px) {
    .product-link {
        width: 40px;
        height: 40px;
    }
    
    .product-link svg {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-width: 480px) {
    .design-code-container {
        flex-direction: row; /* Keep horizontal on mobile */
        gap: 12px;
        justify-content: center;
        align-items: center;
    }
    
    .product-link {
        width: 36px;
        height: 36px;
    }
    
    .product-link svg {
        width: 16px !important;
        height: 16px !important;
    }
}