
/*********** Layout products ***********/
.type-product .product-main {
    padding-top: 0;
    padding-bottom: 20px;
}
.type-product .product-main .product-info {
    padding-bottom: 0;
}
.type-product .product-main .product-info .cart {
    margin-bottom: 0;
}
.type-product .product-main .product-info .variations_button {
    padding-bottom: 0;
}

.shop-container .woocommerce-Tabs-panel--description img.size-full {
    margin: var(--sgce-space-3) auto;
    display: block;
}


/*********** Product gallery ***********/
.product-gallery .product-gallery-slider .flickity-page-dots {}
.product-gallery .product-gallery-slider .flickity-page-dots .dot {
    background: var(--sgce-primary-color);
}




/********** Product Attributes and Variations **********/
.cart .sgce-product-attributes-variations {}
.cart .attribute-options {
    --attribute-option-size: 35px;
    display: flex;
    gap: 15px;
}
.cart .attribute-options .attribute-option {
    margin: 0;
    padding: 0 5px;
    font-size: var(--sgce-font-size-sm);
    border-radius: var(--sgce-border-radius);
    line-height: var(--attribute-option-size);
    height: var(--attribute-option-size);
    overflow: hidden;
    min-height: auto;
    display: flex;
    align-items: center;
    border: 1px solid var(--sgce-primary-color);
    justify-content: center;
}
.cart .sgce_variations .attribute-options .attribute-option {
    margin-bottom: var(--sgce-space-4);
}
.cart .attribute-options .attribute-option[data-attribute-type="pa_size"] {
    width: 27px;
    height: 27px;
    border-radius: 100%;
    padding: 0;
}
.cart .attribute-options .attribute-option .option-inner {
    display: block;
    text-transform: none;
    margin-bottom: 2px;
}
.cart .attribute-options .attribute-option .option-inner .color-image {
    width: fit-content;
    height: 100%;
    display: block;
}
.cart .attribute-options .attribute-option.color {
    width: var(--attribute-option-size);
}
.cart .attribute-options .attribute-option.color span {
    display: none;
}
.cart .attribute-options .attribute-option.image {
    width: var(--attribute-option-size);
}
.cart .attribute-options .attribute-option.image img {
    height: var(--attribute-option-size);
}
.cart .attribute-options .attribute-option.color-option:not(.text) {
    padding: 0;
    border-radius: 100%;
}
.cart .attribute-options .attribute-option.color-option:not(.text):before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border: 1px solid #fff;
    background: transparent;
    border-radius: 100%;
}
.cart .attribute-options .attribute-option.selected {
    background: var(--sgce-primary-color);
    color: #fff;
    transform: scale(1.1);
}
.cart .attribute-options .attribute-option.color-option:not(.text).selected {
    transform: scale(1.25);
}












/*********** Related products ***********/
.related-products-wrapper > .row-small > .product-small:nth-last-child(1),
.related-products-wrapper > .row-small > .product-small:nth-last-child(2) {
    display: none;
}
@media (min-width: 550px) {
    .related-products-wrapper > .row-small > .product-small:nth-last-child(2) {
        display: block;
    }
}
@media (min-width: 850px) {
    .related-products-wrapper > .row-small > .product-small:nth-last-child(1) {
        display: block;
    }
}

/*********** Product meta info ***********/
.type-product .quantity,
.type-product .quantity {
    display: none;
}

/* ACF short desc under product title */
.single-product .product-summary .sgce-short-desc-under-title,
.single-product .summary .sgce-short-desc-under-title {
    margin-top: 6px;
    color: var(--sgce-text-light-color);
    font-size: 90%;
}

/* Variable product form */
#sgce_variations_form .sgce_variations td {
    border: 0;
    padding: 0;
}
#sgce_variations_form .sgce_variations tr button[data-attribute-type="pa_size"] {
    border-radius: 100%;
    width: 35px;
    height: 35px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#sgce_variations_form .sgce_variations tr:last-child button {
    margin-bottom: 0;
}
.cart .sgce-price .price-wrapper {
    font-size: var(--sgce-font-size-xxl);
}
.cart .sgce-price .price-wrapper.has-discount {}
.cart .sgce-price .price-wrapper.has-discount del span {
    opacity: 1;
    font-size: var(--sgce-font-size-xl);
}
.cart .sgce-price .price-wrapper.has-discount ins span {
    color: var(--sgce-accent-color);
}

/*********** Product tabs ***********/
.woocommerce-tabs .tab-panels .woocommerce-Tabs-panel--description img[class*="wp-image-"] {
    /* border-radius: var(--sgce-border-radius); */
    margin-top: 10px;
    margin-bottom: 10px;
}
.woocommerce-tabs .tab-panels {
    padding-top: 0;
}


/* Thông số kỹ thuật */
.woocommerce-tabs .tab-panels .sgce-tech-specs tr td {
    padding: 15px 0 15px 0;
    width: 50%;
}
.woocommerce-tabs .tab-panels .sgce-tech-specs tr:last-child td {
    border-bottom: 0;
}
.woocommerce-tabs .tab-panels .sgce-tech-specs .sgce-spec-title {
    font-size: var(--sgce-font-size-sm);
}
.woocommerce-tabs .tab-panels .sgce-tech-specs .sgce-spec-value {
    font-size: var(--sgce-font-size-lg);
}

/*********** Product actions (Add to cart / Installment / Buy now) ***********/
.product-info .sgce-actions {
    margin-top: var(--sgce-space-3);
}
.product-info .sgce-actions .sgce-actions__row {
    display: flex;
    overflow: hidden;
    background: #fff;
    gap: 5px;
    margin-bottom: 5px;
}
.product-info .sgce-actions .sgce-actions__row > * {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    /* padding: 12px 10px; */
    color: #fff;
    text-decoration: none;
    background: var(--sgce-primary-color);
}
.product-info .sgce-actions .sgce-actions__row > *:first-child {
    border-right: 0;
}
.product-info .sgce-actions .sgce-actions__btn {
    border: 1px solid var(--sgce-border-color);
    cursor: pointer;
    font-weight: 600;
    border-radius: 0;
    margin: 0;
    flex-basis: 50%;
}
.product-info .sgce-actions .sgce-actions__btn svg {
    display: inline-block;
}
.product-info .sgce-actions .sgce-actions__btn:hover {
    background: var(--sgce-hover-primary-color);
}
.product-info .sgce-actions .sgce-actions__buy-now {
    display: block;
    width: 100%;
    height: 40px;
    text-align: center;
    font-weight: 700;
    color: #fff;
    background: var(--sgce-primary-color); /* dark slate tone similar to screenshot */
    border-radius: 0;
    border: 0;
    cursor: pointer;
    font-size: var(--sgce-font-size-lg);
    text-transform: uppercase;
    margin-bottom: 0;
}
.product-info .sgce-actions .sgce-actions__buy-now:hover {
    /* filter: brightness(0.95); */
    background: var(--sgce-hover-primary-color);
}


/*********** Product reviews ***********/
/* Review card + layout */
#reviews {
/* .woocommerce-Reviews #review_form .review-form-inner.has-border { */
    background: #fff;
    border-radius: var(--sgce-border-radius, 14px);
    box-shadow: var(--sgce-box-shadow);
    padding: 24px;
    border: 0;
}

/* Title + stats on the same row */
#review_form .comment-reply-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 0;
    font-size: var(--sgce-font-size-lg);
}
#review_form .comment-reply-title .sgce-review-title {
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#review_form .comment-reply-title .sgce-review-rating { display: inline-flex; align-items: center; }
#review_form .comment-reply-title .sgce-review-rating .star-rating { margin: 0 8px; }
/* Make title star-rating colors match interactive rating-stars */
#review_form .comment-reply-title .star-rating { font-size: 18px; line-height: 1; }
#review_form .comment-reply-title .star-rating:before {color: #c7c7c7; content: '★★★★★'}
#review_form .comment-reply-title .star-rating span:before { color: var(--fs-color-primary, #f1b21b); }
#review_form .comment-reply-title .sgce-review-stats {
    margin-left: auto;
    font-weight: 500;
    color: var(--sgce-text-light-color, #666);
    font-size: var(--sgce-font-size);
}

/* Flex layout per request */
#review_form .sgce-review-form {
    display: flex;
    flex-wrap: nowrap;
}
#review_form .sgce-review-form .wrap-comment-form-comment {flex: 0 0 70%;padding-right: 0;}
#review_form .sgce-review-form .wrap-comment-form-rating  {flex: 0 0 30%;display: flex;flex-direction: column;gap: 12px;padding-left: 15px;padding-right: 0;}

/* Not-logged-in wrapper uses same layout */
#review_form .wrap-user-must-log-in {
    display: flex;
    flex-wrap: nowrap;
}
#review_form .wrap-user-must-log-in .wrap-comment-form-comment { flex: 0 0 70%; }
#review_form .wrap-user-must-log-in .wrap-comment-form-rating  {}

@media (max-width: 849px) {
    #review_form .sgce-review-form { flex-direction: column; gap: 16px; }
    #review_form .sgce-review-form .wrap-comment-form-comment,
    #review_form .sgce-review-form .wrap-comment-form-rating { flex-basis: 100%; }
    #review_form .wrap-user-must-log-in { flex-direction: column; gap: 16px; }
    #review_form .wrap-user-must-log-in .wrap-comment-form-comment,
    #review_form .wrap-user-must-log-in .wrap-comment-form-rating { flex-basis: 100%; }
}

/* Inputs look like rounded grey fields */
#review_form .sgce-review-form p {margin: 0;}
#review_form .sgce-review-form p a {
    text-decoration: underline;
}
#review_form .sgce-review-form input[type="text"],
#review_form .sgce-review-form input[type="email"],
#review_form .sgce-review-form input[type="tel"],
#review_form .sgce-review-form textarea {
    width: 100%;
    background: var(--sgce-light-bg);
    border: 0;
    border-radius: var(--sgce-border-radius);
    padding: 12px 16px;
    box-shadow: none;
    outline: none;
    margin-bottom: 0;
}
#review_form .sgce-review-form textarea {
    min-height: 180px;
    resize: vertical;
}
#review_form .sgce-review-form textarea:disabled {
    cursor: not-allowed;
    background: var(--sgce-disabled-field-color);
}

/* Hide labels visually (keep rating label visible) */
#review_form .sgce-review-form p.comment-form-author > label,
#review_form .sgce-review-form p.comment-form-email > label,
#review_form .sgce-review-form p.comment-form-phone > label,
#review_form .sgce-review-form p.comment-form-comment > label {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Rating row: label + stars inline */
#review_form .sgce-review-form .comment-form-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}
#review_form .sgce-review-form .comment-form-rating > label {
    margin: 0;
    color: var(--sgce-text-color, var(--sgce-primary-color));
    font-weight: 600;
    font-size: var(--sgce-font-size);
}

/* Submit button spacing */
#review_form .sgce-review-form .form-submit { margin-top: 0; }
#review_form .sgce-review-form .form-submit input[type="submit"] {
    border-radius: var(--sgce-border-radius);
}

#comments .woocommerce-noreviews {
    margin-bottom: 0;
}

/* Review form: 5-star interactive rating */
.comment-form-rating .rating-stars {
    display: inline-flex;
    flex-direction: row-reverse; /* Show 1..5 visually while keeping 5..1 in DOM */
}
.comment-form-rating .rating-stars input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.comment-form-rating .rating-stars label {
    cursor: pointer;
    color: #c7c7c7; /* inactive */
    font-size: 20px;
    line-height: 1;
    padding: 0 2px;
}
.comment-form-rating .rating-stars label::before {
    content: '★';
    font-family: inherit;
}
/* Hover fill to the left (thanks to row-reverse + DOM order 5..1) */
.comment-form-rating .rating-stars label:hover,
.comment-form-rating .rating-stars label:hover ~ label {
    color: var(--fs-color-primary, #f1b21b);
}
/* Checked state fill */
.comment-form-rating .rating-stars input:checked ~ label {
    color: var(--fs-color-primary, #f1b21b);
}
/* Keyboard focus accessibility */
.comment-form-rating .rating-stars input:focus + label {
    outline: 2px solid var(--fs-color-primary, #f1b21b);
    outline-offset: 2px;
}

/*********** Product tabs ***********/
.type-product .product-tabs > li > a {font-size: var(--sgce-font-size);}


/*********** Product readmore description ***********/
#wrap-readmore-description.is-expanded {
    margin-top: var(--sgce-space-4);
}
#wrap-readmore-description .btn-readmore-description {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    margin: auto;
    /* background: #fff; */
    transition: all 300ms;
    height: 40px;
    color: var(--sgce-text-color);
}
#wrap-readmore-description .btn-readmore-description:hover {
    color: #fff;
}
#wrap-readmore-description .btn-readmore-description i {
    margin-left: auto;
    margin-top: 5px;
}

#wrap-readmore-description .btn-readmore-description[aria-expanded="false"] i {
    transform: rotate(0deg);
}
#wrap-readmore-description .btn-readmore-description[aria-expanded="true"] i {
    transform: rotate(180deg);
}
    
.wrap-more-description {
	margin-top: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
}

#tab-description.is-short-desc {
    max-height: 600px;
    overflow: hidden;
    position: relative;
}

#tab-description.is-short-desc .wrap-more-gradient {
	position: absolute;
	bottom: 0px;
	left: 0px;
	width: 100%;
	height: 200px;
	background-image: linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255));
}

@media (max-width: 480px) {
	.wrap-more-description {
		width: auto;
		margin: 15px 25px;
	}
}

/*********** Video Play/Pause Button ***********/
.sgce-video-container {
    position: relative;
    display: inline-block;
}

.sgce-video-play-pause {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
    min-height: auto;
    outline: none;
}

.sgce-video-play-pause:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.sgce-video-play-pause i {
    display: block;
    line-height: 1;
    border: 0 solid rgb(34 34 34 / 70%);
    border-radius: 100%;
}