﻿/* =========================
   PRODUCT SECTION TABS (Digikala style)
   - Sticky horizontal nav
   - All sections visible
   - Tabs scroll to sections + active updates on scroll
   ========================= */

.sa-ptabs {
    direction: rtl;
    text-align: right;
    margin-top: 12px;
    --sa-tab-h: 52px;
    --sa-soft: rgba(0,0,0,0.06);
    --sa-soft2: rgba(0,0,0,0.04);
    --sa-soft3: rgba(0,0,0,0.10);
}

/* Card */
.sa-ptabs-card {
    background: var(--sa-card-bg);
    border: 1px solid var(--sa-border-color);
    border-radius: var(--sa-radius);
    overflow: visible; /* ✅ IMPORTANT (don’t clip sticky/nav) */
}

/* Keep body rounded without breaking sticky */
.sa-ptabs-clip {
    border-radius: 0 0 var(--sa-radius) var(--sa-radius);
    overflow: hidden; /* ✅ clip only body */
}

/* Sticky header */
.sa-ptabs-head {
    position: sticky;
    top: calc(var(--sa-header-h, 96px) + 0px);
    z-index: 20;
    background: var(--sa-card-bg) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--sa-text-rgb),.2);
    padding: 0;
    border-radius: var(--sa-radius) var(--sa-radius) 0 0;
}


/* Nav (horizontal scroll) */
.sa-ptabs-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 10px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative; 
}

    .sa-ptabs-nav::-webkit-scrollbar {
        display: none;
    }

/* Tab button */
.sa-ptab-btn {
    position: relative;
    height: var(--sa-tab-h);
    padding: 0 14px;
    border-radius: var(--sa-btn-radius);
    border: 1px solid transparent;
    background: transparent;
    color: var(--sa-text);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto; /* ✅ keeps own width */

    transition: .15s ease;
}

    .sa-ptab-btn:hover {
        background: var(--sa-navbar-item-hover-color);
    }

    .sa-ptab-btn.active {
        background: var(--sa-navbar-item-hover-color) !important;
        border-color: var(--sa-primary);
        color: var(--sa-text) !important;
    }

/* icon bubble */
.sa-ptab-ico {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(var(--sa-primary-rgb), 0.10);
    border: none;
    flex: 0 0 auto;
}

    .sa-ptab-ico i {
        display: inline-flex;
    }

.sa-ptab-btn.active .sa-ptab-ico {
    background: rgba(var(--sa-primary-rgb), 0.10);
    border: 1px solid var(--sa-secondary);
}

/* Nice underline slider (moves with JS) */
.sa-ptabs-indicator {
    height: 3px;
    width: 30px;
    border-radius: 999px;
    background: var(--sa-indicator-color);
    position: absolute;
    bottom: 8px;
    left: 0; /* JS will overwrite this dynamic position */
    opacity: 0;
    transition: left .18s ease, width .18s ease, opacity .18s ease; /* ✅ Switched from transform to left */
    pointer-events: none;
}

/* Body */
.sa-ptabs-body {
    padding: 14px;
}

@media (min-width: 992px) {
    .sa-ptabs-body {
        padding: 18px 18px 20px;
    }
}

/* Title */
.sa-ptitle {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--sa-heading-color);
    margin: 0 0 15px 0;
}

/* Text content */
.sa-ptext {
    color: var(--bs-body-color);
    line-height: 2.05;
}

    .sa-ptext p {
        margin-bottom: .75rem;
    }

    .sa-ptext img {
        max-width: 100%;
        height: auto;
        border-radius: 14px;
    }

    .sa-ptext a {
        font-weight: 800;
        text-decoration: none;
    }

        .sa-ptext a:hover {
            text-decoration: underline;
        }

    .sa-ptext ul,
    .sa-ptext ol {
        padding-right: 1.2rem;
    }

/* Empty state */
.sa-empty {
    border: 1px dashed var(--sa-soft3);
    background: var(--sa-soft2);
    border-radius: 16px;
    padding: 14px;
    color: var(--bs-muted-text);
    font-weight: 800;
}

/* =========================
   FEATURES TABLE
   ========================= */

.sa-feat-table {
    border: 1px solid var(--sa-soft);
    border-radius: 16px;
    background: rgba(255,255,255,0.85);
    overflow: hidden;
}

.sa-feat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sa-feat-row:last-child {
    border-bottom: 0;
}

.sa-feat-k {
    font-weight: 800;
    color: var(--bs-muted-text);
    flex: 0 0 190px;
    min-width: 140px;
    margin: 0;
}

.sa-feat-v {
    font-weight: 700;
    color: var(--bs-heading-color);
    flex: 1 1 auto;
    text-align: left;
    direction: rtl;
    margin: 0;
    word-break: break-word;
}

/* Mobile: stack key/value */
@media (max-width: 576px) {
    .sa-feat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .sa-feat-k {
        flex: 0 0 auto;
        min-width: 0;
    }

    .sa-feat-v {
        text-align: right;
        width: 100%;
    }
}

/* =========================
   MOBILE: smaller tabs + still scrollable
   ========================= */
@media (max-width: 576px) {
    .sa-ptabs {
        --sa-tab-h: 44px;
    }

    .sa-ptabs-nav {
        padding: 8px;
        gap: 6px;
    }

    .sa-ptab-btn {
        height: var(--sa-tab-h);
        padding: 0 10px;
        font-size: .85rem;
        border-radius: var(--sa-btn-radius);
        gap: 6px;
    }

    .sa-ptab-ico {
        width: 26px;
        height: 26px;
    }

    .sa-ptabs-indicator {
        bottom: 6px;
    }
}

/* =========================
   FEATURES = aligned under title + tighter spacing (YOUR LAST DESIGN)
   ========================= */

#saSecFeatures .sa-feat-table {
    max-width: none;
    margin: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

    /* Row layout */
    #saSecFeatures .sa-feat-table .sa-feat-row {
        display: grid;
        grid-template-columns: 180px 1fr;
        align-items: center;
        gap: 10px;
        padding: 14px 0;
        border: 0;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        background: transparent;
        border-radius: 0;
    }

#saSecFeatures .sa-feat-table .sa-feat-row:last-child {
    border-bottom: 0;
}

/* Key */
#saSecFeatures .sa-feat-table .sa-feat-k {
    font-weight: 700;
    color: var(--bs-muted-text);
    margin: 0;
    text-align: right;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Value */
#saSecFeatures .sa-feat-table .sa-feat-v {
    color: var(--bs-heading-color);
    margin: 0;
    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
    word-break: break-word;
}

/* Mobile: stack */
@media (max-width: 576px) {
    #saSecFeatures .sa-feat-table .sa-feat-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px 0;
    }

    #saSecFeatures .sa-feat-table .sa-feat-k {
        white-space: normal;
    }
}

/* ✅ More obvious (but still premium) section divider */
.sa-psection + .sa-psection {
    margin-top: 22px;
    padding-top: 22px;
    position: relative;
}

    .sa-psection + .sa-psection::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px; /* ✅ bolder */
        background: rgba(var(--sa-text-rgb),.2); /* ✅ more visible in light */
        border-radius: 999px;
    }


/* ✅ Premium bold divider (gradient + soft glow) */
    .sa-psection + .sa-psection::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, transparent, rgba(var(--sa-text-rgb),.16), rgba(var(--sa-text-rgb),.10), rgba(var(--sa-text-rgb),.16), transparent );
        box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    }

/* ======================================
   Quill Editor Content Styles for Website
   ====================================== */

/* Base container for rich text content */
.sa-ptext {
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    font-size: 15px;
}

    /* Text Alignment - Quill uses class-based alignment */
    .sa-ptext .ql-align-center {
        text-align: center !important;
    }

    .sa-ptext .ql-align-right {
        text-align: right !important;
    }

    .sa-ptext .ql-align-left {
        text-align: left !important;
    }

    .sa-ptext .ql-align-justify {
        text-align: justify !important;
    }

    /* RTL Direction */
    .sa-ptext .ql-direction-rtl {
        direction: rtl;
        text-align: right;
    }

    /* Headers */
    .sa-ptext h1, .sa-ptext h2, .sa-ptext h3,
    .sa-ptext h4, .sa-ptext h5, .sa-ptext h6 {
        margin-top: 1em;
        margin-bottom: 0.5em;
        font-weight: 600;
    }

    .sa-ptext h1 {
        font-size: 2em;
    }

    .sa-ptext h2 {
        font-size: 1.5em;
    }

    .sa-ptext h3 {
        font-size: 1.17em;
    }

    .sa-ptext h4 {
        font-size: 1em;
    }

    .sa-ptext h5 {
        font-size: 0.83em;
    }

    .sa-ptext h6 {
        font-size: 0.67em;
    }

    /* Font Sizes - Quill classes */
    .sa-ptext .ql-size-small {
        font-size: 0.75em;
    }

    .sa-ptext .ql-size-large {
        font-size: 1.5em;
    }

    .sa-ptext .ql-size-huge {
        font-size: 2.5em;
    }

    /* Text Formatting */
    .sa-ptext strong, .sa-ptext b {
        font-weight: bold;
    }

    .sa-ptext em, .sa-ptext i {
        font-style: italic;
    }

    .sa-ptext u {
        text-decoration: underline;
    }

    .sa-ptext s, .sa-ptext strike {
        text-decoration: line-through;
    }

    .sa-ptext sub {
        vertical-align: sub;
        font-size: smaller;
    }

    .sa-ptext sup {
        vertical-align: super;
        font-size: smaller;
    }

    /* Lists */
    .sa-ptext ol, .sa-ptext ul {
        padding-right: 1.5em;
        padding-left: 0;
        margin: 0.5em 0;
    }

    .sa-ptext ol {
        list-style-type: decimal;
    }

    .sa-ptext ul {
        list-style-type: disc;
    }

    .sa-ptext li {
        margin-bottom: 0.25em;
    }

    /* Indentation - Quill uses ql-indent-X classes */
    .sa-ptext .ql-indent-1 {
        padding-right: 3em;
    }

    .sa-ptext .ql-indent-2 {
        padding-right: 6em;
    }

    .sa-ptext .ql-indent-3 {
        padding-right: 9em;
    }

    .sa-ptext .ql-indent-4 {
        padding-right: 12em;
    }

    .sa-ptext .ql-indent-5 {
        padding-right: 15em;
    }

    .sa-ptext .ql-indent-6 {
        padding-right: 18em;
    }

    .sa-ptext .ql-indent-7 {
        padding-right: 21em;
    }

    .sa-ptext .ql-indent-8 {
        padding-right: 24em;
    }

    /* Blockquote */
    .sa-ptext blockquote {
        border-right: 4px solid #ccc;
        border-left: none;
        margin: 1em 0;
        padding: 0.5em 1em;
        padding-right: 1em;
        background-color: #f9f9f9;
        color: #666;
        font-style: italic;
    }

    /* Code Block */
    .sa-ptext pre, .sa-ptext code {
        font-family: 'Courier New', Courier, monospace;
        direction: ltr;
        text-align: left;
    }

    .sa-ptext pre {
        background-color: #23241f;
        color: #f8f8f2;
        border-radius: 4px;
        padding: 12px 16px;
        overflow-x: auto;
        margin: 1em 0;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .sa-ptext code {
        background-color: #f4f4f4;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 0.9em;
    }

    /* Pre with ql-syntax class (Quill code block) */
    .sa-ptext pre.ql-syntax {
        background-color: #23241f;
        color: #f8f8f2;
    }

    /* Links */
    .sa-ptext a {
        color: #0066cc;
        text-decoration: none;
    }

        .sa-ptext a:hover {
            text-decoration: underline;
        }

    /* Images */
    .sa-ptext img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 10px 0;
    }

        /* Centered images */
        .sa-ptext img[style*="margin: 0 auto"],
        .sa-ptext img[style*="margin:0 auto"] {
            display: block;
        }

    /* Video Embeds */
    .sa-ptext iframe,
    .sa-ptext .ql-video {
        max-width: 100%;
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        border-radius: 8px;
        margin: 10px 0;
    }

    /* Paragraphs */
    .sa-ptext p {
        margin: 0 0 1em 0;
    }

        .sa-ptext p:last-child {
            margin-bottom: 0;
        }

        /* Empty paragraph fix */
        .sa-ptext p br:only-child {
            display: none;
        }

    /* Color styles - Quill uses inline styles for colors */
    /* These are handled automatically via inline styles */

    /* Font family - Quill classes */
    .sa-ptext .ql-font-serif {
        font-family: Georgia, Times, serif;
    }

    .sa-ptext .ql-font-monospace {
        font-family: 'Courier New', Courier, monospace;
    }

.sa-psection {
    padding-top: 4px;
    padding-bottom: 18px;
    scroll-margin-top: calc(var(--sa-header-h, 96px) + var(--sa-ptabs-head-h, 72px) + 8px);
}
