.star-rating .star svg {
    width: 24px;
    height: 24px
}

.star-rating .star svg {
    fill: none;
    stroke: currentColor
}

.star-rating .star.filled svg {
    fill: currentColor;
    stroke: currentColor
}

.product-media-section {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.product-details-main-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgb(0 0 0 / .08);
    aspect-ratio: var(--product-image-aspect, 16 / 9)
}

.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgb(0 0 0 / .45);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease
}

.image-nav-btn.prev {
    left: 8px
}

.image-nav-btn.next {
    right: 8px
}

.image-nav-btn:hover {
    background: rgb(0 0 0 / .75);
    transform: scale(1.05)
}

.additional-images-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.thumbnail-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #fff0;
    background: #fff;
    object-fit: cover;
    box-shadow: 0 2px 8px rgb(0 0 0 / .08);
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease
}

.thumbnail-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgb(0 0 0 / .1)
}

.thumbnail-image.active-thumbnail {
    border-color: #40e0d0
}

.thumbnail-image:focus {
    outline: 2px solid #40e0d0;
    outline-offset: 2px
}

.checkout_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    min-width: 280px;
    max-width: 100%;
    margin: 25px auto;
    padding: 14px 35px;
    border: none;
    border-radius: 12px;
    background: var(--btn-gradient);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(26, 188, 156, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout_btn:hover {
    background: var(--btn-gradient-hover);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(26, 188, 156, 0.35);
}

.checkout_btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(26, 188, 156, 0.2);
}

@media (max-width: 480px) {
    .checkout_btn {
        width: 100%;
        min-width: unset;
        border-radius: 10px;
    }
}

.checkout_btn:focus {
    outline: 3px solid rgba(26, 188, 156, 0.5);
    outline-offset: 2px
}

.checkout_btn svg {
    width: 24px;
    height: 24px
}

.product-video-container {
    width: 100%
}

.video-toggle-btn {
    align-self: flex-start;
    background: rgb(0 0 0 / .45);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    display: none;
    transition: background .2s ease, transform .2s ease
}

.video-toggle-btn:hover {
    background: rgb(0 0 0 / .75);
    transform: scale(1.02)
}

.video-toggle-btn:focus {
    outline: 2px solid #40e0d0;
    outline-offset: 2px
}

.product-video {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 4px 16px rgb(0 0 0 / .08)
}

.product-video iframe,
.product-video video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--product-video-aspect, 16 / 9);
    border: 0
}

.product-details-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px
}

.product-details-info h2 {
    font-size: 1.8rem;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.product-details-info h3 {
    font-size: 1.1rem;
    color: #4b5563;
    margin: 12px 0 8px 0;
}

.product-details-info .price {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 16px 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.product-details-info .price .product-original-price {
    font-size: 1.45rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

.product-details-info .product-description {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border-right: 4px solid var(--main-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02)
}

.product-details-info .shortDesc {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-color);
    font-weight: 700;
    margin: 0
}

.product-details-info .longDesc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4b5563
}

.product-details-info .longDesc .desc-paragraph {
    margin: 0 0 10px 0
}

.product-details-info .longDesc .desc-list {
    margin: 10px 0;
    padding: 0;
    list-style: none
}

.product-details-info .longDesc .desc-list li {
    position: relative;
    margin: 8px 0;
    padding-right: 24px;
    line-height: 1.6
}

.product-details-info .longDesc .desc-list li::before {
    content: "←";
    position: absolute;
    right: 0;
    color: var(--main-color);
    font-weight: bold;
    font-size: 1.1rem
}

/* Enhanced Add to Cart Button */
#details-add-to-cart {
    width: fit-content;
    min-width: 260px;
    padding: 16px 40px;
    background: var(--btn-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(26, 188, 156, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

#details-add-to-cart:hover {
    background: var(--btn-gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(26, 188, 156, 0.35);
}

#details-add-to-cart:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.2);
}

@media (max-width: 768px) {
    #details-add-to-cart {
        width: 100%;
        min-width: unset;
        margin: 15px 0;
        padding: 14px 20px;
    }
}

#details-add-to-cart i {
    font-size: 1.4rem
}

#details-add-to-cart:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.product-details-info .add-cart {
    margin-top: 8px
}

/* Additional Details Section */
.product-additional-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #ffffff;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02)
}

.detail-item:hover {
    transform: translateY(-3px);
    border-color: var(--main-color);
    box-shadow: 0 6px 15px rgba(26, 188, 156, 0.1)
}

.detail-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px
}

.detail-value {
    font-size: 1.05rem;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.4
}

/* Desktop Layout: Side-by-Side */
@media (min-width: 900px) {
    #product-details-content {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 40px;
        align-items: start;
    }

    .product-media-section {
        position: sticky;
        top: 110px;
        /* Accounts for fixed header */
    }

    .product-details-main-image {
        max-height: 600px;
        /* Prevent image from taking up too much vertical space */
        object-fit: contain;
    }
}

@media (min-width: 1200px) {
    #product-details-content {
        gap: 60px;
    }
}

.product-details-container {
    padding-top: 16px;
    padding-bottom: 24px
}

.reviews-section {
    margin-top: 20px
}

.product-video-container {
    margin-top: 8px
}

@media (min-width:768px) {
    .product-media-section {
        gap: 14px
    }

    .product-details-info {
        gap: 14px
    }
}

@media (min-width:1080px) {
    .product-media-section {
        gap: 16px
    }

    .product-details-info {
        gap: 16px
    }

    .product-details-container {
        padding-top: 20px;
        padding-bottom: 28px
    }
}

.reviews-section h3 {
    margin: 0 0 8px
}

.add-review-form-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgb(0 0 0 / .06);
    padding: 16px;
    margin-top: 12px
}

#review-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px
}

#review-form input,
#review-form textarea {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px
}

#review-form textarea {
    resize: vertical
}

.star-rating {
    display: flex;
    gap: 6px
}

.star-rating .star {
    background: #fff0;
    border: none;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    color: #f59e0b;
    transition: transform .15s ease, color .2s ease
}

.star-rating .star:hover {
    transform: scale(1.06)
}

.btn-submit-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: var(--btn-gradient);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.2);
    transition: all 0.3s ease
}

.btn-submit-review:hover {
    background: var(--btn-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 188, 156, 0.3)
}

.btn-submit-review:active {
    transform: translateY(0)
}

.btn-submit-review:focus {
    outline: 3px solid rgba(26, 188, 156, 0.4);
    outline-offset: 2px
}

#reviews-list-container {
    margin-top: 16px;
    display: grid;
    gap: 12px
}

.review-display-item {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgb(0 0 0 / .04)
}

.review-display-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px
}

.review-display-author {
    font-weight: 600
}

.review-display-author.is-admin {
    color: #0ea5e9
}

.review-display-date {
    color: #6b7280;
    font-size: 13px
}

.review-display-rating svg {
    width: 20px;
    height: 20px;
    color: #f59e0b
}

.review-display-comment {
    margin-top: 6px;
    line-height: 1.8;
    color: #111827
}

.review-replies-container {
    margin-top: 10px;
    display: grid;
    gap: 8px
}

.review-reply-item {
    background: #f9fafb;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 10px
}

.reply-btn {
    background: #4b5563;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease
}

.reply-btn:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15)
}

.reply-btn:active {
    transform: translateY(0)
}

.reply-form {
    display: grid;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px
}

.reply-form textarea {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    min-height: 90px;
    resize: none
}

.reply-form button[type="submit"] {
    background: var(--btn-gradient);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(26, 188, 156, 0.2);
    transition: all 0.3s ease
}

.reply-form button[type="submit"]:hover {
    background: var(--btn-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.3)
}

.reply-form button[type="submit"]:hover {
    background: #20b2aa;
    transform: scale(1.02)
}

@media (min-width:768px) {
    #reviews-list-container {
        gap: 14px
    }

    .review-display-item {
        padding: 16px
    }
}

@media (min-width:1080px) {
    #reviews-list-container {
        gap: 16px
    }

    .review-display-item {
        padding: 18px
    }
}

@media (max-width:1080px) {
    .product-details-container {
        margin-top: 35px
    }
}

@media (max-width:768px) {
    .product-details-container {
        margin-top: 13px
    }

    .product-details-container .add-cart {
        font-size: 1em
    }
}

.product-details-container,
.reviews-section {
    max-width: 100%;
    overflow-x: hidden
}

.product-details-container p {
    overflow-wrap: anywhere;
    word-break: break-word
}

.product-details-info h1,
.product-details-info h2,
.product-details-info h3,
.product-details-info .product-code,
.product-details-info .shortDesc,
.review-display-comment {
    overflow-wrap: anywhere;
    word-break: break-word
}

.product-code {
    font-size: .95em;
}
