/* ============================= */
/* GLOBAL LAYOUT */
/* ============================= */

.custom-product-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.custom-product-page {
    padding: 80px 0;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
}

/* ============================= */
/* TOP SECTION */
/* ============================= */

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 100px;
    align-items: start;
}

.product-layout > * {
    min-width: 0;
}

.product-gallery,
.gallery-thumbs-viewport,
.gallery-thumbs {
    min-width: 0;
    max-width: 100%;
}

/* ============================= */
/* GALLERY */
/* ============================= */

.product-gallery {
    width: 100%;
}

.main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    overflow: hidden;
    background: #f8f8f8;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-thumbs-wrap {
    margin-top: 25px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.gallery-thumbs-viewport {
    width: min(100%, 460px);
    overflow: hidden;
}

.gallery-thumbs {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px;
}

.gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.gallery-thumbs img {
    flex: 0 0 80px;
    width: 80px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    background: #f3f3f3;
}

.gallery-thumbs img:hover {
    opacity: 1;
    border-color: #ff1a1a;
    transform: translateY(-4px);
    box-shadow: 0 0 0 2px rgba(255, 26, 26, 0.2);
}

.gallery-thumbs img.is-active {
    opacity: 1;
    border-color: #ff1a1a;
}

.gallery-thumbs-nav {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.gallery-thumbs-nav:hover {
    background: #ff1a1a;
    border-color: #ff1a1a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 26, 26, 0.22);
}

.gallery-thumbs-nav:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
    transform: none;
    box-shadow: none;
    background: #f3f3f3;
    color: #999;
}

.gallery-thumbs-wrap.no-nav .gallery-thumbs-nav {
    display: none;
}

.gallery-thumbs-wrap.no-nav .gallery-thumbs-viewport {
    width: 100%;
}

.gallery-thumbs-wrap.no-nav .gallery-thumbs {
    justify-content: center;
    overflow: visible;
}

/* ============================= */
/* PRODUCT INFO */
/* ============================= */

.product-info {
    max-width: 500px;
}

.single-product .product-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.single-product .product-price {
    font-size: 24px;
    font-weight: 700;
    color: #ff1a1a;
    margin-bottom: 25px;
}

/* ============================= */
/* BUTTONS */
/* ============================= */

.product-actions {
    margin-top: 30px;
}

.lux-qty-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 40px;
    padding: 5px;
    width: fit-content;
    background: #f8f8f8;
}

.lux-qty-wrap button {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lux-qty-wrap button:hover {
    background: #ff1a1a;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 26, 26, 0.3);
}

.lux-qty {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    outline: none;
    -moz-appearance: textfield;
}

.lux-qty::-webkit-outer-spin-button,
.lux-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lux-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.lux-add-btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.lux-add-btn:hover {
    border-color: #ff1a1a;
    background: #fff5f5;
    box-shadow: 0 0 15px rgba(255, 26, 26, 0.1);
}

.lux-buy-btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ff1a1a;
    border: 1px solid #ff1a1a;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(255, 26, 26, 0.2);
}

.lux-buy-btn:hover {
    background: #e60000;
    border-color: #e60000;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 26, 26, 0.3);
}

/* ============================= */
/* DESCRIPTION */
/* ============================= */

.lux-description {
    margin-top: 70px;
    width: 100%;
}

.lux-desc-header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

.lux-desc-header::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-50%);
}

.lux-desc-header span {
    position: relative;
    background: #ffffff;
    padding: 0 25px;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    color: #ff1a1a;
}

.lux-desc-content {
    max-width: 720px;
    margin: 0 auto;
}

.lux-desc-content p {
    font-size: 16px;
    line-height: 1.9;
    font-weight: 300;
    color: #444;
    margin-bottom: 20px;
}

.lux-desc-content h1,
.lux-desc-content h2,
.lux-desc-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.lux-desc-content ul,
.lux-desc-content ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.lux-desc-content li {
    margin-bottom: 8px;
}

.lux-desc-wrapper {
    overflow: hidden;
    transition: max-height 0.45s ease;
    position: relative;
    z-index: 1;
}

.lux-desc-wrapper:not(.collapsed) {
    max-height: 1000px;
}

.lux-desc-wrapper.collapsed {
    max-height: var(--desc-collapsed, 180px);
}

.lux-desc-wrapper.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
}

.lux-desc-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    position: relative;
    z-index: 5;
}

.lux-arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    transition: transform 0.25s ease, border-color 0.2s ease;
}

.lux-arrow.rotated {
    transform: rotate(-135deg);
}

.lux-desc-toggle:hover .lux-arrow {
    border-color: #ff1a1a;
}

/* ============================= */
/* DELIVERY BLOCK */
/* ============================= */

.lux-delivery {
    margin-top: 60px;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.lux-delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    cursor: pointer;
}

.lux-delivery-header h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0;
}

.lux-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.lux-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.lux-toggle.rotated::before {
    transform: rotate(-135deg);
}

.lux-delivery-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 40px;
    transition: all 0.3s ease;
}

.lux-delivery-content.hidden {
    display: none;
}

.lux-delivery-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.lux-delivery-item:hover {
    background: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.lux-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ff1a1a;
}

.lux-label {
    font-size: 12px;
    color: #888;
    display: block;
    margin-bottom: 2px;
}

.lux-delivery-item strong {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ============================= */
/* BOTTOM SECTION */
/* ============================= */

.product-bottom {
    margin-top: 120px;
}

/* ============================= */
/* REVIEWS SECTION */
/* ============================= */

.product-reviews {
    margin-bottom: 80px;
}

.woocommerce-Reviews-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    position: relative;
    padding-bottom: 15px;
    margin-top: 30px;
}

.woocommerce-Reviews-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #ff1a1a;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 26, 26, 0.3);
}

.review-count {
    font-size: 14px;
    color: #ff1a1a;
    margin-bottom: 30px;
    font-weight: 500;
}

.woocommerce-Reviews .comment_container {
    display: flex;
    gap: 20px;
    background: #f8f8f8;
    padding: 25px;
    border-radius: 20px;
    margin: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.woocommerce-Reviews .comment_container:hover {
    border-color: rgba(255, 26, 26, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.woocommerce-Reviews img.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.woocommerce-Reviews .comment-text {
    flex: 1;
}

.woocommerce-Reviews .meta {
    margin-bottom: 8px;
}

.woocommerce-Reviews .meta strong {
    font-weight: 600;
    color: #1a1a1a;
}

.woocommerce-Reviews .meta time {
    color: #888;
    font-size: 13px;
}

.star-rating span {
    color: #ff1a1a;
}

.description p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.related-products {
    margin-top: 60px;
}

.related-products h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.related-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 26, 26, 0.08);
    border-color: rgba(255, 26, 26, 0.2);
}

.related-card img {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 15px;
}

.related-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.related-card span {
    font-size: 16px;
    font-weight: 700;
    color: #ff1a1a;
}

/* ============================= */
/* REVIEW FORM */
/* ============================= */

#review_form_wrapper {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    margin-top: 30px;
}

#review_form {
    margin: 0 auto;
}

#review_form .comment-reply-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 30px;
    display: block;
    position: relative;
    padding-bottom: 12px;
}

#review_form .comment-reply-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #ff1a1a;
    border-radius: 3px;
}

.comment-notes {
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 3px solid #ff1a1a;
}

.comment-notes .required {
    color: #ff1a1a;
}

/* ===== STAR RATING - LEFT TO RIGHT (FIXED) ===== */

.comment-form-rating {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #f8f8f8;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.comment-form-rating label {
    font-weight: 600;
    color: #1a1a1a;
    min-width: 120px;
    font-size: 15px;
    margin: 0;
}

/* Stars container - LEFT TO RIGHT */
.comment-form-rating .stars {
    display: flex !important;
    flex-direction: row !important; /* MAIN CHANGE: row not row-reverse */
    justify-content: flex-start !important;
    gap: 5px;
}

.comment-form-rating .stars a {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 36px;
    text-indent: -9999px;
    overflow: hidden;
    cursor: pointer;
}

/* Empty star */
.comment-form-rating .stars a::before {
    content: '☆';
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    font-size: 32px;
    line-height: 36px;
    text-indent: 0;
    color: #ff1a1a;
    text-align: center;
    opacity: 0.3;
    transition: all 0.2s ease;
}

/* Hover effect - left to right */
.comment-form-rating .stars a:hover::before {
    content: '★';
    opacity: 1;
}

.comment-form-rating .stars a:hover ~ a::before {
    content: '★';
    opacity: 1;
}

/* Active state - left to right */
.comment-form-rating .stars a.active::before {
    content: '★';
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 26, 26, 0.8);
}

.comment-form-rating .stars a.active ~ a::before {
    content: '★';
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 26, 26, 0.8);
}

/* Animation */
@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.comment-form-rating .stars a.active::before {
    animation: starPulse 0.3s ease;
}

/* Form fields */
.comment-form-comment,
.comment-form-author,
.comment-form-email {
    margin-bottom: 25px;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 15px;
}

.comment-form-comment label .required,
.comment-form-author label .required,
.comment-form-email label .required {
    color: #ff1a1a;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.6;
    background: #ffffff;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 150px;
    font-family: 'Inter', sans-serif;
}

.comment-form-comment textarea:focus {
    outline: none;
    border-color: #ff1a1a;
    box-shadow: 0 0 0 4px rgba(255, 26, 26, 0.1);
}

.comment-form-author input,
.comment-form-email input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.comment-form-author input:focus,
.comment-form-email input:focus {
    outline: none;
    border-color: #ff1a1a;
    box-shadow: 0 0 0 4px rgba(255, 26, 26, 0.1);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ff1a1a;
    cursor: pointer;
}

.comment-form-cookies-consent label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.form-submit {
    margin-top: 30px;
    text-align: center;
}

.form-submit .submit {
    display: inline-block;
    padding: 16px 50px;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid #1a1a1a;
    min-width: 200px;
    transition: all 0.2s ease;
}

.form-submit .submit:hover {
    background: #ff1a1a;
    border-color: #ff1a1a;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 26, 26, 0.25);
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .lux-buttons {
        flex-direction: column;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .custom-product-page {
        padding: 40px 0;
    }

    .gallery-thumbs-wrap {
        gap: 10px;
    }

    .gallery-thumbs-viewport {
        width: min(100%, 310px);
    }

    .gallery-thumbs {
        gap: 10px;
    }

    .gallery-thumbs img {
        flex: 0 0 68px;
        width: 68px;
        border-radius: 14px;
    }

    .gallery-thumbs-nav {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 15px;
    }

    .single-product .product-title {
        font-size: 24px;
    }

    .single-product .product-price {
        font-size: 20px;
    }

    .lux-delivery-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .woocommerce-Reviews .comment_container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    #review_form_wrapper {
        padding: 25px;
    }
    
    .comment-form-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comment-form-rating label {
        min-width: auto;
    }
    
    .comment-form-rating .stars a {
        width: 32px;
        height: 32px;
    }
    
    .comment-form-rating .stars a::before {
        font-size: 28px;
        line-height: 32px;
    }
    
    .form-submit .submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gallery-thumbs-viewport {
        width: min(100%, 232px);
    }

    .gallery-thumbs {
        gap: 8px;
    }

    .gallery-thumbs img {
        flex: 0 0 64px;
        width: 64px;
        border-radius: 12px;
    }

    .gallery-thumbs-nav {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 14px;
    }

    .lux-qty-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .lux-add-btn,
    .lux-buy-btn {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .woocommerce-noreviews {
        padding: 40px 20px;
    }
    
    .woocommerce-noreviews::before {
        font-size: 48px;
    }
    
    #review_form_wrapper {
        padding: 20px;
    }
    
    .comment-form-cookies-consent {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
