.ksc-product-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ── Breadcrumb ── */

.ksc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 32px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    font-size: 13px;
}

.ksc-bc-sep {
    color: #adb5bd;
    font-size: 11px;
}

.ksc-bc-item {
    color: #495057;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background .15s, color .15s;
}

.ksc-bc-link:hover {
    background: #e9ecef;
    color: #1a7fdd;
}

.ksc-bc-current {
    color: #1a7fdd;
    font-weight: 600;
}

/* ── Layout ── */

.ksc-product-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 48px;
}

.ksc-product-gallery {
    flex: 0 0 40%;
    max-width: 40%;
}

.ksc-product-summary {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .ksc-product-layout {
        flex-direction: column;
        gap: 24px;
    }

    .ksc-product-gallery {
        flex: none;
        max-width: 100%;
    }
}

/* ── Gallery Enhancements ── */

.ksc-product-gallery .woocommerce-product-gallery {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.ksc-product-gallery .flex-viewport {
    border-radius: 12px 12px 0 0;
}

.ksc-product-gallery .flex-control-thumbs {
    padding: 8px;
    gap: 6px;
}

.ksc-product-gallery .flex-control-thumbs li img {
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color .2s;
}

.ksc-product-gallery .flex-control-thumbs li img.flex-active {
    border-color: #1a7fdd;
}

/* ── Product Title ── */

.ksc-product-summary .product_title {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px;
    line-height: 1.3;
}

/* ── Rating ── */

.ksc-product-summary .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.ksc-product-summary .star-rating {
    font-size: 14px;
    letter-spacing: 2px;
}

.ksc-product-summary .woocommerce-review-link {
    font-size: 13px;
    color: #6c757d;
}

/* ── Info Fields ── */

.ksc-info-fields {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 16px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
}

.ksc-info-field {
    display: contents;
}

.ksc-info-field dt {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.ksc-info-field dd {
    font-size: 14px;
    color: #212529;
    font-weight: 600;
    margin: 0;
}

.ksc-in-stock dd {
    color: #2b8a3e;
}

.ksc-out-of-stock dd {
    color: #e03131;
}

/* ── Price ── */

.ksc-product-summary .price {
    font-size: 24px;
    font-weight: 700;
    color: #1a7fdd;
    margin: 16px 0;
}

.ksc-product-summary .price del {
    font-size: 16px;
    color: #adb5bd;
    font-weight: 400;
    margin-right: 8px;
}

.ksc-product-summary .price ins {
    text-decoration: none;
}

/* ── Add to Cart ── */

.ksc-product-summary .cart {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.ksc-product-summary .quantity {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.ksc-product-summary .quantity .qty {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    color: #212529;
}

.ksc-product-summary .quantity .qty:focus {
    outline: none;
}

.ksc-product-summary .single_add_to_cart_button {
    height: 44px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #1a7fdd;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.ksc-product-summary .single_add_to_cart_button:hover {
    background: #1565b0;
}

.ksc-product-summary .single_add_to_cart_button:active {
    transform: scale(.97);
}

/* ── Short Description ── */

.ksc-auto-short-desc {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.ksc-compat-printers-label {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px;
}

.ksc-compat-models {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.ksc-compat-models li {
    font-size: 14px;
    color: #495057;
    font-family: monospace;
}

.ksc-compat-models li::before {
    content: '•';
    color: #1a7fdd;
    margin-right: 4px;
}

.ksc-family-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a7fdd;
    margin: 0 0 4px;
}

.ksc-show-all-printers {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #1a7fdd;
    background: transparent;
    border: 1px solid #1a7fdd;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.ksc-show-all-printers:hover {
    background: #1a7fdd;
    color: #fff;
}

.ksc-all-printers {
    margin-top: 12px;
}

/* ── Tabs ── */

.ksc-product-tabs {
    margin-bottom: 48px;
}

.ksc-product-tabs .woocommerce-tabs {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.ksc-product-tabs .wc-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.ksc-product-tabs .wc-tabs li {
    margin: 0;
}

.ksc-product-tabs .wc-tabs li a {
    display: block;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

.ksc-product-tabs .wc-tabs li a:hover {
    color: #212529;
}

.ksc-product-tabs .wc-tabs li.active a {
    color: #1a7fdd;
    border-bottom-color: #1a7fdd;
}

.ksc-product-tabs .panel {
    padding: 32px;
}

.ksc-product-tabs .panel h2 {
    display: none;
}

/* ── Tab Content ── */

.ksc-tab-description {
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
}

.ksc-tab-description p {
    margin: 0 0 12px;
}

/* ── Specifications Table ── */

.ksc-specs-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
}

.ksc-specs-table tr {
    border-bottom: 1px solid #e9ecef;
}

.ksc-specs-table tr:last-child {
    border-bottom: none;
}

.ksc-specs-table th {
    padding: 12px 16px 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-align: left;
    white-space: nowrap;
    width: 140px;
}

.ksc-specs-table td {
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

/* ── Compatible Printers Tab ── */

.ksc-printer-family-group {
    margin-bottom: 24px;
}

.ksc-printer-family-title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px;
}

.ksc-printer-model-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ksc-printer-link {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #1a7fdd;
    background: #f0f4ff;
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s, color .15s;
    font-family: monospace;
}

.ksc-printer-link:hover {
    background: #1a7fdd;
    color: #fff;
}

/* ── Sidebar Sections ── */

.ksc-sidebar-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.ksc-sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px;
}

.ksc-sidebar-sub {
    font-size: 13px;
    color: #6c757d;
    margin: -8px 0 12px;
}

.ksc-color-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ksc-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
    min-width: 80px;
}

.ksc-color-item:hover {
    border-color: #1a7fdd;
    box-shadow: 0 2px 8px rgba(26,127,221,.1);
}

.ksc-color-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
}

.ksc-color-name {
    font-size: 12px;
    color: #495057;
    font-weight: 500;
}

.ksc-alternatives-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ksc-alternative-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-decoration: none;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
}

.ksc-alternative-item:hover {
    border-color: #1a7fdd;
    box-shadow: 0 2px 8px rgba(26,127,221,.1);
}

.ksc-alt-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.ksc-alt-name {
    flex: 1;
    font-size: 13px;
    color: #212529;
    font-weight: 500;
}

.ksc-alt-price {
    font-size: 14px;
    font-weight: 700;
    color: #1a7fdd;
    white-space: nowrap;
}

/* ── Related Sections ── */

.ksc-related-sections {
    margin-bottom: 48px;
}

.ksc-related-section {
    margin-bottom: 40px;
}

.ksc-related-title {
    font-size: 22px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 20px;
}

.ksc-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.ksc-related-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
}

.ksc-related-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    transform: translateY(-2px);
}

.ksc-related-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 16px;
}

.ksc-related-card-img {
    text-align: center;
    margin-bottom: 12px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ksc-related-card-img img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.ksc-related-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ksc-related-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.4;
}

.ksc-related-card-brand {
    font-size: 12px;
    color: #6c757d;
}

.ksc-related-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ksc-related-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    background: #f0f4ff;
    color: #1a7fdd;
    border-radius: 4px;
}

.ksc-related-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #1a7fdd;
    margin-top: 4px;
}

/* ── Default WooCommerce Related / Upsells ── */

.ksc-product-wrap .upsells,
.ksc-product-wrap .related {
    margin-bottom: 40px;
}

.ksc-product-wrap .upsells h2,
.ksc-product-wrap .related h2 {
    font-size: 22px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 20px;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .ksc-product-summary .product_title {
        font-size: 22px;
    }

    .ksc-product-summary .price {
        font-size: 20px;
    }

    .ksc-info-fields {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px;
    }

    .ksc-info-field {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ksc-product-tabs .wc-tabs {
        overflow-x: auto;
    }

    .ksc-product-tabs .wc-tabs li a {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .ksc-product-tabs .panel {
        padding: 20px;
    }

    .ksc-related-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .ksc-specs-table th {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .ksc-product-summary .cart {
        flex-direction: column;
        align-items: stretch;
    }

    .ksc-product-summary .quantity {
        align-self: flex-start;
    }

    .ksc-product-summary .single_add_to_cart_button {
        width: 100%;
    }

    .ksc-related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}
