/* --- SINGLE PRODUCT LAYOUT --- */
.tdps-sp-layout {
    display: grid;
    gap: 24px;
    padding-block: 24px;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    width: 100%;
}

@media (min-width: 1025px) {
    .tdps-sp-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 250px;
    }
    .tdps-sp-gallery-col {
        position: sticky;
        top: calc(var(--tdps-header-height) + 16px);
        align-self: start;
        display: block;
    }
    .tdps-sp-sidebar-col {
        position: sticky;
        top: calc(var(--tdps-header-height) + 16px);
        align-self: start;
        width: 250px;
        overflow: visible;
    }
    .tdps-sp-content-col {
        align-self: start;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tdps-sp-layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 24px;
    }
    .tdps-sp-gallery-col {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        position: static;
        align-self: start;
        max-height: none;
        overflow: visible;
        display: block;
        height: auto;
    }
    .tdps-sp-sidebar-col {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        position: sticky;
        top: calc(var(--tdps-header-height) + 16px);
        align-self: start;
        width: 250px;
        overflow: visible;
    }
    .tdps-sp-content-col {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        align-self: start;
    }
}

@media (max-width: 768px) {
    .tdps-sp-layout {
        gap: 16px;
        padding-block: 12px;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        padding-inline: 8px;
    }
    .tdps-sp-title {
        font-size: 2.1875rem;
        line-height: 1.3;
        margin-bottom: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        cursor: pointer;
    }
    .tdps-sp-title.expanded {
        -webkit-line-clamp: unset;
        overflow: visible;
    }
    .tdps-sp-gallery-col {
        order: 1;
        position: static;
        max-height: none;
        overflow: visible;
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        width: 100%;
        padding: 0;
        display: block;
        height: auto;
    }
    .tdps-sp-sidebar-col {
        order: 2;
        position: static;
        width: 100%;
        max-height: none;
        overflow: visible;
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        height: auto;
    }
    .tdps-sp-content-col {
        order: 3;
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }
}

/* ============================================================
   НАЗВАНИЕ ТОВАРА (планшеты до 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .tdps-sp-title {
        font-size: 2.1875rem;
    }
}

/* ============================================================
   НАЗВАНИЕ ТОВАРА (общие стили)
   ============================================================ */
.tdps-sp-title {
    font-size: 2.1875rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.tdps-sp-title:hover {
    color: var(--tdps-color-primary);
}

.tdps-sp-title.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.tdps-title-hint {
    display: none;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--tdps-color-text-muted);
    margin-left: 4px;
    white-space: nowrap;
}

.tdps-sp-title.expanded .tdps-title-hint {
    color: var(--tdps-color-primary);
}

/* ============================================================
   ХЛЕБНЫЕ КРОШКИ НА СТРАНИЦЕ ТОВАРА
   ============================================================ */
.tdps-sp-breadcrumbs {
    margin-bottom: 12px;
    font-size: 0.8125rem;
}

.tdps-sp-breadcrumbs .woocommerce-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    color: var(--tdps-color-text-muted);
    padding: 0;
    margin: 0;
}

.tdps-sp-breadcrumbs .woocommerce-breadcrumb a {
    color: var(--tdps-color-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.tdps-sp-breadcrumbs .woocommerce-breadcrumb a:hover {
    color: var(--tdps-color-primary);
}

.tdps-sp-breadcrumbs .woocommerce-breadcrumb .breadcrumb-separator {
    margin: 0 2px;
    color: var(--tdps-color-border);
    font-weight: 300;
}

.tdps-sp-breadcrumbs .woocommerce-breadcrumb .breadcrumb-last {
    color: var(--tdps-color-text-main);
    font-weight: 600;
}

/* ============================================================
   БЛОК СОВМЕСТИМОСТИ (ТЕГИ)
   ============================================================ */
.tdps-compatibility-block {
    margin: 12px 0 18px;
    padding: 8px 0;
    border-top: 1px solid var(--tdps-color-border);
    border-bottom: 1px solid var(--tdps-color-border);
}

.tdps-compatibility-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tdps-color-text-muted);
    margin-right: 4px;
}

.tdps-compatibility-tags {
    display: inline;
    flex-wrap: wrap;
    gap: 4px;
}

.tdps-compatibility-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tdps-color-text-main);
    background: var(--tdps-color-bg-subtle);
    border: 1px solid var(--tdps-color-border);
    border-radius: 100px;
    line-height: 1.4;
    text-decoration: none;
    margin: 2px 2px 2px 0;
}

.tdps-compatibility-tag:hover {
    background: var(--tdps-color-primary);
    color: #fff;
    border-color: var(--tdps-color-primary);
}

.tdps-tag-hidden {
    display: none !important;
}

.tdps-tags-toggle {
    display: inline-block;
    padding: 2px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tdps-color-primary);
    background: none;
    border: 1px solid var(--tdps-color-border);
    border-radius: 100px;
    cursor: pointer;
    margin: 2px 0;
    line-height: 1.4;
}

.tdps-tags-toggle:hover {
    background: var(--tdps-color-primary);
    color: #fff;
    border-color: var(--tdps-color-primary);
}

/* ============================================================
   КРАТКОЕ ОПИСАНИЕ
   ============================================================ */
.tdps-product-excerpt {
    font-size: 0.9375rem;
    color: var(--tdps-color-text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
    padding: 12px 16px;
    background: var(--tdps-color-bg-subtle);
    border-radius: var(--tdps-radius-sm);
    border-left: 3px solid var(--tdps-color-primary);
}

/* ============================================================
   АККОРДЕОН (ТАБЫ)
   ============================================================ */
.tdps-accordion {
    width: 100%;
}

.tdps-accordion-item {
    border-bottom: 1px solid var(--tdps-color-border);
    transition: border-color 0.2s ease;
}

.tdps-accordion-item:last-child {
    border-bottom: none;
}

.tdps-accordion-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 12px;
    cursor: pointer;
    list-style: none;
    border-radius: var(--tdps-radius-md);
    user-select: none;
    scroll-margin-top: calc(var(--tdps-header-height) + 20px);
    transition: background 0.15s ease, padding 0.15s ease;
    position: relative;
    background: var(--tdps-color-bg-subtle);
    border: 1px solid transparent;
}

.tdps-accordion-summary::-webkit-details-marker {
    display: none;
}

.tdps-accordion-summary:hover {
    background: var(--tdps-color-bg-subtle);
    border-color: var(--tdps-color-border);
}

.tdps-accordion-item[open] .tdps-accordion-summary {
    background: var(--tdps-color-bg-surface);
    border-color: var(--tdps-color-primary);
    border-bottom-color: var(--tdps-color-border);
    border-radius: var(--tdps-radius-md) var(--tdps-radius-md) 0 0;
}

.tdps-accordion-summary::after {
    content: '';
    width: 14px;
    height: 14px;
    border-right: 3px solid var(--tdps-color-primary);
    border-bottom: 3px solid var(--tdps-color-primary);
    transform: rotate(45deg);
    margin-left: auto;
    margin-right: 8px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tdps-accordion-item[open] .tdps-accordion-summary::after {
    transform: rotate(-135deg);
    opacity: 1;
}

/* Иконки */
.tdps-accordion-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.8;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.tdps-accordion-icon--description {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E");
}

.tdps-accordion-icon--reviews {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
}

.tdps-accordion-icon--quality {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

.tdps-accordion-icon--order {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9l2 2 4-4'/%3E%3C/svg%3E");
}

.tdps-accordion-icon--delivery {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Crect x='1' y='3' width='15' height='13' rx='2'/%3E%3Cpath d='M16 8h4l3 3v5h-7V8z'/%3E%3Ccircle cx='5.5' cy='16' r='2.5'/%3E%3Ccircle cx='18.5' cy='16' r='2.5'/%3E%3C/svg%3E");
}

.tdps-accordion-icon--files {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

.tdps-accordion-icon--service {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E");
}

.tdps-accordion-title {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--tdps-color-text-main);
}

.tdps-accordion-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tdps-color-text-muted);
    background: var(--tdps-color-bg-subtle);
    padding: 2px 10px;
    border-radius: 100px;
    border: 1px solid var(--tdps-color-border);
}

.tdps-accordion-content {
    padding: 16px 12px 24px 12px;
    line-height: 1.7;
    color: var(--tdps-color-text-main);
    border-left: 1px solid var(--tdps-color-border);
    border-right: 1px solid var(--tdps-color-border);
    border-bottom: 1px solid var(--tdps-color-border);
    border-radius: 0 0 var(--tdps-radius-md) var(--tdps-radius-md);
}

.tdps-accordion-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}

.tdps-accordion-content p:last-child {
    margin-bottom: 0;
}

.tdps-accordion-summary--service {
    background: #f8fafc;
    border-left: 4px solid var(--tdps-color-primary);
}

.tdps-accordion-summary--service:hover {
    background: #f1f5f9;
}

/* ============================================================
   GALLERY
   ------------------------------------------------------------
   Главное фото занимает всю ширину колонки. Высота контейнера
   задаётся самим фото (height: auto) — пропорции сохраняются,
   обрезки и пустот нет.
   ============================================================ */
.tdps-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tdps-gallery__main {
    width: 100%;
    display: block;
    background: #f5f5f5;
    border-radius: var(--tdps-radius-md);
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    position: relative;
    line-height: 0;
}

.tdps-gallery__main:active {
    cursor: pointer;
}

.tdps-gallery__main-img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    background: #f5f5f5;
}

.tdps-gallery__main-img.is-loading {
    opacity: 0.5;
}

.tdps-thumbs-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    overflow: visible;
    flex-shrink: 0;
    margin-top: 10px;
    height: auto;
    min-height: 60px;
}

.tdps-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    overflow: visible;
    flex: 1;
}

.tdps-gallery__thumb-btn {
    display: block;
    aspect-ratio: 1/1;
    border: 2px solid var(--tdps-color-border);
    background: none;
    cursor: pointer;
    border-radius: var(--tdps-radius-sm);
    overflow: hidden;
    padding: 0;
    width: 100%;
    position: relative;
}

.tdps-gallery__thumb-btn.active {
    border-color: var(--tdps-color-primary);
    box-shadow: 0 0 0 2px var(--tdps-color-primary);
}

.tdps-gallery__thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tdps-gallery__thumb-btn .tdps-badge-review {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none;
}

.tdps-thumb-nav {
    background: var(--tdps-color-bg-surface);
    border: 1px solid var(--tdps-color-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.tdps-thumb-nav:hover:not(:disabled) {
    background: var(--tdps-color-bg-subtle);
    border-color: var(--tdps-color-text-muted);
}

.tdps-thumb-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.tdps-thumb-nav svg {
    width: 18px;
    height: 18px;
    stroke: var(--tdps-color-text-main);
}

.tdps-gallery__thumbs .tdps-gallery__thumb-btn {
    display: none;
}

.tdps-gallery__thumbs .tdps-gallery__thumb-btn:nth-child(-n+4) {
    display: block;
}

.tdps-gallery__thumbs.show-next .tdps-gallery__thumb-btn:nth-child(-n+4) {
    display: none;
}

.tdps-gallery__thumbs.show-next .tdps-gallery__thumb-btn:nth-child(n+5):nth-child(-n+8) {
    display: block;
}

@media (max-width: 768px) {
    .tdps-gallery {
        height: auto;
        display: block;
    }
    .tdps-gallery__main {
        height: auto;
        min-height: 0;
    }
    .tdps-gallery__main-img {
        width: 100% !important;
        height: auto !important;
    }
    .tdps-thumbs-wrapper {
        flex-wrap: nowrap;
        margin-top: 8px;
        min-height: 50px;
    }
    .tdps-gallery__thumbs {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 8px;
        grid-template-columns: none;
        padding: 4px 0 8px;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        width: 100%;
    }
    .tdps-gallery__thumbs::-webkit-scrollbar {
        display: none;
    }
    .tdps-gallery__thumbs .tdps-gallery__thumb-btn {
        display: block !important;
        flex: 0 0 70px;
        scroll-snap-align: start;
        aspect-ratio: 1/1;
    }
    .tdps-gallery__thumbs .tdps-gallery__thumb-btn:nth-child(n+5) {
        display: block !important;
    }
    .tdps-gallery__thumbs.show-next .tdps-gallery__thumb-btn:nth-child(-n+4) {
        display: block !important;
    }
    .tdps-gallery__thumbs.show-next .tdps-gallery__thumb-btn:nth-child(n+5):nth-child(-n+8) {
        display: block !important;
    }
    .tdps-thumb-nav {
        display: flex !important;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
}

/* --- SIDEBAR --- */
.tdps-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--tdps-color-bg-surface);
    border: 1px solid var(--tdps-color-border);
    border-radius: var(--tdps-radius-lg);
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    max-height: 100%;
    overflow: visible;
}

@media (max-width: 768px) {
    .tdps-sidebar {
        padding: 14px;
        background: var(--tdps-color-bg-subtle);
        box-shadow: none;
        position: static;
        width: 100%;
        gap: 8px;
    }
}

/* Price Block */
.tdps-price-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tdps-color-border);
}
.tdps-price-label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.tdps-price-wrapper {
    gap: 2px;
}
.tdps-price {
    font-size: 2.64rem;
    font-weight: 800;
    color: var(--tdps-color-primary);
    line-height: 1.1;
}
.tdps-price--sale {
    font-size: 3.38rem;
    font-weight: 800;
    color: #D4A017;
    text-shadow: 0 0 12px rgba(212, 160, 23, 0.25), 0 0 24px rgba(212, 160, 23, 0.08);
    animation: tdps-price-pulse 2s ease-in-out infinite;
}
.tdps-price-old-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}
.tdps-price-old {
    font-size: 1rem;
    color: #95a5a6;
    text-decoration: line-through;
    font-weight: 500;
}
.tdps-badge-sale {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e74c3c;
}

@keyframes tdps-price-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@media (max-width: 768px) {
    .tdps-price {
        font-size: 2.1rem;
    }
    .tdps-price--sale {
        font-size: 2.6rem;
    }
    .tdps-price-old {
        font-size: 0.9rem;
    }
    .tdps-badge-sale {
        font-size: 1rem;
    }
}

/* Timer */
.tdps-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background: #fef2f2;
    border-radius: var(--tdps-radius-md);
    border: 1px solid #fecaca;
    font-weight: 600;
    color: #dc2626;
    flex-wrap: wrap;
}

.tdps-timer-icon {
    font-size: 1rem;
}
.tdps-timer-label {
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tdps-timer-value {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.08);
    padding: 2px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Rating Block */
.tdps-rating-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    cursor: pointer;
    background: var(--tdps-color-bg-subtle);
    border-radius: var(--tdps-radius-md);
    border: 1px solid var(--tdps-color-border);
    transition: border-color 0.2s ease;
}
.tdps-rating-block:hover {
    border-color: var(--tdps-color-primary);
    opacity: 1;
}
.tdps-stars {
    display: flex;
    gap: 4px;
    width: 100%;
    justify-content: center;
}
.tdps-star {
    font-size: 1.2rem;
    line-height: 1;
    flex: 0 0 auto;
}
.tdps-star-filled {
    color: #f5a623;
}
.tdps-star-empty {
    color: #dee2e6;
}
.tdps-rating-count {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tdps-color-text-muted);
}
.tdps-rating-empty {
    color: var(--tdps-color-text-muted);
    font-size: 0.875rem;
}

/* Buy Buttons */
.tdps-buy-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.tdps-cart-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.tdps-quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tdps-color-border);
    border-radius: var(--tdps-radius-md);
    overflow: hidden;
    width: fit-content;
    background: #fff;
}

.tdps-qty-btn {
    background: var(--tdps-color-bg-subtle);
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tdps-qty-btn:hover {
    background: var(--tdps-color-border);
}

.tdps-qty-input {
    width: 50px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--tdps-color-border);
    border-right: 1px solid var(--tdps-color-border);
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.tdps-qty-input::-webkit-outer-spin-button,
.tdps-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tdps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--tdps-radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    width: 100%;
    max-width: 320px;
    text-align: center;
    font-size: 0.875rem;
    min-height: 48px;
}

.tdps-btn-primary {
    background: var(--tdps-color-primary);
    color: #fff;
}
.tdps-btn-primary:hover {
    background: var(--tdps-color-primary-hover);
    color: #fff;
}
.tdps-btn-secondary {
    background: transparent;
    border: 1px solid var(--tdps-color-border);
    color: var(--tdps-color-text-main);
}
.tdps-btn-secondary:hover {
    background: var(--tdps-color-bg-subtle);
    color: var(--tdps-color-text-main);
}
.tdps-btn-buy-now {
    background: #7f54b3;
    color: #fff;
    border: 1px solid #7f54b3;
}
.tdps-btn-buy-now:hover {
    background: #6a3e9c;
    border-color: #6a3e9c;
    color: #fff;
}
.tdps-buy-now-form {
    width: 100%;
    max-width: 320px;
}
.tdps-buy-now-form .tdps-btn-buy-now {
    width: 100%;
}

/* Extras */
.tdps-extras {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--tdps-color-border);
    margin-top: 2px;
}

.tdps-extras .tdps-opt-toggle,
.tdps-extras .tdps-notify-toggle {
    background: #f1f3f5;
    border: 1px solid #e0e4e8;
    font-size: 0.75rem;
    font-weight: 400;
    color: #6c7a8a;
    cursor: pointer;
    text-align: center;
    padding: 4px 18px;
    border-radius: 100px;
    flex: 0 1 auto;
    white-space: nowrap;
    transition: all 0.15s ease;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
}

.tdps-extras .tdps-opt-toggle:hover,
.tdps-extras .tdps-notify-toggle:hover {
    background: #e0e4e8;
    border-color: #c8ced4;
    color: #4a5a6a;
}

.tdps-extras .tdps-notify-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
}

/* Notify form */
.tdps-notify-form {
    display: none;
    padding: 8px 0 4px;
}
.tdps-notify-email {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--tdps-color-border);
    border-radius: var(--tdps-radius-sm);
    font-size: 0.8125rem;
    box-sizing: border-box;
    margin-bottom: 8px;
}
.tdps-notify-email:focus {
    outline: none;
    border-color: var(--tdps-color-primary);
}
.tdps-notify-actions {
    display: flex;
    gap: 8px;
}
.tdps-notify-submit {
    background: var(--tdps-color-primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--tdps-radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8125rem;
}
.tdps-notify-submit:hover {
    background: var(--tdps-color-primary-hover);
}
.tdps-notify-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.tdps-notify-cancel {
    background: none;
    border: 1px solid var(--tdps-color-border);
    padding: 8px 16px;
    border-radius: var(--tdps-radius-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--tdps-color-text-muted);
}
.tdps-notify-cancel:hover {
    background: var(--tdps-color-bg-subtle);
}
.tdps-notify-message {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: var(--tdps-radius-sm);
    font-size: 0.8125rem;
    display: none;
}
.tdps-notify-message.success {
    display: block;
    background: #f0fdf4;
    color: #15803d;
    border-left: 3px solid #22c55e;
}
.tdps-notify-message.error {
    display: block;
    background: #fef2f2;
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}

/* Share */
.tdps-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--tdps-color-border);
    flex-shrink: 0;
}
.tdps-share-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tdps-color-text-muted);
    padding: 4px;
}
.tdps-share-btn:hover {
    color: var(--tdps-color-primary);
}

/* ============================================================
   АВИТО КНОПКА
   ============================================================ */
.tdps-avito-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tdps-btn-avito {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--tdps-radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: 2px solid transparent;
    width: 100%;
    max-width: 320px;
    text-align: center;
    text-decoration: none;
    min-height: 48px;
    box-sizing: border-box;
    white-space: nowrap;
}

.tdps-btn-avito--has-link {
    background: #00a651;
    color: #fff;
    border-color: #00a651;
}
.tdps-btn-avito--has-link:hover {
    background: #008c45;
    border-color: #008c45;
    color: #fff;
}
.tdps-btn-avito--no-link {
    background: #f1f3f5;
    color: #6c7a8a;
    border-color: #e0e4e8;
}
.tdps-btn-avito--no-link:hover {
    background: #e0e4e8;
    border-color: #c8ced4;
    color: #4a5a6a;
}

.tdps-avito-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tdps-avito-icon {
    width: 20px;
    height: 20px;
    display: block;
}
.tdps-btn-avito--has-link .tdps-avito-icon {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}
.tdps-avito-btn-text {
    line-height: 1.2;
}

/* Форма запроса */
.tdps-avito-form {
    width: 100%;
    max-width: 320px;
    margin-top: 4px;
}
.tdps-avito-form-inner {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--tdps-color-border);
    border-radius: var(--tdps-radius-md);
    overflow: hidden;
    background: #fff;
}
.tdps-avito-form-inner:focus-within {
    border-color: var(--tdps-color-primary);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}
.tdps-avito-email {
    flex: 1;
    padding: 8px 12px;
    border: none;
    font-size: 0.8125rem;
    background: #fff;
    color: var(--tdps-color-text-main);
    outline: none;
    min-width: 0;
}
.tdps-avito-email::placeholder {
    color: var(--tdps-color-text-muted);
}
.tdps-avito-submit {
    background: var(--tdps-color-primary);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    transition: background 0.15s ease;
}
.tdps-avito-submit:hover {
    background: var(--tdps-color-primary-hover);
}
.tdps-avito-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.tdps-avito-submit svg {
    stroke: #fff;
    width: 18px;
    height: 18px;
    display: block;
}

.tdps-avito-message {
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: var(--tdps-radius-sm);
    font-size: 0.8125rem;
    display: block;
}
.tdps-avito-message.success {
    background: #f0fdf4;
    color: #15803d;
    border-left: 3px solid #22c55e;
}
.tdps-avito-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}

@media (max-width: 768px) {
    .tdps-btn-avito {
        max-width: 320px;
        width: 100%;
        margin: 0 auto;
        padding: 12px 16px;
        font-size: 0.9375rem;
        min-height: 50px;
    }
    .tdps-avito-form {
        max-width: 320px;
        margin: 4px auto 0;
    }
    .tdps-extras {
        align-items: center;
    }
    .tdps-extras .tdps-opt-toggle,
    .tdps-extras .tdps-notify-toggle,
    .tdps-extras .tdps-notify-wrapper .tdps-notify-toggle {
        max-width: 320px;
        width: 100%;
        justify-content: center;
        padding: 8px 16px;
        font-size: 0.8125rem;
        border-radius: var(--tdps-radius-md);
        white-space: nowrap;
    }
    .tdps-extras .tdps-notify-wrapper {
        width: 100%;
        max-width: 320px;
    }
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО (ОПТОВЫЕ СКИДКИ)
   ============================================================ */
.tdps-modal {
    border: none;
    border-radius: var(--tdps-radius-lg);
    padding: 0;
    max-width: 520px;
    width: 92%;
    background: var(--tdps-color-bg-surface);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.tdps-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.tdps-modal__content {
    padding: 32px 28px;
    position: relative;
}
.tdps-modal__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--tdps-color-text-muted);
    transition: color 0.2s ease;
    line-height: 1;
}
.tdps-modal__close:hover {
    color: var(--tdps-color-text-main);
}
.tdps-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 700;
}
.tdps-opt-table {
    width: 100%;
    border-collapse: collapse;
}
.tdps-opt-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--tdps-color-border);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--tdps-color-text-muted);
}
.tdps-opt-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--tdps-color-border);
    font-size: 0.9375rem;
}
.tdps-opt-table tr:last-child td {
    border-bottom: none;
}

/* --- REVIEWS LIST --- */
.tdps-reviews-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tdps-review-item {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tdps-color-border);
}
.tdps-review-item:last-child {
    border-bottom: none;
}
.tdps-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.tdps-review-author-name {
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

/* Авито бейдж у имени автора */
.tdps-review-avito-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    vertical-align: middle;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.tdps-review-avito-badge img {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: none !important;
}

@media (max-width: 480px) {
    .tdps-review-avito-badge {
        width: 18px;
        height: 18px;
        margin-left: 4px;
    }
    .tdps-review-avito-badge img {
        width: 14px;
        height: 14px;
        filter: none !important;
    }
}

.tdps-review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tdps-review-rating {
    display: flex;
    gap: 2px;
}
.tdps-review-rating .tdps-star {
    font-size: 0.875rem;
}
.tdps-review-date {
    font-size: 0.8125rem;
    color: var(--tdps-color-text-muted);
}
.tdps-review-content {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--tdps-color-text-main);
    margin: 4px 0 10px;
}
.tdps-review-photos {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.tdps-review-photo-link {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: var(--tdps-radius-sm);
    overflow: hidden;
    border: 1px solid var(--tdps-color-border);
    cursor: pointer;
    position: relative;
}
.tdps-review-photo-link:hover {
    transform: scale(1.05);
}
.tdps-review-photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tdps-review-photos-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--tdps-radius-sm);
    background: var(--tdps-color-bg-subtle);
    border: 1px solid var(--tdps-color-border);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--tdps-color-text-muted);
}
.tdps-no-reviews {
    color: var(--tdps-color-text-muted);
    font-size: 0.9375rem;
    padding: 8px 0;
}
.tdps-review-notice {
    font-size: 0.875rem;
    color: var(--tdps-color-text-muted);
    padding: 12px 0 4px;
    margin: 0;
}

/* ============================================================
   ФАЙЛЫ
   ============================================================ */
.tdps-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tdps-file-item {
    padding: 6px 0;
    border-bottom: 1px solid var(--tdps-color-border);
}
.tdps-file-item:last-child {
    border-bottom: none;
}
.tdps-file-link {
    font-weight: 500;
    color: var(--tdps-color-primary);
    text-decoration: underline;
}
.tdps-file-link:hover {
    color: var(--tdps-color-primary-hover);
}
.tdps-file-comment {
    color: var(--tdps-color-text-muted);
    font-size: 0.875rem;
    margin-left: 6px;
}

/* ============================================================
   ВТОРИЧНЫЙ CTA
   ============================================================ */
.tdps-secondary-cta {
    width: 100%;
    max-width: 320px;
    margin: 4px auto 0;
}

.tdps-btn-secondary-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 16px;
    border: 2px dashed var(--tdps-color-border);
    border-radius: var(--tdps-radius-md);
    background: var(--tdps-color-bg-subtle);
    color: var(--tdps-color-text-muted);
    font-weight: 500;
    font-size: 0.8125rem;
    text-decoration: none;
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tdps-btn-secondary-cta:hover {
    border-color: var(--tdps-color-primary);
    background: var(--tdps-color-bg-surface);
    color: var(--tdps-color-primary);
}

.tdps-cta-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.tdps-cta-arrow {
    flex-shrink: 0;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    line-height: 1;
}

.tdps-btn-secondary-cta:hover .tdps-cta-arrow {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .tdps-btn-secondary-cta {
        font-size: 0.8125rem;
        padding: 10px 14px;
        gap: 4px;
    }
}

/* ============================================================
   БЛОК С ТОВАРАМИ-АПСЕЙЛАМИ
   ============================================================ */
.tdps-upsells-wrapper {
    margin: 24px 0 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tdps-color-border);
}

.tdps-upsells-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tdps-color-text-main);
    margin-bottom: 16px;
    text-align: center;
}

.tdps-upsell-products-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 600px) {
    .tdps-upsell-products-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
}

.tdps-upsells-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.tdps-upsells-carousel {
    overflow: hidden;
    flex: 1;
    position: relative;
    touch-action: pan-y;
}

.tdps-upsells-track {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease;
    will-change: transform;
    touch-action: pan-y;
}

.tdps-upsell-slide {
    flex: 0 0 calc(50% - 8px);
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .tdps-upsell-slide {
        flex: 0 0 calc(50% - 8px);
    }
}

@media (max-width: 480px) {
    .tdps-upsell-slide {
        flex: 0 0 calc(50% - 6px);
    }
    .tdps-upsells-track {
        gap: 12px;
    }
}

.tdps-upsell-card {
    background: var(--tdps-color-bg-surface);
    border: 1px solid var(--tdps-color-border);
    border-radius: var(--tdps-radius-lg);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tdps-upsell-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tdps-upsell-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.tdps-upsell-card .attachment-woocommerce_thumbnail {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: var(--tdps-color-bg-subtle);
}

.tdps-upsell-card .tdps-product-card__info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 6px;
}

.tdps-upsell-card .tdps-product-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tdps-upsell-card .tdps-product-card__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--tdps-color-text-muted);
}

.tdps-upsell-card .tdps-product-card__rating .star-rating {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #f5a623;
}

.tdps-upsell-card .tdps-product-card__rating .star-rating span {
    color: #f5a623;
}

.tdps-upsell-card .price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--tdps-color-primary);
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.tdps-upsell-card .price .price-label {
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--tdps-color-text-muted);
}

.tdps-upsell-card .price .amount {
    font-weight: 700;
    color: var(--tdps-color-primary);
}

.tdps-upsell-card .price .woocommerce-Price-currencySymbol {
    font-weight: 700;
}

.tdps-upsell-stars {
    display: flex;
    gap: 2px;
}

.tdps-upsell-stars .star-filled {
    color: #f5a623;
}

.tdps-upsell-stars .star-empty {
    color: #dee2e6;
}

.tdps-upsell-nav {
    background: var(--tdps-color-bg-surface);
    border: 1px solid var(--tdps-color-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--tdps-color-text-main);
    transition: all 0.2s;
    touch-action: manipulation;
    z-index: 2;
}

.tdps-upsell-nav:hover {
    background: var(--tdps-color-bg-subtle);
    border-color: var(--tdps-color-text-muted);
}

.tdps-upsell-nav:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.tdps-upsell-nav svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

@media (max-width: 480px) {
    .tdps-upsell-nav {
        width: 32px;
        height: 32px;
    }
    .tdps-upsell-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================================
   АПСЕЙЛЫ ПОД ГАЛЕРЕЕЙ (когда переехали)
   ------------------------------------------------------------
   Логика переезда — в single-product.js → initUpsellsRelocation().
   Здесь только оформление на новом месте.
   ============================================================ */

.tdps-sp-gallery-col .tdps-upsells-wrapper {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--tdps-color-border);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tdps-sp-gallery-col .tdps-upsells-title {
    text-align: left;
    font-size: 1rem;
    margin-bottom: 12px;
}

/* Узкая колонка: одна карточка вместо двух. */
.tdps-sp-gallery-col .tdps-upsell-slide {
    flex: 0 0 calc(50% - 8px);
}

@media (max-width: 1280px) {
    .tdps-sp-gallery-col .tdps-upsell-slide {
        flex: 0 0 calc(100% - 4px);
    }
    .tdps-sp-gallery-col .tdps-upsell-nav {
        width: 32px;
        height: 32px;
    }
    .tdps-sp-gallery-col .tdps-upsell-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================================
   ПАНЕЛЬ ФИЛЬТРОВ ОТЗЫВОВ (1.4)
   Показывается над списком отзывов на странице товара,
   только когда отзывов ≥ 20. Работает без JS — чистые ссылки.
   ============================================================ */
.tdps-reviews-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 12px 14px;
    margin: 0 0 16px;
    background: var(--tdps-color-bg-subtle);
    border: 1px solid var(--tdps-color-border);
    border-radius: var(--tdps-radius-md);
}

.tdps-reviews-filters__group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.tdps-reviews-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--tdps-color-text-main);
    background: var(--tdps-color-bg-surface);
    border: 1px solid var(--tdps-color-border);
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.tdps-reviews-filter-btn:hover {
    border-color: var(--tdps-color-primary);
    color: var(--tdps-color-primary);
}

.tdps-reviews-filter-btn.is-active {
    background: var(--tdps-color-primary);
    border-color: var(--tdps-color-primary);
    color: #fff;
    font-weight: 600;
}

.tdps-reviews-filter-count {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--tdps-color-text-muted);
    background: var(--tdps-color-bg-subtle);
    padding: 1px 7px;
    border-radius: 100px;
    line-height: 1.4;
}

.tdps-reviews-filter-btn.is-active .tdps-reviews-filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.tdps-reviews-filters__sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tdps-reviews-filters__sort-label {
    font-size: 0.8125rem;
    color: var(--tdps-color-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.tdps-reviews-filters__sort-select {
    padding: 6px 32px 6px 12px;
    font-size: 0.8125rem;
    color: var(--tdps-color-text-main);
    background: var(--tdps-color-bg-surface);
    border: 1px solid var(--tdps-color-border);
    border-radius: var(--tdps-radius-md);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s ease;
    line-height: 1.4;
    height: 34px;
    box-sizing: border-box;
}

.tdps-reviews-filters__sort-select:hover,
.tdps-reviews-filters__sort-select:focus {
    border-color: var(--tdps-color-primary);
    outline: none;
}

@media (max-width: 600px) {
    .tdps-reviews-filters {
        padding: 10px 12px;
        gap: 10px;
    }
    .tdps-reviews-filters__group {
        flex-basis: 100%;
    }
    .tdps-reviews-filter-btn {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    .tdps-reviews-filters__sort {
        flex-basis: 100%;
        justify-content: space-between;
    }
    .tdps-reviews-filters__sort-select {
        flex: 1;
        max-width: 100%;
        font-size: 0.75rem;
    }
}