/* Product Detail Page Styles */

/* Layout structure */
body {
    background-color: #505050;
    overflow-x: hidden;
}

/* Header spacing */
.j-main-sec {
    position: initial;
    margin-top: 93px; /* Add margin to account for fixed header height */
    padding: 0;
    background-color: #000;
    width: 100%;
    overflow-x: hidden;
}

/* Container styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    overflow-x: visible;
}

/* Section title styles (for product name and comment section) */
.section-title-container {
    padding: 0;
    margin: 0;
    background-color: #505050;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 60px;
    display: flex;
    align-items: flex-end;
}

.seasonal-title {
    width: 100%;
    text-align: left;
    padding: 0 0 15px 0;
    background-color: #505050;
    color: #fff;
    font-size: 19px;
    margin: 0 auto;
    max-width: 1200px;
}

/* Product row layout */
.product-container {
    display: flex;
    flex-direction: column;
    background-color: #000;
    padding: 30px 0;
    width: 100%;
}

.product-row {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
    justify-content: flex-start;
}

/* Product image section (left side) */
.product-image-container {
    flex: 0 0 720px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    height: 400px;
    width: 720px;
    /* Fixed dimensions */
    max-width: 720px;
    min-width: 720px;
}

.product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Image navigation buttons */
.image-nav-btn {
    position: absolute;
    background-color: rgba(0, 0, 0, 0);
    color: #fff;
    border: none;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 5;
}

.image-nav-btn img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.image-prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.image-next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.image-fullscreen {
    right: 10px;
    bottom: 10px;
}

/* Product info section (right side) */
.product-info-container {
    flex: 0 0 35%;
    position: relative;
    z-index: 3;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    text-align: left;
    align-self: flex-end;
    margin-bottom: 20px;
}

.product-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}

.product-description {
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Buy button with cart icon */
.buy-button {
    display: flex;
    align-items: center;
    background-color: #f0ad4e;
    color: #000;
    padding: 12px 30px;
    margin-top: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.buy-button:hover {
    background-color: #ec971f;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.buy-button img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
}

.buy-button span {
    font-weight: 500;
}

/* Product images display (third row) */
.product-images-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 30px;
    height: 200px;
    overflow-x: auto;
    width: 1200px;
    max-width: 1200px;
}

.product-grid-item {
    overflow: hidden;
    flex: 0 0 calc(16.666% - 5px);
    height: 100%;
}

.product-grid-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    display: block !important;
}

/* Section divider */
.section-divider-line {
    height: 50px;
    background-color: #505050;
    margin: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.thin-divider {
    height: 2px;
    background-color: #505050;
    margin: 0;
    width: 100%;
}

/* Comments section */
.comments-container {
    padding: 30px 0;
    background-color: #000;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 2px solid #505050;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.commenter-info {
    color: #ccc;
    font-size: 14px;
}

.comment-actions {
    display: flex;
    align-items: center;
}

.like-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.like-button span {
    margin-left: 5px;
}

.comment-content {
    color: #fff;
    line-height: 1.6;
}

/* Comment form */
.comment-form-container {
    padding: 20px 0;
    display: flex;
    gap: 20px;
}

.comment-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #505050;
    background-color: #333;
    color: #fff;
    resize: none;
    height: 100px;
}

.comment-input:focus {
    outline: none;
    border-color: #fff;
}

.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0ad4e;
    color: #000;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    height: 50px;
    align-self: flex-end;
    width: 150px;
}

.send-button img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
}

/* Fullscreen gallery */
.fullscreen-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    padding: 40px;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
}

/* Responsive styles */
@media (max-width: 992px) {
    .product-row {
        flex-direction: column;
        gap: 30px;
    }

    .product-image-container,
    .product-info-container {
        flex: 0 0 100%;
        width: 100%;
    }

    .product-images-grid {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .product-grid-item {
        flex: 0 0 250px;
    }
}

@media (max-width: 768px) {
    .j-main-sec {
        margin-top: 60px;
    }

    .comment-form-container {
        flex-direction: column;
    }

    .send-button {
        align-self: stretch;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .product-title {
        font-size: 20px;
    }

    .product-images-grid {
        height: 150px;
    }

    .product-grid-item {
        flex: 0 0 200px;
    }
}