/**
 * Specs.pk Engine - Mobile Single Page CSS
 * Version: 2.7
 *
 * Supports:
 * - Plugin-owned mobile single wrapper/sidebar template.
 * - Existing mobile renderer classes output through the_content().
 */

body.single-mobile .site-content,
body.single-mobile .content-area,
body.single-mobile .site-main,
body.single-mobile .content-container,
body.single-mobile .entry-content-wrap,
body.single-mobile .content-bg,
body.single-mobile .entry {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.single-mobile .site-main {
    margin-top: 0 !important;
}

.spk-single-mobile-page {
    width: 100%;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.spk-single-mobile-page .spk-layout-with-sidebar,
.spk-layout-with-sidebar {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 15px 20px;
    box-sizing: border-box;
}

.spk-single-mobile-page .spk-sidebar,
.spk-sidebar {
    grid-column: 1;
    min-width: 0;
}

.spk-single-mobile-page .spk-main-content,
.spk-main-content {
    grid-column: 2;
    min-width: 0;
}

.spk-main-content img,
.spk-main-content table {
    max-width: 100%;
}

/* Sidebar */
.spk-sidebar-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.spk-sidebar-title {
    background: #b7b7b7;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .3px;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    padding: 9px 8px;
}

.spk-phone-finder-link,
.spk-phone-finder-button {
    display: block;
    width: 100%;
    background: #b7b7b7;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .3px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none !important;
    padding: 9px 8px;
    box-sizing: border-box;
}

.spk-phone-finder-link:hover,
.spk-phone-finder-link:focus,
.spk-phone-finder-button:hover,
.spk-phone-finder-button:focus {
    background: #d34e00;
    color: #fff !important;
    text-decoration: none !important;
}

.spk-sidebar-list,
.spk-sidebar-list li,
.spk-sidebar .spk-sidebar-list,
.spk-sidebar .spk-sidebar-list li {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.spk-sidebar-list {
    margin: 0;
    padding: 8px 0;
}

.spk-sidebar-list-item {
    list-style: none;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    border-bottom: 1px solid #eeeeee;
}

.spk-sidebar-list-item:last-child {
    border-bottom: 0;
}

.spk-sidebar-post-link {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    color: #2f6f9f;
    text-decoration: none !important;
}

.spk-sidebar-post-link:hover,
.spk-sidebar-post-link:focus {
    background: #f6f6f6;
    text-decoration: none !important;
}

.spk-sidebar-thumb {
    flex: 0 0 54px;
    width: 54px;
    height: 44px;
    overflow: hidden;
    background: #f4f4f4;
}

.spk-sidebar-thumb img {
    width: 54px;
    height: 44px;
    object-fit: cover;
    display: block;
}

.spk-sidebar-post-title {
    min-width: 0;
    color: #2f6f9f;
}

.spk-sidebar-view-all {
    display: block;
    padding: 10px 12px;
    color: #2f6f9f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    border-top: 1px solid #e5e5e5;
}

.spk-sidebar-view-all:hover,
.spk-sidebar-view-all:focus {
    text-decoration: underline !important;
}

/* Existing clean mobile renderer featured box */
.tech-specs-vertical {
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
    margin-bottom: 30px;
}

.specs-header {
    background: #333;
    padding: 15px 20px;
}

.specs-header h1 {
    margin: 0;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
}

.specs-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}

.specs-image-section {
    flex: 0 0 200px;
    text-align: center;
}

.specs-image-section img {
    max-width: 100%;
    height: auto;
    display: block;
}

.specs-list {
    flex: 1;
    min-width: 250px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: #fff;
}

.spec-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-right: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
}

.spec-row i {
    color: #d34e00;
    width: 35px;
    text-align: center;
    font-size: 24px;
}

.main-val {
    font-weight: 700;
    display: block;
    font-size: 14px;
    color: #333;
}

.sub-val {
    font-size: 11px;
    color: #777;
}

/* Alternative featured classes used by newer renderer variants */
.spk-featured-box {
    margin-bottom: 20px;
    border-bottom: 2px solid #d34e00;
    padding-bottom: 0;
}

.spk-featured-title {
    background: #222;
    padding: 11px 16px;
}

.spk-featured-title h1 {
    color: #fff;
    font-size: 22px;
    line-height: 1.3;
    margin: 0;
}

.spk-featured-body {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 16px;
    background: #fff;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
}

.spk-featured-image img {
    max-width: 160px;
    width: 100%;
    height: auto;
    display: block;
}

.spk-featured-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
}

.spk-featured-spec-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 10px 12px;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    line-height: 1.45;
}

.spk-featured-spec-item i {
    color: #d34e00;
    font-size: 20px;
    text-align: center;
}

/* Tabs / action bar */
.gsm-action-bar {
    display: flex;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-bottom: 2px solid #d34e00;
    margin-top: 0;
}

.action-btn,
.gsm-action-bar .btn-gsm,
.btn-gsm {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    border-right: 1px solid #ddd;
    text-decoration: none !important;
    color: #d34e00 !important;
    font-weight: 700;
    font-size: 11px;
    transition: .2s;
}

.action-btn:last-child,
.gsm-action-bar .btn-gsm:last-child,
.btn-gsm:last-child {
    border-right: none;
}

.action-btn:hover,
.gsm-action-bar .btn-gsm:hover,
.btn-gsm:hover {
    background: #d34e00;
    color: #fff !important;
}

/* Specs table */
.spec-group-title {
    background: #f4f4f4;
    padding: 8px 15px;
    border-left: 5px solid #d34e00;
    font-weight: 700;
    margin-top: 20px;
    text-transform: uppercase;
    font-size: 13px;
    color: #333;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.spec-table td {
    padding: 10px;
    border: 1px solid #eee;
    font-size: 14px;
    vertical-align: top;
}

.label-cell {
    width: 35%;
    font-weight: 700;
    color: #666;
    background: #fafafa;
}

/* Pictures / Opinions */
.gsm-vertical-gallery img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    border: 1px solid #eee;
    display: block;
}

.spk-mobile-extra-tab {
    margin-top: 18px;
}

.spk-mobile-extra-tab h2 {
    margin-top: 0;
}

.spk-mobile-pictures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.spk-mobile-picture-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #e5e7eb;
}

/* Pros & Cons */
.pros-cons-group,
.spk-pros-cons-at-end {
    margin-top: 20px;
}

.pc-wrapper {
    display: flex;
    gap: 20px;
    padding: 15px;
    border: 1px solid #eee;
    background: #fff;
}

.pros-box,
.cons-box {
    flex: 1;
}

.pros-box p {
    color: green;
    margin-bottom: 0;
}

.cons-box p {
    color: red;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .spk-single-mobile-page .spk-layout-with-sidebar,
    .spk-layout-with-sidebar {
        display: block;
        padding: 15px 10px 20px;
    }

    .spk-single-mobile-page .spk-sidebar,
    .spk-sidebar {
        margin-bottom: 20px;
    }

    .spk-featured-body {
        grid-template-columns: 1fr;
    }

    .spk-featured-specs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .specs-body {
        flex-direction: column;
    }

    .specs-image-section {
        flex: 0 0 100%;
        width: 100%;
        padding: 15px;
    }

    .specs-list {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .spec-row {
        border-right: none;
    }

    .pc-wrapper {
        flex-direction: column;
    }
}
