/**
 * SnapStore Product Detail CSS — CodeCanyon-style layout
 *
 * @package SnapStore
 * @since 1.2.0
 * 2026-03-15 12:00:00
 */

/* =========================================================================
 * LAYOUT
 * ====================================================================== */

.ss-pd {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ss-body, #4B5563);
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ss-pd-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

.ss-pd-main {
    min-width: 0;
}

.ss-pd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 32px;
}

/* =========================================================================
 * BREADCRUMB
 * ====================================================================== */

.ss-pd-breadcrumb {
    font-size: 13px;
    color: var(--ss-subtle, #6B7280);
    margin-bottom: 24px;
}

.ss-pd-breadcrumb a {
    color: var(--ss-blue, #1258C2);
    text-decoration: none;
}

.ss-pd-breadcrumb a:hover {
    text-decoration: underline;
}

.ss-pd-breadcrumb-sep {
    margin: 0 8px;
    color: #D1D5DB;
}

/* =========================================================================
 * HERO / BANNER
 * ====================================================================== */

.ss-pd-banner {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--ss-bg, #F9FAFB);
    border: 1px solid var(--ss-border, #E5E7EB);
}

.ss-pd-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================================================
 * SCREENSHOTS
 * ====================================================================== */

.ss-pd-screenshots {
    margin-bottom: 24px;
}

.ss-pd-screenshots-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.ss-pd-thumb {
    flex: 0 0 auto;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: none;
    padding: 0;
    scroll-snap-align: start;
    transition: border-color 0.15s;
}

.ss-pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ss-pd-thumb:hover,
.ss-pd-thumb:focus {
    border-color: var(--ss-blue, #1258C2);
    outline: none;
}

.ss-pd-thumb--active {
    border-color: var(--ss-blue, #1258C2);
    box-shadow: 0 0 0 2px rgba(18, 88, 194, 0.2);
}

/* =========================================================================
 * TABS
 * ====================================================================== */

.ss-pd-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--ss-border, #E5E7EB);
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ss-pd-tab {
    padding: 14px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ss-subtle, #6B7280);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.ss-pd-tab:hover,
.ss-pd-tab:focus {
    color: var(--ss-navy, #0B1D3A);
    outline: none;
}

.ss-pd-tab--active {
    color: var(--ss-blue, #1258C2) !important;
    border-bottom-color: var(--ss-blue, #1258C2) !important;
}

/* =========================================================================
 * PANELS
 * ====================================================================== */

.ss-pd-panel {
    display: none;
    padding: 28px 0;
}

.ss-pd-panel--active {
    display: block;
}

.ss-pd-description {
    font-size: 15px;
    line-height: 1.75;
    color: var(--ss-body, #4B5563);
}

.ss-pd-description h2,
.ss-pd-description h3 {
    color: var(--ss-navy, #0B1D3A);
    margin-top: 28px;
    margin-bottom: 12px;
}

.ss-pd-description h2 { font-size: 22px; }
.ss-pd-description h3 { font-size: 18px; }

.ss-pd-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.ss-pd-description ul,
.ss-pd-description ol {
    padding-left: 20px;
    margin: 12px 0;
}

.ss-pd-description li {
    margin-bottom: 6px;
}

.ss-pd-empty {
    color: var(--ss-subtle, #6B7280);
    font-style: italic;
}

/* =========================================================================
 * FEATURES GRID
 * ====================================================================== */

.ss-pd-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ss-pd-feature-card {
    background: var(--ss-bg, #F9FAFB);
    border: 1px solid var(--ss-border, #E5E7EB);
    border-radius: 10px;
    padding: 20px;
}

.ss-pd-feature-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.ss-pd-feature-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ss-navy, #0B1D3A);
    margin: 0 0 6px;
}

.ss-pd-feature-card p {
    font-size: 13px;
    color: var(--ss-subtle, #6B7280);
    margin: 0;
    line-height: 1.5;
}

/* =========================================================================
 * CHANGELOG
 * ====================================================================== */

.ss-pd-changelog {
    font-size: 14px;
    line-height: 1.7;
}

.ss-pd-changelog h4,
.ss-pd-changelog strong {
    color: var(--ss-navy, #0B1D3A);
}

/* =========================================================================
 * FAQ
 * ====================================================================== */

.ss-pd-faq-item {
    border-bottom: 1px solid var(--ss-border, #E5E7EB);
    padding: 16px 0;
}

.ss-pd-faq-item summary {
    font-weight: 600;
    font-size: 15px;
    color: var(--ss-navy, #0B1D3A);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ss-pd-faq-item summary::-webkit-details-marker {
    display: none;
}

.ss-pd-faq-item summary::after {
    content: '+';
    font-size: 20px;
    color: var(--ss-subtle, #6B7280);
    flex-shrink: 0;
    margin-left: 12px;
    transition: transform 0.2s;
}

.ss-pd-faq-item[open] summary::after {
    content: '−';
}

.ss-pd-faq-item p {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--ss-body, #4B5563);
    line-height: 1.65;
}

/* =========================================================================
 * REVIEWS
 * ====================================================================== */

.ss-pd-reviews-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.ss-pd-rating-big {
    text-align: center;
}

.ss-pd-rating-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--ss-navy, #0B1D3A);
    line-height: 1;
    display: block;
}

.ss-pd-stars {
    margin-top: 6px;
}

.ss-star {
    font-size: 20px;
}

.ss-star--full { color: #FBBF24; }
.ss-star--half { color: #FBBF24; opacity: 0.6; }
.ss-star--empty { color: #D1D5DB; }

/* =========================================================================
 * RELATED PRODUCTS
 * ====================================================================== */

.ss-pd-related {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--ss-border, #E5E7EB);
}

.ss-pd-related h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--ss-navy, #0B1D3A);
    margin: 0 0 16px;
}

.ss-pd-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ss-pd-related-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--ss-border, #E5E7EB);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ss-pd-related-card:hover {
    border-color: var(--ss-blue, #1258C2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ss-pd-related-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ss-pd-related-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ss-navy, #0B1D3A);
    margin: 0 0 2px;
}

.ss-pd-related-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--ss-blue, #1258C2);
}

/* =========================================================================
 * SIDEBAR — PURCHASE BOX
 * ====================================================================== */

.ss-pd-purchase-box {
    background: var(--ss-card, #FFFFFF);
    border: 2px solid var(--ss-gold, #E8A838);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 4px 16px rgba(232, 168, 56, 0.12);
}

.ss-pd-price-row {
    text-align: center;
    margin-bottom: 20px;
}

.ss-pd-price {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 42px;
    font-weight: 400;
    color: var(--ss-navy, #0B1D3A);
    line-height: 1;
}

.ss-pd-price-period {
    font-size: 16px;
    color: var(--ss-subtle, #6B7280);
    font-weight: 400;
}

.ss-pd-buy-btn {
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
    font-size: 16px !important;
    padding: 16px 24px !important;
}

.ss-pd-demo-btn {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.ss-pd-purchase-includes {
    border-top: 1px solid var(--ss-border, #E5E7EB);
    padding-top: 16px;
}

.ss-pd-purchase-includes h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ss-subtle, #6B7280);
    margin: 0 0 10px;
}

.ss-pd-purchase-includes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ss-pd-purchase-includes li {
    font-size: 13px;
    color: var(--ss-body, #4B5563);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ss-pd-check {
    color: var(--ss-green, #2ECC71);
    font-weight: 700;
    font-size: 14px;
}

/* =========================================================================
 * SIDEBAR — PRODUCT INFO
 * ====================================================================== */

.ss-pd-info-box {
    background: var(--ss-card, #FFFFFF);
    border: 1px solid var(--ss-border, #E5E7EB);
    border-radius: 12px;
    padding: 24px;
}

.ss-pd-info-box h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ss-navy, #0B1D3A);
    margin: 0 0 14px;
}

.ss-pd-info-table {
    width: 100%;
    border-collapse: collapse;
}

.ss-pd-info-table tr {
    border-bottom: 1px solid var(--ss-bg, #F3F4F6);
}

.ss-pd-info-table tr:last-child {
    border-bottom: none;
}

.ss-pd-info-label {
    font-size: 13px;
    color: var(--ss-subtle, #6B7280);
    padding: 8px 0;
    width: 45%;
}

.ss-pd-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ss-navy, #0B1D3A);
    padding: 8px 0;
    text-align: right;
}

/* =========================================================================
 * SIDEBAR — AUTHOR BOX
 * ====================================================================== */

.ss-pd-author-box {
    background: var(--ss-card, #FFFFFF);
    border: 1px solid var(--ss-border, #E5E7EB);
    border-radius: 12px;
    padding: 24px;
}

.ss-pd-author-box h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ss-navy, #0B1D3A);
    margin: 0 0 14px;
}

.ss-pd-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.ss-pd-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ss-navy, #0B1D3A);
    color: var(--ss-gold, #E8A838);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.ss-pd-author-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--ss-navy, #0B1D3A);
    margin: 0;
}

.ss-pd-author-detail {
    font-size: 12px;
    color: var(--ss-subtle, #6B7280);
    margin: 0;
}

.ss-pd-author-box .ss-btn {
    width: 100%;
    text-align: center;
    margin-top: 4px;
}

/* =========================================================================
 * SIDEBAR — TRUST SIGNALS
 * ====================================================================== */

.ss-pd-trust {
    background: var(--ss-bg, #F9FAFB);
    border-radius: 12px;
    padding: 20px;
}

.ss-pd-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ss-body, #4B5563);
    padding: 6px 0;
}

.ss-pd-trust-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* =========================================================================
 * RESPONSIVE
 * ====================================================================== */

@media (max-width: 960px) {
    .ss-pd-layout {
        grid-template-columns: 1fr;
    }

    .ss-pd-sidebar {
        position: static;
        order: -1;
    }

    .ss-pd-purchase-box {
        position: static;
    }

    .ss-pd-features-grid {
        grid-template-columns: 1fr;
    }

    .ss-pd-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .ss-pd-tab {
        padding: 12px 16px;
        font-size: 13px;
    }

    .ss-pd-price {
        font-size: 36px;
    }
}

/* =========================================================================
 * LIGHTBOX
 * ====================================================================== */

.ss-pd-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: pointer;
}

.ss-pd-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.ss-pd-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.ss-pd-lightbox-close:hover {
    opacity: 1;
}

/* v1.4.1 - AAA hardening (bg+text pinned together, all states, LVHA). */
a.ss-pd-buy-btn:link, a.ss-pd-buy-btn:visited, button.ss-pd-buy-btn {
    background: #ffc845 !important;
    color: #003b49 !important;
    text-decoration: none !important;
}
a.ss-pd-buy-btn:hover, button.ss-pd-buy-btn:hover,
a.ss-pd-buy-btn:focus, button.ss-pd-buy-btn:focus,
a.ss-pd-buy-btn:active, button.ss-pd-buy-btn:active {
    background: #f2c75c !important;
    color: #003b49 !important;
}
.ss-pd-tabs { overflow: visible; }
.ss-pd-panel { min-height: 0; }
button.ss-pd-tab { background: #FFFFFF !important; color: #4B5563 !important; text-decoration: none !important; }
button.ss-pd-tab:hover, button.ss-pd-tab:focus { background: #1d4289 !important; color: #FFFFFF !important; }
button.ss-pd-tab--active, button.ss-pd-tab--active:hover, button.ss-pd-tab--active:focus { background: #FFFFFF !important; color: #0B1D3A !important; border-bottom: 3px solid #1d4289 !important; }

/* v1.5.0 - Product header (the page previously had no product name). */
.ss-pd-header {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #d0d3d4;
    border-radius: 12px;
    padding: 22px 24px;
    margin: 0 0 22px;
}
.ss-pd-header-icon {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: #0B1D3A;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ss-pd-header-icon span {
    color: #E8A838;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}
.ss-pd-header-icon img { width: 100%; height: 100%; object-fit: cover; }
h1.ss-pd-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 30px;
    font-weight: 400;
    color: #0B1D3A !important;
    margin: 0 0 8px;
    line-height: 1.15;
}
.ss-pd-header-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.ss-pd-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #d0d3d4;
    color: #003b49;
}
.ss-pd-badge--cat { background: #1b365d; color: #FFFFFF; }
.ss-pd-tagline { margin: 0; color: #4B5563; font-size: 15px; }
.ss-pd-hero:empty { display: none; }

/* Info table: kill the spreadsheet look. */
table.ss-pd-info-table { width: 100%; border-collapse: collapse; border: none !important; }
table.ss-pd-info-table td, table.ss-pd-info-table th {
    border: none !important;
    border-bottom: 1px solid #edf0f4 !important;
    padding: 9px 4px !important;
    background: #FFFFFF !important;
}
table.ss-pd-info-table tr:last-child td { border-bottom: none !important; }
table.ss-pd-info-table td:first-child { color: #4B5563; font-size: 13px; }
table.ss-pd-info-table td:last-child { color: #0B1D3A; font-weight: 600; text-align: right; }

@media (max-width: 640px) {
    .ss-pd-header { flex-direction: column; align-items: flex-start; }
}
