/* products-index.css — styles for products/index page */

body.product-catalog-page {
    background: url('/img/bg-product.png') no-repeat center center fixed !important;
    background-size: cover !important;
}

.workstation-page {
    max-width: 1260px;
    margin: 50px auto;
    padding: 60px 20px;
}

.page-hero {
    text-align: center;
    margin-bottom: 60px;
}

.page-hero h1 {
    font-size: 42px;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-hero p {
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 10;
}

.product-card-image {
    width: 100%;
    margin: 20px auto 0px;
    height: 250px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 16px 16px 0 0;
}

.card-specs-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 16px;
    padding: 14px 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 100;
    pointer-events: none;
}

.product-card:hover .card-specs-popup {
    transform: translateY(0);
    opacity: 1;
}

.popup-spec-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.popup-spec-row:last-child {
    border-bottom: none;
}

.popup-spec-label {
    color: #7f8c8d;
    white-space: nowrap;
}

.popup-spec-value {
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-card-content {
    padding: 25px;
}

.product-card-sku {
    font-size: 12px;
    color: #999;
    margin: 0 0 4px;
}

.product-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 50px;
}

.product-desc {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

.btn-details {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background: #2980b9;
}

.slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 600px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: right 0.4s ease;
    overflow-y: auto;
}

.slide-panel.active {
    right: 0;
}

.slide-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.slide-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.panel-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 25px 30px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.panel-header #panelSku {
    width: 100%;
    order: -1;
}

.panel-header h2 {
    flex: 1;
}

.btn-close-panel {
    background: #ecf0f1;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
}

.btn-close-panel:hover {
    background: #d5dbdb;
    transform: rotate(90deg);
}

.panel-image-gallery {
    padding: 20px 30px;
    background: #f8f9fa;
}

.main-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.thumbnail {
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail:hover {
    border-color: #3498db;
}

.thumbnail.active {
    border-color: #3498db;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tabs */
.panel-tabs {
    display: flex;
    border-bottom: 2px solid #ecf0f1;
    padding: 0 30px;
    background: white;
    position: sticky;
    top: 87px;
    z-index: 9;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #3498db;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.panel-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Specs table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #ecf0f1;
}

.specs-table td {
    padding: 15px 10px;
}

.specs-table td:first-child {
    font-weight: 600;
    color: #7f8c8d;
    width: 45%;
}

.specs-table td:last-child {
    color: #2c3e50;
    font-weight: 500;
}

.spec-key-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #27ae60;
}

.panel-cta {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px 30px;
    border-top: 2px solid #ecf0f1;
    display: flex;
    gap: 15px;
}

.btn-cta {
    flex: 1;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-order {
    background: #27ae60;
    color: white;
}

.btn-request {
    background: #3498db;
    color: white;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Order modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.btn-close-modal {
    width: 40px;
    height: 40px;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.product-info-block {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.product-info-block strong {
    color: #2c3e50;
}

.product-info-block span {
    color: #3498db;
    font-weight: 600;
}

.order-form .form-group {
    margin-bottom: 20px;
}

.order-form label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.order-form .required {
    color: #e74c3c;
}

.order-form input,
.order-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.order-form input:focus,
.order-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.order-form textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit-order {
    width: 100%;
    padding: 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-order:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Server static content */
.server-static-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.server-main-image {
    width: 45%;
    flex-shrink: 0;
    border-radius: 12px;
    display: block;
}

.server-text {
    flex: 1;
}

.server-text h2 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.server-text h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 32px 0 12px;
}

.server-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #fff;
    margin-bottom: 16px;
}

.server-text ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.server-text ul li {
    font-size: 16px;
    line-height: 1.8;
    color: #fff;
    margin-bottom: 8px;
}

.btn-contact-server {
    display: inline-block;
    margin-top: 8px;
    padding: 14px 32px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-contact-server:hover {
    background: #1d4ed8;
}

@media (max-width: 768px) {
    .server-static-content {
        flex-direction: column;
    }
    .server-main-image {
        width: 100%;
    }
}
