/**
 * Single Post Styles - Shoponlina
 * Editorial Magazine Design
 */

/* CSS Variables */
:root {
    --sp-white: #ffffff;
    --sp-navy: #0a1628;
    --sp-orange: #e8920d;
    --sp-orange-light: #f9a825;
    --sp-gray-light: #f8f9fa;
    --sp-cream: #faf8f5;
    --sp-border: rgba(10, 22, 40, 0.08);
    --sp-text: #0a1628;
    --sp-text-muted: #64748b;
    --sp-font-heading: 'Playfair Display', serif;
    --sp-font-body: 'Inter', sans-serif;
    --sp-content-width: 680px;
    --sp-sidebar-width: 280px;
    --sp-gap: 4rem;
}

/* Reset & Base */
.shoponlina-single {
    margin: 0;
    padding: 0;
    background: var(--sp-white);
    color: var(--sp-text);
    font-family: var(--sp-font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.shoponlina-single * {
    box-sizing: border-box;
}

/* Typography - Arabic */
html[lang="ar"] .shoponlina-single,
html[lang="ar"] .shoponlina-single h1,
html[lang="ar"] .shoponlina-single h2,
html[lang="ar"] .shoponlina-single h3,
html[lang="ar"] .shoponlina-single h4,
html[lang="ar"] .shoponlina-single p {
    font-family: 'Noto Sans Arabic', var(--sp-font-body);
}

html[lang="ar"] .post-header-title,
html[lang="ar"] .section-title {
    font-family: 'Noto Sans Arabic', var(--sp-font-heading);
}

/* Typography - Hebrew */
html[lang="he"] .shoponlina-single,
html[lang="he"] .shoponlina-single h1,
html[lang="he"] .shoponlina-single h2,
html[lang="he"] .shoponlina-single h3,
html[lang="he"] .shoponlina-single h4,
html[lang="he"] .shoponlina-single p {
    font-family: 'Noto Sans Hebrew', var(--sp-font-body);
}

html[lang="he"] .post-header-title,
html[lang="he"] .section-title {
    font-family: 'Noto Sans Hebrew', var(--sp-font-heading);
}

/* ========================
   POST HEADER (HERO)
   ======================== */
.post-header {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
    overflow: hidden;
}

.post-header-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 22, 40, 0.2) 0%,
        rgba(10, 22, 40, 0.4) 50%,
        rgba(10, 22, 40, 0.85) 100%
    );
}

.post-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 5%;
    color: white;
}

.post-header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.post-header-breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.post-header-breadcrumb a:hover {
    opacity: 0.8;
}

.post-header-breadcrumb span {
    opacity: 0.6;
}

.post-header-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--region-color, var(--sp-orange));
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.post-header-category i {
    font-size: 0.7rem;
}

.post-header-title {
    font-family: var(--sp-font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    max-width: 900px;
    color: #ffffff !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.post-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.post-header-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-header-meta i {
    opacity: 0.8;
}

/* ========================
   MAIN LAYOUT
   ======================== */
.single-post-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.content-wrapper {
    display: flex;
    gap: 4rem;
    padding: 3rem 0;
}

/* ========================
   SIDEBAR TOC
   ======================== */
.sidebar-toc {
    width: var(--sp-sidebar-width);
    flex-shrink: 0;
}

.toc-sticky {
    position: sticky;
    top: 2rem;
}

.toc-title {
    font-family: var(--sp-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sp-text-muted);
    margin: 0 0 1rem;
}

.toc-progress {
    height: 3px;
    background: var(--sp-border);
    border-radius: 2px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.toc-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--sp-orange);
    transition: width 0.1s ease-out;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.5rem 0;
    padding-left: 1rem;
    color: var(--sp-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.toc-link:hover {
    color: var(--sp-text);
}

.toc-link.active {
    color: var(--sp-orange);
    border-left-color: var(--sp-orange);
    font-weight: 500;
}

.toc-link.toc-h3 {
    padding-left: 2rem;
    font-size: 0.8125rem;
}

/* Mobile TOC */
.mobile-toc {
    display: none;
    margin: 2rem 0;
}

.toc-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--sp-gray-light);
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    font-family: var(--sp-font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sp-text);
    cursor: pointer;
    transition: background 0.2s;
}

.toc-toggle:hover {
    background: #f1f2f3;
}

.toc-toggle .toc-chevron {
    margin-left: auto;
    transition: transform 0.3s;
}

.toc-toggle[aria-expanded="true"] .toc-chevron {
    transform: rotate(180deg);
}

.toc-content {
    display: none;
    padding: 1rem 1.25rem;
    background: var(--sp-gray-light);
    border: 1px solid var(--sp-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.toc-content.open {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ========================
   MAIN CONTENT
   ======================== */
.post-content {
    flex: 1;
    max-width: var(--sp-content-width);
    min-width: 0;
}

/* Infobox */
.post-infobox {
    background: var(--sp-gray-light);
    border-left: 4px solid var(--sp-orange);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem 2rem;
    margin-bottom: 3rem;
}

.infobox-title {
    font-family: var(--sp-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sp-text-muted);
    margin: 0 0 1rem;
}

.infobox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.infobox-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.infobox-label {
    font-size: 0.75rem;
    color: var(--sp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.infobox-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--sp-text);
}

.infobox-value i {
    margin-right: 0.35rem;
    color: var(--sp-orange);
}

.infobox-highlights {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sp-border);
}

.infobox-highlights ul {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.infobox-highlights li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.infobox-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: var(--sp-orange);
    border-radius: 50%;
}

/* Enhanced Infobox Sections */
.infobox-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sp-border);
}

.infobox-text {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
    color: var(--sp-text);
}

.infobox-text i {
    margin-right: 0.35rem;
    color: var(--sp-orange);
}

/* Infobox Tags */
.infobox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.infobox-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: white;
    border: 1px solid var(--sp-border);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--sp-text);
    transition: all 0.2s;
}

.infobox-tag i {
    font-size: 0.7rem;
    color: var(--sp-orange);
}

.infobox-tag:hover {
    border-color: var(--sp-orange);
    background: rgba(232, 146, 13, 0.05);
}

/* Infobox Badges */
.infobox-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.infobox-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.infobox-badge--success {
    background: #ecfdf5;
    color: #059669;
}

.infobox-badge--success i {
    color: #10b981;
}

.infobox-badge--warning {
    background: #fef3c7;
    color: #d97706;
}

.infobox-badge--info {
    background: #eff6ff;
    color: #2563eb;
}

/* Infobox Rating Stars */
.infobox-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.infobox-rating i {
    color: var(--sp-orange);
    font-size: 0.9rem;
    margin-right: 0;
}

.infobox-rating .rating-text {
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    color: var(--sp-text-muted);
}

/* Infobox Pros & Cons */
.infobox-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sp-border);
}

.infobox-pros,
.infobox-cons {
    padding: 1rem;
    border-radius: 8px;
}

.infobox-pros {
    background: #ecfdf5;
}

.infobox-cons {
    background: #fef2f2;
}

.infobox-label--pro {
    color: #059669;
}

.infobox-label--con {
    color: #dc2626;
}

.infobox-pros ul,
.infobox-cons ul {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.infobox-pros li,
.infobox-cons li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.infobox-pros li i {
    color: #10b981;
    margin-top: 0.15rem;
}

.infobox-cons li i {
    color: #ef4444;
    margin-top: 0.15rem;
}

/* Infobox Verdict */
.infobox-verdict {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    border-left: 4px solid var(--sp-orange);
}

.infobox-verdict .infobox-label {
    color: #92400e;
}

.infobox-verdict-text {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #78350f;
    line-height: 1.5;
}

/* Infobox Affiliate Disclosure */
.infobox-affiliate {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(10, 22, 40, 0.04);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--sp-text-muted);
}

.infobox-affiliate i {
    color: var(--sp-text-muted);
}

/* Infobox Type Variants */
.post-infobox--review {
    border-left-color: #f59e0b;
}

.post-infobox--comparison {
    border-left-color: #3b82f6;
}

.post-infobox--market {
    border-left-color: #10b981;
}

/* Responsive Infobox */
@media (max-width: 768px) {
    .infobox-proscons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .infobox-tags {
        gap: 0.35rem;
    }

    .infobox-tag {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Article Body */
.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--sp-text);
}

/* Drop cap */
.article-body > p:first-of-type::first-letter {
    float: left;
    font-family: var(--sp-font-heading);
    font-size: 4rem;
    line-height: 0.8;
    padding-right: 0.75rem;
    padding-top: 0.25rem;
    color: var(--sp-orange);
}

.article-body h2 {
    font-family: var(--sp-font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 3rem 0 1.25rem;
    color: var(--sp-navy);
}

.article-body h3 {
    font-family: var(--sp-font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--sp-navy);
}

.article-body p {
    margin: 0 0 1.5rem;
}

.article-body a {
    color: var(--sp-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.article-body a:hover {
    color: var(--sp-orange-light);
}

/* Blockquotes */
.article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--sp-orange);
    background: var(--sp-gray-light);
    font-style: italic;
    font-size: 1.1rem;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists */
.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.75rem;
}

/* Images */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.article-body figure {
    margin: 2rem 0;
}

.article-body figcaption {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--sp-text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

/* Tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
}

.article-body th,
.article-body td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--sp-border);
}

.article-body th {
    background: var(--sp-gray-light);
    font-weight: 600;
}

.article-body tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

/* Callout boxes */
.article-body .tip,
.article-body .warning,
.article-body .note {
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    font-size: 0.9375rem;
}

.article-body .tip {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
}

.article-body .warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.article-body .note {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

/* ========================
   SHARE SECTION
   ======================== */
.share-section {
    margin: 4rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--sp-border);
    border-bottom: 1px solid var(--sp-border);
}

.share-title {
    font-family: var(--sp-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sp-text-muted);
    margin: 0 0 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sp-gray-light);
    color: var(--sp-text);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: var(--sp-text);
    color: white;
}

.share-btn.facebook:hover {
    background: #1877f2;
}

.share-btn.twitter:hover {
    background: #000;
}

.share-btn.linkedin:hover {
    background: #0a66c2;
}

.share-btn.whatsapp:hover {
    background: #25d366;
}

.share-btn.copy-link:hover {
    background: var(--sp-orange);
}

/* ========================
   AUTHOR BIO
   ======================== */
.author-bio {
    background: var(--sp-cream);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    gap: 1.5rem;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sp-text-muted);
    margin: 0 0 0.5rem;
}

.author-name {
    font-family: var(--sp-font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--sp-text);
}

.author-bio-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--sp-text-muted);
    margin: 0 0 1rem;
}

.author-links {
    display: flex;
    gap: 0.75rem;
}

.author-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: var(--sp-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.author-links a:hover {
    background: var(--sp-orange);
    color: white;
}

.author-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--sp-orange);
    text-decoration: none;
    font-weight: 500;
    margin-top: 0.5rem;
}

.author-more:hover {
    text-decoration: underline;
}

/* ========================
   RELATED POSTS
   ======================== */
.related-section {
    padding: 4rem 0;
    border-top: 1px solid var(--sp-border);
}

.related-title {
    font-family: var(--sp-font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 2.5rem;
    color: var(--sp-text);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(10, 22, 40, 0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(10, 22, 40, 0.12);
}

.related-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.related-card:hover .related-card-image img {
    transform: scale(1.05);
}

.related-card-category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.35rem 0.75rem;
    background: var(--region-color, var(--sp-orange));
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.related-card-content {
    padding: 1.25rem;
}

.related-card-title {
    font-family: var(--sp-font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.75rem;
    color: var(--sp-text);
}

.related-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--sp-text-muted);
}

.related-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 1200px) {
    .sidebar-toc {
        display: none;
    }

    .mobile-toc {
        display: block;
    }

    .content-wrapper {
        display: block;
    }

    .post-content {
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .post-header {
        height: 60vh;
        min-height: 400px;
    }

    .post-header-content {
        padding: 2rem 5%;
    }

    .post-header-meta {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .content-wrapper {
        padding: 2rem 0;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body > p:first-of-type::first-letter {
        font-size: 3rem;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-links {
        justify-content: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .share-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .post-header-breadcrumb {
        display: none;
    }

    .infobox-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Print styles */
@media print {
    .sidebar-toc,
    .mobile-toc,
    .share-section,
    .related-section {
        display: none;
    }

    .post-header {
        height: auto;
        min-height: auto;
    }

    .article-body {
        font-size: 12pt;
    }
}
