/* Catalogue Viewer Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f5f5;
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
}

.catalogue-header-wrapper {
    background: linear-gradient(135deg, #007dc2 0%, #f3881f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 125, 194, 0.3);
    position: relative;
    z-index: 100;
    padding: 20px 0;
}

.catalogue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.catalogue-header-left {
    flex: 0 0 auto;
}

.catalogue-header-center {
    flex: 1;
    text-align: center;
    padding: 0 20px;
}

.catalogue-header-right {
    flex: 0 0 auto;
}

.catalogue-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.catalogue-header p {
    margin: 10px 0 0 0;
    font-size: 16px;
    opacity: 0.9;
}

.catalogue-container {
    height: calc(100vh - 120px);
    width: 95%;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 125, 194, 0.2);
    overflow: hidden;
    background: white;
    position: relative;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: linear-gradient(135deg, #007dc2 0%, #f3881f 100%);
    color: white;
    flex-direction: column;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
}

.back-button {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #007dc2;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #007dc2;
    text-decoration: none;
}

.back-button i {
    font-size: 18px;
}

.download-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #007dc2;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.download-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #007dc2;
    text-decoration: none;
}

.download-btn i {
    font-size: 18px;
}


/* Responsive Design */

@media (max-width: 768px) {
    .catalogue-header-wrapper {
        padding: 15px 0;
    }
    .catalogue-header {
        padding: 0 15px;
    }
    .catalogue-header-center {
        padding: 0 10px;
    }
    .catalogue-header h1 {
        font-size: 22px;
        margin: 0;
        line-height: 1.3;
    }
    .catalogue-header p {
        font-size: 14px;
        margin-top: 8px;
    }
    .catalogue-container {
        width: 98%;
        height: calc(100vh - 100px);
        margin: 10px auto;
    }
    .back-button,
    .download-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    .back-button span,
    .download-btn span {
        display: none;
        /* Ẩn text trên mobile, chỉ hiện icon */
    }
    .back-button i,
    .download-btn i {
        font-size: 16px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .catalogue-header-wrapper {
        padding: 10px 0;
    }
    .catalogue-header {
        padding: 0 10px;
    }
    .catalogue-header-center {
        padding: 0 5px;
    }
    .catalogue-header h1 {
        font-size: 18px;
        line-height: 1.2;
    }
    .catalogue-header p {
        font-size: 12px;
        margin-top: 6px;
    }
    .catalogue-container {
        width: 100%;
        height: calc(100vh - 80px);
        margin: 5px 0;
        border-radius: 8px;
    }
    .back-button,
    .download-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    .back-button i,
    .download-btn i {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .catalogue-header-wrapper {
        padding: 8px 0;
    }
    .catalogue-header {
        padding: 0 8px;
    }
    .catalogue-header-center {
        padding: 0 3px;
    }
    .catalogue-header h1 {
        font-size: 16px;
    }
    .catalogue-header p {
        font-size: 11px;
    }
    .back-button,
    .download-btn {
        padding: 6px 10px;
    }
    .back-button i,
    .download-btn i {
        font-size: 12px;
    }
}