/* ── Single product page ───────────────────────────────────────────────────── */
.single-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}
.images-wrapper,
.content-wrapper {
    width: calc(50% - 1rem);
}
@media screen and (max-width: 768px) {
    .images-wrapper,
    .content-wrapper {
        width: 100%;
    }
}

/* Image gallery wrapper */
.img-gallery-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Thumbnail strip */
.img-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-height: 32rem;
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #cecece transparent;
}
.img-gallery::-webkit-scrollbar {
    width: 4px;
}
.img-gallery::-webkit-scrollbar-thumb {
    background: #cecece;
    border-radius: 2px;
}

.img-thumb {
    width: 5.5rem;
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid #ececec;
    border-radius: 0.625rem;
    background: #f5f5f5;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.25s ease;
    flex-shrink: 0;
}
.img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-thumb.active,
.img-thumb:hover {
    border-color: var(--color-primary);
}

/* Featured image area */
.featured-img {
    flex: 1;
    position: relative;
    border-radius: 1rem;
    background: #f5f5f5;
    overflow: hidden;
    border: 2px solid #ececec;
}

.featured-img-slides {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.featured-img-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-img-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}
.featured-img-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prev / Next buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        box-shadow 0.2s ease,
        background 0.2s ease;
}
.gallery-nav:hover {
    background: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.gallery-nav svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #333;
}
.gallery-nav--prev {
    left: 0.75rem;
}
.gallery-nav--next {
    right: 0.75rem;
}

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

.summary-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Breadcrumb */
.summary-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--color-text);
}
.summary-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.summary-breadcrumb a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}
.summary-breadcrumb a:hover {
    color: var(--color-primary);
}
.summary-breadcrumb .breadcrumb-sep {
    color: #aaa;
    font-size: 0.75rem;
}

/* Title */
.summary-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--title-black);
    margin: 0;
}

/* Short description */
.summary-description {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
}
.summary-description p {
    margin: 0 0 0.75rem 0;
}
.summary-description p:last-child {
    margin-bottom: 0;
}
.summary-description ol,
.summary-description ul {
    margin: 0.5rem 0 0.75rem 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.summary-description strong,
.summary-description b {
    color: var(--title-black);
}

/* Price */
.summary-price {
    margin: 1rem 0;
}
.summary-price .woocommerce-Price-amount,
.summary-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #456e89;
    line-height: 1;
}
.summary-price ins {
    text-decoration: none;
}
.summary-price del {
    opacity: 0.45;
    font-size: 1.125rem;
}

/* ── Add to cart form ─── */
.summary-form .variations {
    width: 100%;
    border: none;
    border-collapse: collapse;
    margin-bottom: 0.5rem;
}
.summary-form .variations tr {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.summary-form .variations td.label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--title-black);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    min-width: 3rem;
    padding: 0;
}
.summary-form .variations td.value {
    flex: 1;
    padding: 0;
}
.summary-form .variations select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 0.5rem;
    background-color: #fff;
    font-size: 0.9375rem;
    color: var(--color-text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.summary-form .variations select:focus {
    outline: none;
    border-color: var(--color-primary);
}
.summary-form .reset_variations {
    display: none !important;
}

/* Quantity */
.summary-form .quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.summary-form .qty {
    width: 3rem;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--title-black);
    -moz-appearance: textfield;
    appearance: textfield;
}
.summary-form .qty::-webkit-inner-spin-button,
.summary-form .qty::-webkit-outer-spin-button {
    appearance: none;
}
.woocommerce-variation-price {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}
.woocommerce-variation-availability {
    margin-bottom: 1rem;
}
.woocommerce form .qty-btn {
    padding: 20px;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid #d0d0d0;
    background: #f5f5f5;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--title-black);
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}
.qty-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

/* Buttons row */
.summary-form .woocommerce-variation-add-to-cart,
.summary-form form.cart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: none;
    background-color: transparent;
    padding: 0;
}
.summary-buttons {
    display: flex;
    gap: 0.75rem;
}
.summary-form .single_add_to_cart_button,
.summary-form button[name="add-to-cart"],
.woocommerce .summary-form a.button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 6.25rem;
    border: none;
    background-color: #3d3d3d;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.25s ease;
    line-height: 1;
}
.summary-form .single_add_to_cart_button:hover,
.summary-form button[name="add-to-cart"]:hover {
    background-color: #222;
}
.summary-form .buy-now-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 6.25rem;
    border: none;
    background-color: #5a5a5a;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.25s ease;
    line-height: 1;
}
.summary-form .buy-now-btn:hover {
    background-color: #3d3d3d;
}

/* Product Summary */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
    .summary-form
    button.button.single_add_to_cart_button {
    background-color: #456e89;
    border-radius: 50px;
    padding: 1rem;
}
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
    .summary-form
    button.button.single_add_to_cart_button:hover {
    background-color: #222;
}

/* ── Content tabs ─────────────────────────────────────────────────────────── */

.content-section {
    padding: 2rem 1rem 4rem;
    margin: 4rem 0 3rem 0;
}

.content-tabs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Tab nav */
.content-tab-nav {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.content-tab-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 6.25rem;
    border: 1px solid #d0d0d0;
    background: transparent;
    color: var(--color-text);
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
    line-height: 1.4;
}
.content-tab-btn.active {
    background: #456e89;
    border-color: #456e89;
    color: #fff;
    font-weight: 500;
}
.content-tab-btn:not(.active):hover {
    border-color: #999;
    color: var(--title-black);
}

/* Tab panels */
.content-tab-panel {
    display: none;
    background: #f5f5f5;
    border-radius: 1rem;
    padding: 2rem;
}
.content-tab-panel.active {
    display: block;
}

.content-panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--title-black);
    margin: 0 0 1.25rem 0;
}

.content-panel-body {
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.6;
}
.content-panel-body p {
    margin: 0 0 0.75rem 0;
}
.content-panel-body p:last-child {
    margin-bottom: 0;
}
.content-panel-body a {
    word-break: break-word;
    overflow-wrap: break-word;
}
.content-panel-body strong,
.content-panel-body b {
    color: var(--title-black);
}
.woocommerce .product-tab-image {
	width: 100%;
	height: auto;
	max-width: 620px;
    aspect-ratio: 5.4 / 7;
}

/* Attributes table */
.content-attr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.content-attr-table tr {
    border: 1px solid #e0e0e0;
}
.content-attr-table tr:first-child {
    border-top: 1px solid #e0e0e0;
}
.content-attr-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    background: #fff;
}
.attr-label {
    width: 30%;
    color: var(--color-primary);
    font-weight: 400;
    white-space: nowrap;
}
.attr-value {
    color: var(--color-text);
    border-left: 1px solid #e0e0e0;
}
.out-of-stock {
	font-size: 1.25rem;
    margin: 0;
    color: #e60023;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Responsive ─── */
@media screen and (max-width: 767px) {
    .content-section {
        padding: 1rem 0;
    }
    .content-tab-panel {
        padding: 1rem;
    }
    .img-gallery-wrapper {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    .img-gallery {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
    }
    .img-thumb {
        width: 4rem;
    }
    .gallery-nav {
        width: 2rem;
        height: 2rem;
    }
    .gallery-nav svg {
        width: 1rem;
        height: 1rem;
    }
    #related-products {
        padding: 0;
    }
}

#related-products {
    margin-bottom: 1.25rem;
    padding-bottom: 4rem;
}
.related-product-item {
    position: relative;
}
.related-product-heading-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.77rem;
    margin-bottom: 2.38rem;
    position: relative;
}
.related-products-title {
    color: var(--title-black);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 110%;
    width: 100%;
    margin: 0;
}
.related-products-text {
    width: 100%;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 140%;
    margin: 0;
}
.related-products-row {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.25rem;
    row-gap: 3rem;
}
#related-products .product-item-price {
    margin: 0 0 1rem 0;
}
@media screen and (min-width: 768px) {
    .related-products-title {
        font-size: 2.5rem;
    }
    .related-products-text {
        font-size: 1.125rem;
    }
    .related-products-title,
    .related-products-text {
        width: calc(50% - 0.385rem);
    }
}