body {
    background-color: #F6F6F6;
}

.product-page-info {
    display: flex;
    gap: 20px;
}

.product-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 12px 14px;
    background: #fef2f2;
    border-radius: 10px;
    border: 1px solid #fde8e8;
    font-size: 12px;
}

.page-title-block {
    padding-bottom: 32px;
    background-color: transparent;
}

.product-photo-column {
    width: 555px;
    min-width: 555px;
    height: auto;
}

.product-gallery-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 450px auto;
    gap: 10px;
    position: sticky;
    top: 90px;
}

.product-main-swiper {
    order: 1;
}

.product-thumbs-swiper {
    order: 2;
    width: 450px;
    height: 90px;
}

.product-thumbs-swiper .swiper-slide {
    width: 90px !important;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-thumbs-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbs-swiper .swiper-slide {
    border: 2px solid transparent;
}

.product-thumbs-swiper .swiper-slide-thumb-active {
    border: 2px solid var(--color-violet);
}

.product-main-swiper {
    width: 450px;
    height: 450px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.product-main-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-swiper .swiper-slide img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-button-prev,
.gallery-button-next {
    display: none;
}

.gallery-button-prev {
    left: 8px;
}

.gallery-button-next {
    right: 8px;
}

.product-info-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.product-actions-column {
    width: 325px;
    min-width: 325px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
@media (max-width: 1400px) {
    .product-actions-column {
        width: 250px;
        min-width: 250px;
    }
}
@media (max-width: 1300px) {
    .product-actions-column {
        width: 210px;
        min-width: 210px;
    }
}

.product-page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-page-header h1 {
    font-size: 24px;
    color: var(--color-gray-dark);
    font-weight: 600;
}

.gray-label {
    font-size: 14px;
    color: #676767;
    font-weight: 400;
}

.product-page-header .gray-label {
    font-size: 16px;
    color: #676767;
}

.product-page-header p {
    font-size: 16px;
    color: var(--color-gray-dark);
    font-weight: 500;
}

.size-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.size-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.size-table-button {
    display: flex;
    gap: 4px;
    align-items: center;
}

.size-table-button p {
    font-size: 14px;
    color: #5159FE;
}

.color-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px;
    padding: 4px;
    box-sizing: border-box;
    outline: 1px solid rgba(232, 232, 232, 1);
    outline-offset: 0;
    border: none;
    cursor: pointer;
    transition: outline-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    background-clip: content-box !important;
}

.color-swatch--hidden {
    display: none;
}

.color-swatch:hover {
    transform: scale(1.05);
}

.color-swatch--active {
    outline: 2px solid var(--swatch-accent, rgba(0, 0, 0, 0.35));
    outline-offset: 1px;
    z-index: 1;
}

.all-colors-link {
    font-size: 14px;
    color: #5159FE !important;
    text-decoration: none !important;
    align-self: flex-start;
}

.all-colors-link:hover {
    text-decoration: underline;
}

/* Состояние товара (новый/уценённый) */
.condition-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.condition-tabs {
    display: flex;
    gap: 8px;
}

.condition-tab {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray-dark);
    text-decoration: none;
    background-color: #FFFFFF;
    border: 2px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

.condition-tab:hover:not(.condition-tab--disabled):not(.condition-tab--active) {
    background-color: #E0E0E0;
}

.condition-tab--active {
    background-color: #fff;
    border-color: #DC2626;
}

.condition-tab--disabled {
    pointer-events: none;
    opacity: 0.6;
    cursor: default;
}

.condition-defect {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.condition-defect span {
    color: #676767; 
    font-size: 12px;
    font-weight: 500;
}

.condition-defect-text {
    font-size: 12px;
    color: #676767;
    line-height: 1.2;
}

.condition-warning {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 10px;
    background-color: #FDF2F2;
    border-radius: 8px;
    font-size: 14px;
    color: #B91C1C;
    line-height: 1.4;

    margin-top: 2px;
    align-items: center;
}

.condition-warning-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #DC2626;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.product-specs-short {
    display: flex;
    flex-direction: column;
}

.subheading-18 {
    font-size: 18px;
    color: var(--color-gray-dark);
    font-weight: 700;
    line-height: 120%;
}

.product-specs-short-list {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0px;
    border-bottom: 1px solid transparent;
    gap: 20px;
}

.spec-preview-row {
    width: auto !important;
}

.spec-row {
    width: calc((100% - 60px) / 2);
    border-bottom: 1px solid #E8E8E8;
}

@media (max-width: 990px) {
    .spec-row {
        width: auto;
    }
}

/* Таб-меню */
.detailed-info-section {
    margin-top: 82px;
}

.tabs-nav {
    display: flex;
    gap: 24px;
}

.tab-btn {
    position: relative;
    padding: 0px 0px 6px 0px;
    background: transparent;
    border: none;
    font-size: 24px;
    font-weight: 700;
    color: #676767;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--color-gray-dark);
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    background: var(--color-red);
    border-radius: 2px;
}

.tabs-content {
    padding-top: 16px;
}

.tab-panel[hidden] {
    display: none;
}

.rich-text {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.rich-text p {
    color: #676767;
    line-height: 120%;
    font-size: 14px;
}

.rich-text ul {
    padding-left: 18px;
}

.product-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 14px;
}

.product-description table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: center;
}

.product-description table tr:first-child td {
    background-color: #f5f5f5;
    font-weight: 500;
    color: #333;
}

.product-description img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.product-description #tablemer {
    margin: 2em 0;
}

.product-description #tablemer img {
    margin-bottom: 1em;
}

.product-description #tablemer p {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 0.5em;
}

.product-description a {
    color: #1D4ED8;
    text-decoration: none;
}

.product-description a:hover {
    text-decoration: underline;
}

.product-description ul.list {
    list-style: disc;
    padding-left: 20px;
    margin: 1em 0;
}

.product-description ul.list li {
    margin-bottom: 0.5em;
    color: #676767;
    line-height: 1.4;
}


.related-products-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
}

.related-products-section h3 {
    font-size: 60px;
    font-weight: 800;
    color: var(--color-gray-dark)
}

.related-products-slider {
    display: flex;
    gap: 10px;
}

.related-products-slider .product-card {
    width: calc((100% - 10px * 4) / 5) !important;
}

.related-products-slider .product-card:hover .open-preview {
    display: none;
    font-weight: 500;
}

.specs-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 40px;
    margin-bottom: 82px;
}

.specs-section .subheading {
    margin-bottom: 2px;
}

.subheading {
    font-size: 24px;
    color: var(--color-gray-dark);
    font-weight: 700;
    line-height: 120%;
}

.specs-columns {
    display: flex;
    column-gap: 60px;
    row-gap: 0px;
    flex-wrap: wrap;
}

.specs-columns > .spec-row {
    width: calc((100% - 60px) / 2);
    gap: 40px;
}

.specs-column {
    width: calc((100% - 60px) / 2);
    display: flex;
    flex-direction: column;
}

.specs-column .subheading-18 {
    margin-bottom: 2px;
}

.spec-row:has(+ .subheading-18) {
    margin-bottom: 12px;
    border-bottom: 1px solid transparent;
}

#deatiledInfo {
    scroll-margin-top: 90px;
}

.product-page-section .preview-add-to-cart-button {
    width: 100%;
}
.product-page-section .mini-quantity-control {
    opacity: 1;
    height: auto;
    padding: 10px 8px;
    margin-bottom: 8px;
    border-width: 1px;
    overflow: visible;
}

.product-photo-column .popular-catalog-card__top-rating {
    position: absolute;
    top: 12px;
    left: 12px;
    width: fit-content;
}

@media (max-width: 990px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-title-block {
        padding: 24px 0;
        gap: 2px;
    }

    .breadcrumbs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .breadcrumbs img {
        width: 12px;
        height: 12px;
    }

    .product-page-section {
        margin-top: 0;
    }

    .product-page-info {
        flex-direction: column;
        gap: 24px;
    }

    .product-photo-column {
        width: 100%;
        min-width: unset;
    }

    .product-gallery-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
        position: static;
    }

    .product-thumbs-swiper {
        width: 100%;
        height: auto;
        order: 2;
        overflow: hidden;
    }

    .product-thumbs-swiper .swiper-slide {
        width: 80px !important;
        height: 80px;
        flex-shrink: 0;
    }

    .product-main-swiper {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        order: 1;
        overflow: hidden;
    }

    .product-main-swiper .swiper-slide {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .product-main-swiper .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .gallery-button-prev,
    .gallery-button-next {
        display: none !important;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        z-index: 10;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .gallery-button-prev::after,
    .gallery-button-next::after {
        content: '';
        width: 8px;
        height: 8px;
        border-top: 2px solid #333;
        border-right: 2px solid #333;
    }

    .gallery-button-prev::after {
        transform: rotate(-45deg);
        margin-right: 2px;
    }

    .gallery-button-next::after {
        transform: rotate(135deg);
        margin-left: 2px;
    }

    .gallery-button-prev:hover,
    .gallery-button-next:hover {
        background: rgba(255, 255, 255, 1);
    }

    .product-info-column {
        gap: 20px;
    }

    .product-page-header h1 {
        font-size: 20px;
    }

    .product-page-header .gray-label {
        font-size: 14px;
    }

    .product-page-header p {
        font-size: 14px;
    }

    .size-section-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .size-table-button p {
        font-size: 12px;
    }

    .product-actions-column {
        width: 100%;
        min-width: unset;
        gap: 16px;
    }

    .preview-buttons-container {
        width: 100%;
    }

    .preview-buttons-container-upper {
        flex-wrap: wrap;
        gap: 12px;
    }

    .preview-price-container p {
        font-size: 24px;
    }

    .preview-price-container span {
        font-size: 14px;
    }

    .product-specs-short {
        gap: 16px;
    }

    .subheading-18 {
        font-size: 16px;
    }

    .spec-row {
        padding: 10px 0;
        gap: 12px;
    }

    .spec-row .gray-label {
        font-size: 12px;
    }

    .spec-row p {
        font-size: 14px;
        text-align: right;
    }

    .read-description-button {
        width: 100%;
        justify-content: center;
    }

    .related-products-section {
        margin-top: 32px;
        gap: 24px;
    }

    .related-products-section h3 {
        font-size: 32px;
    }

    .related-products-slider {
        flex-wrap: wrap;
        gap: 12px;
    }

    .related-products-slider .product-card {
        width: calc((100% - 12px) / 2) !important;
        min-width: unset;
    }

    .detailed-info-section {
        margin-top: 48px;
    }

    .tabs-nav {
        flex-wrap: wrap;
        gap: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        font-size: 16px;
        white-space: nowrap;
        padding: 0 0 4px 0;
    }

    .tabs-content {
        padding-top: 12px;
    }

    .rich-text p {
        font-size: 14px;
    }

    .specs-section {
        margin-top: 32px;
        margin-bottom: 48px;
        gap: 12px;
    }

    .specs-section .subheading {
        font-size: 20px;
    }

    .specs-columns {
        flex-direction: column;
        gap: 0;
    }

    .specs-columns > .spec-row {
        width: 100%;
        gap: 20px;
    }

    #deatiledInfo {
        scroll-margin-top: 20px;
    }

    .product-branding-container {
        width: 100%;
    }

    .chosen-brandings {
        flex-wrap: wrap;
        gap: 8px;
    }

    .branding-card {
        min-width: unset;
    }

    .delivery-calculator {
        width: 100%;
    }

    .package-inputs-wrapper {
        grid-template-columns: 1fr;
    }

    .package-input-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .product-page-header h1 {
        font-size: 18px;
    }

    .related-products-section h3 {
        font-size: 24px;
    }

    .related-products-slider .product-card {
        width: 100% !important;
    }

    .specs-section .subheading {
        font-size: 18px;
    }

    .tab-btn {
        font-size: 14px;
    }

    .preview-price-container p {
        font-size: 20px;
    }
}