#page {
    background-color: #f0f2f5;
    box-shadow: none;
}

/* === Wrapper === */
.gtc-single-product {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 2rem;
    max-width: 100%;
    gap: 4rem;
}

.gtc-single-product-rating {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    margin: 1rem 0;
}

.gtc-single-product-price {
    justify-content: normal !important;
}

/* === Interno principale === */
.gtc-single-product-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 5rem;
    justify-content: center;
    align-content: center;
}

/* === Galleria === */
.gtc-single-product-gallery {
    flex: 1 1 50%;
    border-radius: 2rem;
    background: #f0f2f5;
}

.gtc-single-product-wrapper {
    width: 100%;
    gap: 3rem;
    padding: 2rem;
    display: flex;
    border-radius: 1rem;
    box-shadow: inset -4px -4px 6px #ffffff, inset 4px 4px 6px #aeaec0;
}

/* === Dettagli === */
.gtc-single-product-summary {
    flex: 1 1 50%;
    border-radius: 2rem;
    background: #f0f2f5;
}

.gtc-single-product-summary .price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.9rem;
    color: var(--template-maincolor);
}

/* === Related === */
.gtc-single-product-gallery>div>div>div>a>img {
    border-radius: 1rem;
    width: 100%;
}

.gtc-single-product-related {
    margin-top: 3rem;
}

.gtc-single-product-summary h1.product_title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--template-fourthcolor);
}

.woocommerce .star-rating {
    overflow: hidden;
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 1.2em;
    width: 5em;
}

.woocommerce .star-rating::before {
    content: "★★★★★";
    color: #ddd;
    position: absolute;
    top: 0;
    left: 0;
}

.woocommerce .star-rating span {
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

.woocommerce .star-rating span::before {
    content: "★★★★★";
    color: #f5a623;
    position: absolute;
    top: 0;
    left: 0;
}

.woocommerce-review-link {
    padding: 0.5rem 1rem;
    cursor: pointer;
    background: #f0f2f5;
    border-radius: 0.5rem;
}

.woocommerce-review-link:hover {
    text-decoration: underline;
}

.gtc-single-product-rating>span {
    color: var(--template-tirdcolor);
}

#pa_combo {
    display: none;
}

/* === Prezzo === */
.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--template-maincolor);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.price del {
    color: var(--template-tirdcolor);
    font-size: 1.2rem;
    text-decoration: line-through;
}

.price ins {
    color: var(--template-maincolor);
    font-weight: bold;
    text-decoration: none;
}

/* === Descrizione breve === */
.woocommerce-product-details__short-description {
    margin-bottom: 2rem;
    color: var(--template-tirdcolor);
    line-height: 1.5;
}

/* === Form Carrello === */
.cart {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-direction: row-reverse !important;
    justify-content: flex-end;
}

.single_variation_wrap,
.cart>table {
    width: 50%;
}

.quantity {
    display: inline-block;
    width: 100%;
}

.gtc-info-wrapper {
    box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #aeaec0;
    padding: 1rem;
    border-radius: 1rem;
}

.quantity input[type="number"] {
    width: 100% !important;
    padding: 0.7rem;
    border: none;
    border-radius: 2rem;
    background: #f0f2f5;
    box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #aeaec0;
    text-align: center;
}

.single_add_to_cart_button:hover {
    box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #aeaec0;
}

/* === Product Meta === */
.product_meta {
    display: none;
}

.product_meta span {
    display: block;
    margin-bottom: 0.5rem;
}

.product_meta a {
    color: var(--template-fourthcolor);
    text-decoration: none;
}

.product_meta a:hover {
    text-decoration: underline;
}

.gtc-single-product-tabs-nav {
    display: flex;
    gap: 1rem;
    text-align: center;
    list-style: none;
    padding: 1rem 0;
    border-radius: 1rem;
    justify-content: space-between;
}

.gtc-single-product-tab-link {
    color: var(--template-fourthcolor);
    width: 100%;
    justify-content: center;
    display: flex;
    box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px #aeaec0;
    transition: all 0.2s ease;
    padding: 0.7rem 1rem;
    cursor: pointer;
    background: #f0f2f5;
    border-radius: 2rem;
}

.gtc-single-product-tab-link:hover {
    transform: scale(0.98) translateY(0);
    box-shadow: none;
}

.gtc-single-product-tab-link.active {
    transform: scale(0.98) translateY(0);
    box-shadow: inset -4px -4px 6px #ffffff, inset 4px 4px 6px #aeaec0;
}

.gtc-single-product-tab-content>p {
    color: var(--template-tirdcolor);
}

.gtc-single-product-tab-content>table {
    color: var(--template-tirdcolor);
}

#comments {
    color: var(--template-tirdcolor);
}

#comments>h2,
.gtc-single-product-tab-content>h2 {
    display: none;
}

.gtc-single-product-tab-content.active {
    display: block;
}

.gtc-single-product-tab-content {
    display: none;
    height: 300px;
    overflow-y: auto;
    padding: 0 1rem 0 1rem;
}

.gtc-single-product-tab-content::-webkit-scrollbar {
    width: 6px;
}

.gtc-single-product-tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.gtc-single-product-tab-content::-webkit-scrollbar-thumb {
    border-radius: 2rem;
    box-shadow: inset -4px -4px 8px #d1d9e6,
        inset 4px 4px 8px #d1d9e6;
}

#submit,
.single_add_to_cart_button {
    padding: 1rem !important;
    color: var(--template-fourthcolor) !important;
    width: 100%;
    box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px #aeaec0 !important;
    transition: all 0.2s ease !important;
    background: #f0f2f5 !important;
    border-radius: 2rem !important;
}

#submit:hover,
.single_add_to_cart_button:hover {
    color: var(--template-maincolor) !important;
    box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #aeaec0 !important;
    transform: scale(0.98) translateY(0);
}

.woocommerce-variation-add-to-cart {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

/* Contenitore commento */
.comment-text {
    border: none !important;
    background: #f0f2f5;
    border-radius: 1rem !important;
    padding: 1.5rem 2rem;
    box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #aeaec0;
}

/* Intestazione autore + data */
.comment-text .meta {
    font-size: 0.9rem;
    color: var(--template-tirdcolor);
    margin-bottom: 1rem;
}

.comment-text .woocommerce-review__author {
    font-weight: 600;
    color: var(--template-fourthcolor);
}

.comment-text .woocommerce-review__published-date {
    color: var(--template-tirdcolor);
    font-size: 0.85rem;
}

.comment-text .woocommerce-review__dash {
    margin: 0 0.25rem;
    color: var(--template-tirdcolor);
}

/* Testo recensione */
.comment-text .description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--template-fourthcolor);
}

.comment-text .description p {
    margin: 0;
}

/* Contenitore form recensione */
#respond {
    background: #f0f2f5;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
}

/* Titolo "Add a review" */
#respond #reply-title {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--template-fourthcolor);
}

#respond #reply-title small {
    font-size: 0.85rem;
    margin-left: 1rem;
}

#respond #cancel-comment-reply-link {
    color: var(--template-maincolor);
    text-decoration: none;
}

#respond #cancel-comment-reply-link:hover {
    text-decoration: underline;
}

/* Stelle di rating */
#respond .comment-form-rating label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

#respond .stars a {
    display: inline-block;
    margin-right: 0.25rem;
    text-decoration: none;
    color: var(--template-tirdcolor);
    transition: color 0.3s ease;
}

#respond .stars a:hover,
#respond .stars a:focus {
    color: #f5b301;
}

/* Textarea recensione */
#respond textarea {
    width: 100%;
    border: none;
    border-radius: 1rem;
    padding: 1rem;
    resize: vertical;
    font-size: 1rem;
    background: #f0f2f5;
    box-shadow: inset -3px -3px 6px #ffffff, inset 3px 3px 6px #aeaec0;
}

#respond textarea:focus {
    outline: none;
    box-shadow: inset -2px -2px 4px #ffffff, inset 2px 2px 4px #aeaec0;
}

/* Label textarea */
#respond label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--template-fourthcolor);
}

/* Bottone submit */
.commentlist {
    padding: 0;
}

/* Impedisce al <p> di ricevere hover */
.stars {
    pointer-events: none;
}

/* Riattiva pointer-events sui link interni */
.stars a {
    pointer-events: auto;
}

/* === VARIATIONS TABLE NEUMORPHIC === 
table.variations { width: 100%; border-collapse: separate; border-spacing: 0; background: #f0f2f5; border-radius: 1rem; box-shadow: inset 4px 4px 8px #d1d9e6,
              inset -4px -4px 8px #ffffff; padding: 1rem; }
*/
table.variations th.label {
    display: none;
}

/*
table.variations td.value {
    padding: 0.5rem 0;
}

table.variations select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    outline: none;
    border-radius: 50px;
    background: #f0f2f5;
    color: #333;
    font-weight: 500;
    box-shadow: -4px -4px 8px #ffffff,
        4px 4px 8px #d1d9e6;
    transition: box-shadow 0.3s ease;
    appearance: none;
}*/

table.variations select:hover {
    box-shadow: inset -4px -4px 8px #ffffff,
        inset 4px 4px 8px #d1d9e6;
}

table.variations .reset_variations {
    display: none;
}

.gtc-select-wrapper {
    position: relative;
    max-width: 100%;
}

.gtc-select-display {
    color: var(--template-fourthcolor);
    padding: 0.7rem;
    border-radius: 2rem;
    background: #f0f2f5;
    box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px #aeaec0;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gtc-select-wrapper.open .gtc-select-display {
    box-shadow: inset -4px -4px 8px #ffffff,
        inset 4px 4px 8px #aeaec0;
    transform: scale(0.98);
}

.gtc-select-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    background: #f0f2f5;
    border-radius: 0.3rem;
    box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px #aeaec0;
    padding: 0.5rem 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    list-style: none;
}

.gtc-select-options.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.gtc-select-options li {
    padding: 0.7rem 1rem;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gtc-select-options li:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Scrollbar */
.gtc-select-options::-webkit-scrollbar {
    width: 6px;
}

.gtc-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.gtc-select-options::-webkit-scrollbar-thumb {
    border-radius: 2rem;
    box-shadow: inset -4px -4px 8px #d1d9e6,
        inset 4px 4px 8px #d1d9e6;
}

/* Stili mirati solo ai correlati */
.gtc-related-products {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.gtc-related-products .gtc-product-template>li {
    flex: 0 1 calc(20% - 1.5rem);
    box-sizing: border-box;
}

.gtc-related-list {
    gap: 1rem;
    display: flex !important;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    align-items: center;
}

/* Responsive adattato */
@media (max-width: 1520px) {
    .cart {
        flex-direction: row;
    }
}

@media (max-width: 1024px) {
    .gtc-related-list {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .gtc-single-product-wrapper {
        flex-direction: column;
    }

    .gtc-single-product-inner {
        padding: 1rem;
    }
}

@media (max-width: 600px) {
    .gtc-related-products .gtc-product-template>li {
        flex: 0 1 100%;
    }

    .gtc-related-list {
        flex-wrap: nowrap;
    }

    .gtc-single-product-tabs-nav {
        flex-direction: column;
    }

    .cart {
        flex-wrap: wrap;
        flex-direction: column-reverse;
    }

    .single_variation_wrap,
    .cart>table {
        width: 100%;
    }
}