/* Single Product Page Layout */

.product-single {
    display: block;
    margin-bottom: 40px;
}

/* Gallery + Summary: 50/50 flex on desktop */
.product-main-row {
    display: flex;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
    width: 100%;
}

.product-gallery,
.product-summary {
    flex: 1 1 calc(50% - 20px);
    min-width: 0;
}

/* Tabs: full width below */
.product-tabs-row {
    width: 100%;
}


/* ── Product Gallery ─────────────────────────────────────────────────────── */

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Main image */
.product-gallery__main {
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.product-gallery__zoom {
    display: block;
    cursor: zoom-in;
}

.product-gallery__main img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 8px;
}

/* Prev / next arrows */
.product-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: background 0.15s, opacity 0.15s;
    opacity: 0.7;
}

.product-gallery__arrow:hover {
    opacity: 1;
    background: #fff;
}

.product-gallery__arrow--prev {
    left: 10px;
}

.product-gallery__arrow--next {
    right: 10px;
}

/* Hidden-by-colour thumbs */
.product-gallery__thumb.is-color-hidden {
    display: none;
}

/* Thumbnail strip */
.product-gallery__thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.product-gallery__thumbs::-webkit-scrollbar {
    height: 4px;
}

.product-gallery__thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.product-gallery__thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
}

.product-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.product-gallery__thumb:hover img,
.product-gallery__thumb.is-active img {
    opacity: 1;
}

.product-gallery__thumb.is-active {
    border-color: #333;
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */

#product-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

#product-lightbox .lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

#product-lightbox .lb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 16px;
}

#product-lightbox .lb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}

#product-lightbox .lb-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

#product-lightbox .lb-close,
#product-lightbox .lb-prev,
#product-lightbox .lb-next {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#product-lightbox .lb-close,
#product-lightbox .lb-prev,
#product-lightbox .lb-next {
    background: rgba(255, 255, 255, 0.15);
}

#product-lightbox .lb-close:hover,
#product-lightbox .lb-prev:hover,
#product-lightbox .lb-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

#product-lightbox .lb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
}

#product-lightbox .lb-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

body.lb-open {
    overflow: hidden;
}


/* ── Product Summary ─────────────────────────────────────────────────────── */

.product-summary h1,
.product-summary .product_title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

.product-summary .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-summary .woocommerce-product-rating .stars {
    width: 74px;
    height: 14px;
    background: url("../images/icons/star-rating.svg") center center no-repeat;
}

.product-summary .price {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.product-summary .short-description,
.product-summary .woocommerce-product-details__short-description {
    margin-bottom: 16px;
    color: #666;
    line-height: 1.6;
}

/* Variations Form */
.variations_form {
    margin-bottom: 30px;
}

.variations {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.variations .label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.variations .value {
    display: block;
}

/* Swatches */
.swatches-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Hide select dropdown when swatches are shown */
.value.with-swatches select {
    display: none !important;
}

.swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    font-size: 14px;
    user-select: none;
}

.swatch:hover {
    border-color: #333;
}

.swatch.active-swatch {
    border-color: #000;
    background: #f8f8f8;
    font-weight: 600;
}

.swatch.swatch-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.swatch-with-bg {
    background-size: cover;
    background-position: center;
    min-width: 60px;
    min-height: 60px;
}

/* Dropdowns */
.variations select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Reset Variations */
.reset-variations-wrapper {
    margin-top: 10px;
}

.reset_variations {
    font-size: 13px;
    color: #666;
    text-decoration: underline;
}

.reset_variations:hover {
    color: #000;
}

/* Price Display */
.pewc-product-extra-groups-wrap {
    margin: 20px 0;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.pewc-total-field {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.product-pricing {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-pricing .product-available-payments {
    display: flex;
}

.product-pricing .product-available-payments img {
    height: 32px;
    width: auto;
}

/* Add to Cart Button */
.single_variation_wrap {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.single_variation_wrap .quantity {
    display: flex;
}

.single_add_to_cart_button {
    width: 100%;
    padding: 16px 32px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.single_add_to_cart_button:hover {
    background: #333;
}

.single_add_to_cart_button.disabled,
.single_add_to_cart_button.wc-variation-selection-needed {
    background: #ccc;
    cursor: not-allowed;
}

.single_add_to_cart_button.loading {
    opacity: 0.6;
    cursor: wait;
}

/* Product Benefits */
.product-benefits {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #C6CBD1;
}

.product-benefits .item {
    width: calc(50% - 5px);
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 5px;
}

/* ── Product Tabs ────────────────────────────────────────────────────────── */

.product-tabs-row {
    margin-top: 48px;
}

.product-tabs__nav {
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 0 0;
    border-bottom: 2px solid #e5e5e5;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-tabs__nav::-webkit-scrollbar {
    display: none;
}

.product-tabs__btn {
    flex-shrink: 0;
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.product-tabs__btn:hover {
    color: #111;
}

.product-tabs__btn.is-active {
    color: #111;
    border-bottom-color: #111;
    font-weight: 600;
}

.product-tabs__panels {
    padding: 32px 0;
}

.product-tabs__panel {
    display: none;
}

.product-tabs__panel.is-active {
    display: block;
}

/* Reviews below tabs */
.product-reviews {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
}


/* Admin Tooltip */
.tooltip1 {
    position: relative;
    display: inline-block;
    width: 50%;
    margin-top: 20px;
}

.tooltip1 .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 150%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip1 .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip1:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Measurement Inputs */
.pewc-product-extra-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.pewc-item {
    flex: 1;
    min-width: 200px;
}

.pewc-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.pewc-form-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ── Product Reviews ─────────────────────────────────────────────────────── */

.product-reviews__inner {
    max-width: 800px;
}

/* Header row */
.reviews-list__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.reviews-list__title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.reviews-list__title span {
    font-weight: 400;
    color: #666;
}

/* Toggle button */
.reviews-toggle-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.reviews-toggle-btn:hover {
    background: #333;
}

.reviews-toggle-btn--back {
    background: none;
    color: #666;
    padding: 0;
    font-size: 14px;
}

.reviews-toggle-btn--back:hover {
    background: none;
    color: #111;
}

/* Rating summary */
.reviews-summary {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 24px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 32px;
}

.reviews-summary__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    gap: 4px;
}

.reviews-summary__number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.reviews-summary__count {
    font-size: 13px;
    color: #666;
    text-align: center;
}

.reviews-summary__bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reviews-summary__bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.reviews-summary__bar-label {
    width: 24px;
    text-align: right;
    color: #666;
}

.reviews-summary__bar-track {
    flex: 1;
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.reviews-summary__bar-fill {
    height: 100%;
    background: #f0a500;
    border-radius: 4px;
    transition: width 0.3s;
}

.reviews-summary__bar-count {
    width: 20px;
    color: #666;
    font-size: 13px;
}

/* Comment list */
.reviews-comments {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.review-item {
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.reviews-comments li:last-child .review-item {
    border-bottom: none;
    padding-bottom: 0;
}

.review-item__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.review-item__author {
    font-size: 15px;
    font-weight: 600;
}

.review-item__verified {
    font-size: 12px;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 2px 8px;
    border-radius: 20px;
}

.review-item__date {
    font-size: 13px;
    color: #999;
    margin-left: auto;
}

.review-item__rating {
    margin-bottom: 6px;
}

.review-item__content {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.reviews-no-reviews {
    color: #666;
    font-style: italic;
}

/* Review form wrapper */
.review-form-wrapper__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.review-form-wrapper__header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Star rating selector */
.star-rating-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.star-rating-select__stars {
    display: flex;
    gap: 4px;
}

.star-rating-select__stars button {
    background: none;
    border: none;
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    padding: 0;
    transition: color 0.1s;
    line-height: 1;
}

.star-rating-select__stars button.is-active,
.star-rating-select__stars button.is-hover {
    color: #f0a500;
}

/* Comment form fields */
.comment-form-rating {
    margin-bottom: 16px;
}

.comment-form-rating label,
.comment-form-author label,
.comment-form-email label,
.comment-form-comment label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.comment-form-author,
.comment-form-email,
.comment-form-comment {
    margin-bottom: 16px;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-comment textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.comment-form-comment textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit .submit {
    padding: 12px 32px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.form-submit .submit:hover {
    background: #333;
}


/* ── Short description toggle ────────────────────────────────────────────── */

.woocommerce-product-details__short-description .short-description__text {
    display: none; /* hidden by default, shown via JS */
}

.short-description__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 0;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #1A73E8;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.short-description__toggle:hover {
    text-decoration: none;
}

.short-description__toggle[aria-expanded="false"] .short-description__toggle-less,
.short-description__toggle[aria-expanded="true"] .short-description__toggle-more {
    display: none;
}

/* ── Attribute Accordion ─────────────────────────────────────────────────── */

.attr-accordion {
    display: flex;
    flex-direction: column;
    margin: 16px 0;
    border-top: 1px solid #E5E7EB;
}

.attr-accordion__item {
    border-bottom: 1px solid #E5E7EB;
}

.attr-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    gap: 12px;
}

.attr-accordion__title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* Checkmark — show when done, regardless of open/closed */
.attr-accordion__check {
    display: none;
    color: #22C55E;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.attr-accordion__item.is-done .attr-accordion__check {
    display: inline;
}

.attr-accordion__name {
    font-weight: 600;
    color: #111;
    flex-shrink: 0;
}

.attr-accordion__name::after {
    content: ':';
    font-weight: 600;
}

/* Selected summary — only when closed */
.attr-accordion__selected {
    color: #6B7280;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.attr-accordion__item:not(.is-open) .attr-accordion__selected {
    display: inline;
}

/* Arrow indicator */
.attr-accordion__arrow {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #6B7280;
    border-bottom: 2px solid #6B7280;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-bottom: 3px;
}

.attr-accordion__item.is-open .attr-accordion__arrow {
    transform: rotate(-135deg);
    margin-bottom: -3px;
}

.attr-accordion__body {
    padding-bottom: 16px;
}

.attr-accordion__body select {
    width: 100%;
}

/* ── Sticky add-to-cart bar ──────────────────────────────────────────────── */

.sticky-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border-top: 1px solid #E5E7EB;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    transform: translateY(100%);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.sticky-cart.is-visible {
    transform: translateY(0);
    pointer-events: auto;
}

.sticky-cart__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.sticky-cart__img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.sticky-cart__img[src=""] {
    display: none;
}

.sticky-cart__title {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sticky-cart__price {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sticky-cart__btn {
    flex-shrink: 0;
    padding: 10px 24px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.sticky-cart__btn:hover {
    background: #333;
}

@media (max-width: 600px) {
    .sticky-cart__title {
        display: none;
    }
}
