/* Single Product Page Styles */

.single-product-page {
    background: #fff;
    padding-bottom: 80px;
}

/* Breadcrumb */
.breadcrumb-section {
    background: #f9f9f9;
    padding: 20px 0;
    margin-bottom: 40px;
}

.woocommerce-breadcrumb {
    font-size: 14px;
    color: #666;
}

.woocommerce-breadcrumb a {
    color: #5865F2;
    text-decoration: none;
    transition: opacity 0.3s;
}

.woocommerce-breadcrumb a:hover {
    opacity: 0.7;
}

/* Product Details Section */
.product-details-section {
    padding: 40px 0;
}

.product-details-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    width: 100%;
    height: 500px;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.thumbnail {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s, transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #5865F2;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info-main {
    padding: 20px 0;
}

.product-title-main {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.star {
    color: #ddd;
    font-size: 20px;
}

.star.filled {
    color: #FFD700;
}

.product-price-main {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.product-price-main .amount {
    color: #333;
}

.product-price-main del {
    color: #999;
    font-size: 24px;
    margin-right: 10px;
}

.product-price-main ins {
    text-decoration: none;
    color: #5865F2;
}

.product-short-description {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

/* Add to Cart Form */
.cart {
    margin-bottom: 30px;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-wrapper label {
    font-weight: 600;
    color: #333;
}

.input-text.qty {
    width: 80px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
}

.btn-add-to-cart {
    display: inline-block;
    padding: 14px 40px;
    background: #FFD700;
    color: #000;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-add-to-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* Product Meta */
.product-meta {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-meta p {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
}

.product-meta strong {
    color: #333;
}

/* Product Tabs Section */
.product-tabs-section {
    padding: 60px 0;
    background: #f9f9f9;
}

.product-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
}

.tab-button {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: #5865F2;
}

.tab-button.active {
    color: #5865F2;
    border-bottom-color: #5865F2;
}

.tab-content {
    display: none;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
}

.tab-content.active {
    display: block;
}

.tab-content-inner {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* Related Products Section */
.related-products-section {
    padding: 80px 0;
}

.related-products-section .section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.related-products-section .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.qty-controls .qty-btn {
    cursor:pointer;
    width: 60px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .product-details-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .main-image {
        height: 400px;
    }

    .related-products-section .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-title-main {
        font-size: 28px;
    }

    .product-price-main {
        font-size: 24px;
    }

    .product-price-main del {
        font-size: 18px;
    }

    .main-image {
        height: 350px;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .thumbnail {
        height: 100px;
    }

    .product-tabs {
        gap: 10px;
    }

    .tab-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .tab-content {
        padding: 30px 20px;
    }

    .related-products-section .section-title {
        font-size: 32px;
    }

    .related-products-section .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .breadcrumb-section {
        padding: 15px 0;
    }

    .woocommerce-breadcrumb {
        font-size: 12px;
    }

    .product-title-main {
        font-size: 24px;
    }

    .product-price-main {
        font-size: 20px;
    }

    .main-image {
        height: 300px;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .thumbnail {
        height: 80px;
    }

    .btn-add-to-cart {
        width: 100%;
        text-align: center;
    }

    .product-tabs {
        flex-direction: column;
        gap: 0;
    }

    .tab-button {
        padding: 15px 20px;
        border-bottom: 1px solid #ddd;
        border-left: 3px solid transparent;
    }

    .tab-button.active {
        border-left-color: #5865F2;
        border-bottom-color: #ddd;
    }

    .related-products-section .section-title {
        font-size: 28px;
    }
}



/* Product reviews / tabs */
.product-tabs { margin-bottom: 30px; }
.product-tabs .tab-button {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    background: transparent;
    color: #0b3b5a;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    margin-right: 8px;
    transition: all .18s ease;
}
.product-tabs .tab-button.active {
    background: #0077B6;
    color: #fff;
    border-color: rgba(0,0,0,0.05);
}

/* Tab content */
.tab-content {
    display: none;
    margin-top: 18px;
    background: #fff;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.tab-content.active { display: block; }

/* Reviews list */
.woocommerce-Reviews .commentlist,
.woocommerce-Reviews ol.commentlist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.woocommerce-Reviews .comment {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #eef2f4;
}
.woocommerce-Reviews .comment:last-child { border-bottom: none; }

.woocommerce-Reviews .comment .comment-author img.avatar {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.04);
}

.woocommerce-Reviews .comment .comment-text {
    flex: 1;
}
.woocommerce-review__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.woocommerce-review__author {
    font-weight: 700;
    color: #0b3b5a;
}
.woocommerce-review__publication-date {
    font-size: 0.9rem;
    color: #6b7280;
    margin-left: 6px;
}

/* Rating stars */
.star-rating,
.woocommerce-review__rating .star-rating {
    color: #f5b301;
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

/* Review text */
.woocommerce-review__text,
.comment .comment-text p {
    color: #334155;
    line-height: 1.6;
    margin: 8px 0 0 0;
}

/* Review form */
.woocommerce-Reviews #review_form,
.woocommerce-Reviews #review_form_wrapper {
    margin-top: 18px;
}
.woocommerce-Reviews .comment-form-rating {
    margin-bottom: 12px;
}
.woocommerce-Reviews .comment-form textarea {
    min-height: 110px;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce-Reviews .comment { flex-direction: column; }
    .woocommerce-Reviews .comment .comment-author img.avatar { margin-bottom: 8px; }
}


/* Reviews list */
.woocommerce-Reviews { margin-top: 24px; }
.woocommerce-Reviews ol.commentlist { list-style: none; margin: 0; padding: 0; }
.woocommerce-Reviews li.comment { display:flex; gap:16px; padding:18px 0; border-bottom:1px solid #eef2f4; align-items:flex-start; }
.woocommerce-Reviews li.comment:last-child { border-bottom: none; }
.woocommerce-Reviews .comment-author img.avatar { width:56px; height:56px; border-radius:50%; object-fit:cover; }

/* Review content */
.woocommerce-review__author { font-weight:700; color:#0b3b5a; margin-right:8px; }
.woocommerce-review__publication-date { color:#6b7280; font-size:.9rem; }
.woocommerce-review__rating { color:#f5b301; margin-left:auto; }

/* Review text */
.woocommerce-review__text { color:#334155; line-height:1.6; margin-top:8px; }

/* Form wrapper */
#review_form_wrapper { margin-top: 24px; }
#review_form { background:#fff; padding:18px; border-radius:8px; box-shadow:0 2px 10px rgba(0,0,0,0.04); }
.woocommerce-Reviews .comment-form label { display:block; font-weight:600; margin-bottom:8px; color:#0b3b5a; }
.woocommerce-Reviews .comment-form input[type="text"],
.woocommerce-Reviews .comment-form input[type="email"],
.woocommerce-Reviews .comment-form textarea,
.woocommerce-Reviews select {
    width:100%; padding:10px 12px; border:1px solid #e6eef3; border-radius:6px; background:#fbfdff;
    color:#0f1724; box-sizing:border-box;
}
.woocommerce-Reviews .comment-form textarea { min-height:120px; resize:vertical; }

/* Rating selector */
.comment-form-rating { display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.comment-form-rating .rating-label { min-width:90px; color:#475569; }

/* Submit */
.woocommerce-Reviews .form-submit .submit {
    display:inline-block; padding:12px 24px; background:#0077B6; color:#fff; border-radius:8px;
    border:0; cursor:pointer; font-weight:700;
}
.woocommerce-Reviews .form-submit .submit:hover { background:#005b8c; }

/* Validation / messages */
.woocommerce-error, .woocommerce-message { margin-bottom:12px; }

/* Responsive */
@media (max-width:768px) {
    .woocommerce-Reviews li.comment { flex-direction:column; align-items:flex-start; }
    .woocommerce-review__rating { margin-left:0; margin-top:6px; }
}

/* Star rating inputs */
.star-rating {
    display: flex;
    direction: rtl; /* facilita que los hermanos anteriores se coloreen */
    unicode-bidi: bidi-override;
    font-size: 1.6rem;
    vertical-align: middle;
}
.star-rating input[type="radio"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}
.star-rating label {
    display: inline-block;
    cursor: pointer;
    color: #cbd5e1; /* gris claro por defecto */
    padding: 0 6px;
    user-select: none;
}
/* Use pseudo-element star */
.star-rating label::before {
    /* content: "★"; */
    content: "\2605"; /* U+2605 black star */
    font-family: inherit;
}
/* Hover and checked */
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f5b301; /* amarillo estrellas */
}

/* Accessible text hidden but available to screen readers */
.screen-reader-text {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Spacing and label */
.comment-form-rating { margin-bottom: 12px; display:flex; align-items:center; gap:12px; }
.comment-form-rating .rating-label { min-width:70px; color:#475569; font-weight:600; }

/* Ajustes responsivos */
@media (max-width: 480px) {
    .star-rating { font-size: 1.3rem; }
}