/* ===================================
   Product Detail Page Styles
   =================================== */

.product-detail-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    padding: 20px;
    overflow-y: auto;
}

.product-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.product-detail-container {
    position: relative;
    background: white;
    border-radius: 25px;
    max-width: 1200px;
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(50px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.product-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.back-button,
.close-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover,
.close-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.close-button {
    padding: 12px;
    border-radius: 50%;
}

.product-detail-content {
    padding: 40px;
    max-height: calc(95vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.product-header {
    text-align: center;
    margin-bottom: 40px;
}

.product-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-family: var(--font-secondary);
}

.product-subtitle {
    font-size: 1.2rem;
    color: var(--grey-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.product-image-section {
    position: sticky;
    top: 20px;
}

.product-image-container {
    background: var(--light-color);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e5e7eb;
}

.product-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.product-description h3,
.product-specifications h3,
.product-features h3,
.product-applications h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.product-description p,
.product-applications p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--steel-grey);
}

.product-specifications {
    background: var(--light-color);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

.spec-table th,
.spec-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.spec-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.spec-table tr:hover {
    background: rgba(5, 150, 105, 0.05);
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    padding-left: 25px;
    color: var(--steel-grey);
}

.product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.product-features li:last-child {
    border-bottom: none;
}

.product-cta {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.btn {
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 968px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-image-section {
        position: relative;
        top: 0;
    }

    .product-detail-content {
        padding: 30px;
    }

    .product-name {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .product-detail-page {
        padding: 10px;
        align-items: flex-start;
    }

    .product-detail-container {
        margin-top: 10px;
    }

    .product-detail-content {
        padding: 20px;
        max-height: calc(95vh - 100px);
    }

    .product-detail-header {
        padding: 20px;
    }

    .product-name {
        font-size: 1.8rem;
    }

    .product-subtitle {
        font-size: 1rem;
    }

    .product-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        min-height: 48px;
    }

    .back-button span {
        display: none;
    }

    .close-button {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        border-radius: 15px;
        max-height: 98vh;
    }

    .product-detail-content {
        padding: 15px;
    }

    .product-detail-header {
        padding: 15px;
    }

    .product-name {
        font-size: 1.6rem;
    }

    .product-subtitle {
        font-size: 0.95rem;
    }

    .spec-table {
        font-size: 0.8rem;
    }

    .spec-table th,
    .spec-table td {
        padding: 8px 6px;
    }

    .product-image-container {
        padding: 20px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}

/* Extra small devices for product detail */
@media (max-width: 375px) {
    .product-detail-content {
        padding: 12px;
    }

    .product-name {
        font-size: 1.5rem;
    }

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

    .product-info-section {
        gap: 25px;
    }
}