/* Components: product details display and related link styles. */

/* استایل‌های مربوط به جزئیات محصول */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-detail-image-container {
    text-align: center;
    margin-bottom: 15px;
}

.product-detail-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.no-image-large {
    padding: 40px 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    color: #999;
    text-align: center;
}

.product-detail-info h2 {
    margin-bottom: 10px;
    color: #333;
}

.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.product-title-row h2 {
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-detail-price {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 15px;
}

.product-detail-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.product-detail-description h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #555;
}

.product-detail-description p {
    line-height: 1.5;
    color: #666;
    white-space: pre-line;
    word-break: break-word;
}

.rating-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: fit-content;
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.rating-chip-star {
    color: #f59e0b;
    font-size: 13px;
    line-height: 1;
}

.rating-chip-count {
    color: rgba(146, 64, 14, 0.72);
    font-weight: 700;
}

.product-card-rating-chip,
.product-mini-rating-chip {
    margin-top: 6px;
}

.store-details-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.store-rating-chip {
    vertical-align: middle;
}

.product-feedback-section {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-feedback-loading,
.product-comments-empty {
    border: 1px dashed #d8deee;
    border-radius: 12px;
    padding: 12px;
    color: #64748b;
    background: #f8fafc;
    font-size: 13px;
    text-align: center;
}

.product-rating-panel,
.product-comments-panel {
    border: 1px solid #e7ebff;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    padding: 12px;
    box-shadow: 0 8px 18px rgba(47, 63, 143, 0.06);
}

.product-rating-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-rating-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.product-rating-score {
    color: #111827;
    font-weight: 900;
    font-size: 15px;
}

.product-rating-count {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.product-rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 2px;
}

.product-rating-star {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 2px;
    transition: color 0.16s ease, transform 0.16s ease;
}

.product-rating-star.is-active,
.product-rating-star:hover,
.product-rating-star:focus {
    color: #f59e0b;
}

.product-rating-star:active {
    transform: scale(0.92);
}

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

.product-comments-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.product-comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-comments-head-copy h3 {
    margin: 0;
}

.product-comments-head-copy p {
    margin: 4px 0 0;
    font-size: 11px;
    color: #94a3b8;
}

.product-comments-head-subrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-comments-head-subrow p {
    margin: 4px 0 0;
}

.product-comments-head h3 {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
}

.product-comments-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.product-comments-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.product-comments-empty-rich {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.product-comments-empty-illustration {
    width: 132px;
    height: 132px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.product-comments-empty-image {
    width: 124px;
    height: 124px;
    object-fit: contain;
    display: block;
}

.product-comments-empty-texts p {
    margin: 0;
    text-align: center;
}

.product-comments-empty-cta,
.product-comment-form-trigger,
.product-comment-popup-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.62), rgba(18, 18, 22, 0.52));
    color: #fff;
    backdrop-filter: blur(20px) saturate(155%) contrast(108%);
    -webkit-backdrop-filter: blur(20px) saturate(155%) contrast(108%);
    padding: 8px 14px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.product-comment-form-trigger-inline {
    padding: 4px 10px;
    font-size: 0.7rem;
    min-height: 26px;
    line-height: 1;
}

.product-comment-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 5100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.product-comment-popup {
    width: min(460px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.72), rgba(18, 18, 22, 0.62));
    backdrop-filter: blur(26px) saturate(170%);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #fff;
}

.product-comment-popup h4 {
    margin: 0;
}

.product-comment-popup textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px;
    font-family: inherit;
}

.product-comment-popup-stars {
    display: inline-flex;
    gap: 4px;
}

.product-comment-popup-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.product-comment-popup-star {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-size: 24px;
    cursor: pointer;
}

.product-comment-popup-star.is-active {
    color: #f59e0b;
}

.product-comment-popup-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.product-comment-popup-btn.is-cancel {
    opacity: 0.86;
}

.product-comment-popup-btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.product-comment-popup-btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: product-comment-btn-spin 0.8s linear infinite;
}

@keyframes product-comment-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.product-comment-card {
    border: 1px solid #edf1fb;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
}

.product-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.product-comment-meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.product-comment-more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-comment-more-btn {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #000000 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
}

.product-comment-more-dots {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    color: #000000 !important;
    opacity: 1;
    visibility: visible;
    display: inline-block;
    transform: translateY(-1px);
}

.product-comment-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    min-width: 92px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.74), rgba(18, 18, 22, 0.64));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    z-index: 30;
    opacity: 0;
    transform: translate(66px, -4px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.product-comment-more-menu.is-open {
    opacity: 1;
    transform: translate(66px, 0);
    pointer-events: auto;
}

.product-comment-report-btn {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 8px;
    cursor: pointer;
    text-align: center;
}

.product-comment-report-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.product-comment-meta strong {
    color: #1f2937;
    font-size: 15px;
    font-weight: 800;
}

.product-comment-user-head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-comment-user-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    direction: ltr;
}

.product-comment-user-star {
    font-style: normal;
    font-size: 12px;
    line-height: 1;
    color: #94a3b8;
}

.product-comment-user-star.is-active {
    color: #f59e0b;
}

.product-comment-meta span {
    color: #94a3b8;
    font-size: 11px;
}

.product-comment-card p {
    margin: 0;
    color: #334155;
    line-height: 1.8;
    white-space: pre-line;
    word-break: break-word;
}

.product-comment-form {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-comment-form textarea {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    border: 1px solid #d8deee;
    border-radius: 12px;
    padding: 10px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    outline: none;
}

.product-comment-form textarea:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.product-comment-form button {
    align-self: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.68), rgba(18, 18, 22, 0.58));
    backdrop-filter: blur(30px) saturate(180%) contrast(110%);
    -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(110%);
    color: #fff;
    padding: 7px 14px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.76rem;
    min-height: 32px;
    min-width: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 6px 16px rgba(31, 42, 97, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.product-comment-form button:disabled,
.product-rating-star:disabled {
    opacity: 0.56;
    cursor: wait;
}

body.theme-dark .rating-chip {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
}

body.theme-dark .rating-chip-count {
    color: #fbbf24;
}

body.theme-dark .product-feedback-loading,
body.theme-dark .product-comments-empty,
body.theme-dark .product-rating-panel,
body.theme-dark .product-comments-panel,
body.theme-dark .product-comment-card {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.28);
    color: #e5e7eb;
}

body.theme-dark .product-rating-score,
body.theme-dark .product-comments-head h3,
body.theme-dark .product-comment-meta strong,
body.theme-dark .product-comment-card p {
    color: #f8fafc;
}

body.theme-dark .product-rating-count,
body.theme-dark .product-comments-head span,
body.theme-dark .product-comment-meta span {
    color: #cbd5e1;
}

body.theme-dark .product-comment-form textarea {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.34);
    color: #f8fafc;
}

body.theme-dark .product-comment-more-btn {
    background: transparent;
    color: #ffffff !important;
}

body.theme-dark .product-comment-more-dots {
    color: #ffffff !important;
}

body.theme-dark .product-comment-more-menu {
    border-color: rgba(255, 255, 255, 0.24);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.78));
}

body.theme-dark .product-comments-head-copy p {
    color: #94a3b8;
}

@media (max-width: 420px) {
    .product-rating-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .product-rating-stars {
        justify-content: center;
    }
}

.report-product-btn {
    margin-top: 14px;
    width: auto;
    border: none !important;
    outline: none;
    box-shadow: none;
    border-radius: 999px;
    background: transparent;
    color: #b3261e;
    padding: 8px 12px 8px 14px;
    font-family: inherit;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.report-product-btn::after {
    content: "!";
    position: absolute;
    right: 8px;
    top: 12px;
    background: transparent !important;
    color: #e53935;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    width: auto;
    height: auto;
}

.report-product-btn::before {
    content: none;
}

.report-product-btn i,
.report-product-btn span {
    position: relative;
    z-index: 2;
}

.report-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 2600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.report-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.report-sheet {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    background: #fff;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    padding: 12px 14px 20px;
    transform: translateY(100%);
    transition: transform 0.22s ease;
    max-height: 78vh;
    overflow-y: auto;
}

.report-sheet-overlay.active .report-sheet {
    transform: translateY(0);
}

.report-sheet-handle {
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: #d6dbe6;
    margin: 0 auto 10px;
}

.report-sheet h3 {
    margin-bottom: 12px;
}

.report-sheet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-sheet-item {
    border: 1px solid #eceef4;
    background: #f9fafe;
    border-radius: 10px;
    padding: 11px 12px;
    text-align: right;
    font-family: inherit;
    cursor: pointer;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.edit-btn {
    background-color: #3498db;
    color: white;
    flex: 1;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    flex: 1;
}

.product-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* تغییر از flex-end به flex-start برای نمایش از سمت راست */
    text-align: right; /* اضافه کردن این خط برای متن‌های راست‌چین */
    margin-right: 10px; /* اضافه کردن فاصله از سمت راست */
}

.product-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    flex-direction: row; /* اطمینان از چینش افقی */
    justify-content: flex-start; /* شروع از سمت راست */
    align-items: center;
}

/* استایل‌های مربوط به لینک محصول */
.product-detail-link {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.product-detail-link h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #555;
}

.product-link {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
    display: inline-block;
}

.product-link:hover {
    text-decoration: underline;
}

/* Modern ecommerce product detail layout */
#shopProductModal .product-modal-platform-header {
    position: sticky;
    top: 10px;
    z-index: 1300;
    margin: 10px 10px 0;
}

#shopProductModal {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#shopProductModal .product-modal-platform-header .platform-shared-header {
    margin: 0;
}

#shopProductModal .product-modal-close-btn {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 4;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#shopProductModal .product-modal-close-btn:hover,
#shopProductModal .product-modal-close-btn:focus-visible {
    background: transparent;
    color: var(--primary-color, #ef4444);
}

#shopProductModal .product-modal-close-btn svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#shopProductModal .favorite-button.hidden {
    display: none !important;
}

#shopProductModal .fullscreen-modal-content {
    margin-top: 0;
    height: auto;
    min-height: calc(100% - 92px);
    padding: 18px clamp(12px, 3vw, 46px) 24px;
    overflow: visible;
}

#shopProductModal .product-details-fullscreen {
    max-width: 1320px;
    margin: 0 auto;
}

.product-detail-commerce-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
    direction: rtl;
    gap: clamp(22px, 4vw, 56px);
    align-items: start;
}

.product-detail-commerce-shell > * {
    direction: rtl;
}

#shopProductModal .product-detail-image-container {
    margin: 0;
    border-radius: 0;
    background: transparent;
    min-height: min(72vh, 680px);
    padding: 0 96px 0 0;
    position: sticky;
    top: 88px;
    overflow: visible;
    box-shadow: none;
}

.product-image-slider {
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-main {
    width: 100%;
    height: min(68vh, 640px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

#shopProductModal .product-detail-image {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: none;
    user-select: none;
    -webkit-user-drag: none;
}

#shopProductModal .slider-dots {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 72px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: flex-start;
    overflow-y: auto;
    padding-left: 4px;
    scrollbar-width: none;
}

#shopProductModal .slider-dots::-webkit-scrollbar {
    display: none;
}

#shopProductModal .product-thumb-dot {
    width: 64px;
    height: 72px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #fff;
    padding: 3px;
    flex: 0 0 auto;
    overflow: hidden;
    cursor: pointer;
}

#shopProductModal .product-thumb-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}

#shopProductModal .product-thumb-dot.active {
    border-color: #ff4b2f;
    background: #fff7f3;
}

#shopProductModal .slider-nav {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.88);
    color: #111827;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#shopProductModal .slider-nav {
    top: 50%;
    font-size: 28px;
    z-index: 3;
}

#shopProductModal .slider-nav.prev {
    right: 96px;
}

#shopProductModal .slider-nav.next {
    left: 18px;
}

#shopProductModal .product-detail-info {
    padding: 6px 0 28px;
}

.product-breadcrumb-line {
    color: #9ca3af;
    font-size: 0.86rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

#shopProductModal .product-title-row {
    align-items: flex-start;
    gap: 12px;
}

#shopProductModal .product-title-row h2 {
    color: #111827;
    font-size: clamp(1.25rem, 2.1vw, 1.75rem);
    font-weight: 700;
    line-height: 1.75;
    white-space: normal;
}

.product-detail-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    margin: 4px 0 34px;
    font-size: 0.86rem;
}

.product-variant-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 34px;
}

.product-variant-title {
    color: #111827;
    font-size: 0.92rem;
}

.product-variant-list {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.product-variant-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    padding: 8px 12px;
    font-size: 0.86rem;
}

.product-variant-chip span {
    color: #9ca3af;
    font-size: 0.76rem;
}

#shopProductModal .product-detail-price-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

#shopProductModal .product-detail-price {
    margin: 0;
    padding: 0;
    background: transparent;
    color: #111827;
    border-radius: 0;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 800;
}

.product-detail-cta-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    margin: 14px 0 18px;
    width: 100%;
    box-sizing: border-box;
}

.product-detail-primary-cta,
.product-detail-secondary-cta,
.product-detail-wishlist-cta {
    min-height: 54px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.96rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
}

.product-detail-primary-cta {
    border: 1px solid rgba(239, 68, 68, 0.78);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(248, 72, 72, 0.78));
    color: #ffffff;
    font-weight: 600;
    padding: 0 24px;
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.product-detail-primary-cta:hover,
.product-detail-primary-cta:focus-visible {
    border-color: rgba(239, 68, 68, 0.92);
    background: linear-gradient(135deg, rgba(248, 72, 72, 0.96), rgba(239, 68, 68, 0.84));
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(239, 68, 68, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.product-detail-primary-cta:disabled,
.product-detail-primary-cta.is-unavailable {
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(148, 163, 184, 0.18);
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed;
}

.product-variant-chip-unavailable {
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.product-detail-secondary-cta {
    border: 1px solid #dc2626;
    background: #fff;
    color: #ff5538;
    min-width: 112px;
    padding: 0 18px;
}

.product-detail-wishlist-cta {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    flex: 0 0 54px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    font-size: 1.15rem;
    padding: 0;
    line-height: 1;
}

.product-detail-wishlist-cta i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    margin: 0;
    color: currentColor;
    font-size: 1.15rem;
    line-height: 1;
    transform: none;
}

.product-detail-wishlist-cta.active {
    color: #ff5538;
    border-color: rgba(255, 85, 56, 0.35);
    background: #fff7f3;
}

.product-trust-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 28px;
}

.product-trust-card {
    min-height: 44px;
    border-radius: 8px;
    background: #f8f8f9;
    color: #374151;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 13px;
    font-size: 0.86rem;
    direction: rtl;
    text-align: right;
}

.product-trust-card i {
    color: #ff5538;
    flex: 0 0 auto;
}

.product-trust-card span {
    flex: 1;
    min-width: 0;
}

#shopProductModal .product-detail-description,
#shopProductModal .product-detail-category {
    border: 1px solid #eef0f4;
    border-radius: 12px;
    background: #fff;
    padding: 14px;
    margin-top: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

#shopProductModal .product-store-link-btn {
    background: #f8f8f9 !important;
    color: #111827;
    border-color: #eceff3 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#shopProductModal .report-product-btn {
    margin-top: 14px;
}

@media (max-width: 1023px) {
    #shopProductModal .fullscreen-modal-content {
        padding-inline: 0;
    }

    .product-detail-commerce-shell {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    #shopProductModal .product-detail-image-container {
        position: relative;
        top: auto;
        min-height: 0;
        border-radius: 0;
        padding: 0;
        background: transparent;
    }

    .product-gallery-main {
        height: min(66vh, 560px);
        min-height: 360px;
    }

    #shopProductModal .product-detail-image {
        border-radius: 0;
        width: 100%;
        object-fit: contain;
    }

    #shopProductModal .slider-dots {
        right: 12px;
        left: 12px;
        top: auto;
        bottom: 10px;
        width: auto;
        height: 64px;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    #shopProductModal .product-thumb-dot {
        width: 52px;
        height: 58px;
        border-radius: 9px;
    }

    #shopProductModal .slider-nav {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    #shopProductModal .slider-nav.prev {
        right: 10px;
    }

    #shopProductModal .slider-nav.next {
        left: 10px;
    }

    #shopProductModal .product-detail-info {
        padding: 18px 16px 28px;
    }

    .product-breadcrumb-line {
        display: none;
    }

    .product-detail-meta-row {
        margin-bottom: 26px;
    }

    .product-detail-cta-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
        gap: 8px;
        position: sticky;
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 20;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(229, 231, 235, 0.8);
        border-radius: 12px;
        padding: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    }

    .product-detail-primary-cta,
    .product-detail-secondary-cta,
    .product-detail-wishlist-cta {
        min-height: 44px;
        border-radius: 7px;
        font-size: 0.82rem;
        padding-inline: 8px;
        min-width: 0;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
    }

    .product-detail-primary-cta span,
    .product-detail-secondary-cta span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .product-detail-wishlist-cta {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        flex-basis: 44px;
        padding: 0;
        justify-self: stretch;
        align-self: stretch;
    }

    .product-detail-wishlist-cta i {
        width: 20px;
        height: 20px;
        font-size: 1rem;
        margin: 0 auto;
    }

}

@media (max-width: 380px) {
    .product-detail-cta-row {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .product-detail-secondary-cta {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .product-detail-wishlist-cta {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        flex-basis: 42px;
    }
}

body.theme-dark #shopProductModal .product-title-row h2,
body.theme-dark .product-variant-title,
body.theme-dark #shopProductModal .product-detail-price {
    color: #f8fafc;
}

body.theme-dark #shopProductModal .product-modal-close-btn {
    background: transparent;
    border-color: transparent;
    color: #f8fafc;
}

body.theme-dark #shopProductModal .product-modal-close-btn:hover,
body.theme-dark #shopProductModal .product-modal-close-btn:focus-visible {
    color: #ff3b3b;
    background: transparent;
}

body.theme-dark .product-breadcrumb-line,
body.theme-dark .product-detail-meta-row,
body.theme-dark .product-variant-chip span {
    color: rgba(248, 250, 252, 0.62);
}

body.theme-dark .product-variant-chip,
body.theme-dark .product-detail-primary-cta,
body.theme-dark .product-detail-secondary-cta,
body.theme-dark .product-detail-wishlist-cta,
body.theme-dark #shopProductModal .product-detail-description,
body.theme-dark #shopProductModal .product-detail-category {
    background: rgba(31, 41, 55, 0.82);
    border-color: rgba(148, 163, 184, 0.22);
    color: #f8fafc;
}

body.theme-dark .product-detail-primary-cta {
    border-color: rgba(255, 59, 59, 0.42);
    background: linear-gradient(135deg, rgba(255, 59, 59, 0.22), rgba(31, 41, 55, 0.82));
    color: #fecaca;
    box-shadow: 0 12px 28px rgba(255, 59, 59, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.theme-dark .product-detail-primary-cta:hover,
body.theme-dark .product-detail-primary-cta:focus-visible {
    border-color: rgba(255, 59, 59, 0.62);
    background: linear-gradient(135deg, rgba(255, 59, 59, 0.28), rgba(31, 41, 55, 0.9));
    color: #fff;
}

body.theme-dark .product-detail-primary-cta:disabled,
body.theme-dark .product-detail-primary-cta.is-unavailable {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.12);
    color: rgba(248, 250, 252, 0.5);
    box-shadow: none;
}

body.theme-dark .product-trust-card,
body.theme-dark #shopProductModal .product-store-link-btn {
    background: rgba(248, 250, 252, 0.08) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    color: #f8fafc;
}

body.theme-dark .product-detail-cta-row {
    background: rgba(17, 24, 39, 0.86);
    border-color: rgba(148, 163, 184, 0.18);
}
