/* Custom WooCommerce Single Product Layout */
:root {
    --cwspl-primary: #1c61e7;
    --cwspl-primary-dark: #164fc0;
    --cwspl-ink: #262b35;
    --cwspl-muted: #858b96;
    --cwspl-line: #e8ebf1;
    --cwspl-bg: #f4f6f9;
}

.cwspl-page {
    direction: rtl;
    color: var(--cwspl-ink);
    background: var(--cwspl-bg);
    padding: 24px clamp(12px, 2vw, 28px) 42px;
    font-family: inherit;
}

.cwspl-page * {
    box-sizing: border-box;
}

.cwspl-breadcrumb {
    max-width: 1500px;
    margin: 0 auto 18px;
    min-height: 58px;
    padding: 14px 22px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 5px 22px rgba(24, 36, 60, .07);
    font-size: 13px;
}

.cwspl-breadcrumb a {
    color: var(--cwspl-primary);
    text-decoration: none;
    white-space: nowrap;
}

.cwspl-breadcrumb .woocommerce-breadcrumb {
    margin: 0;
    color: #7d8490;
}

.cwspl-crumb-sep {
    padding: 0 7px;
    color: #b3b8c1;
}

.cwspl-product-card {
    max-width: 1500px;
    margin: 0 auto 18px;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(24, 36, 60, .09);
    display: grid;
    grid-template-columns: minmax(255px, .9fr) minmax(300px, 1.1fr) minmax(280px, 1fr);
    gap: clamp(18px, 2.2vw, 36px);
    align-items: start;
}

.cwspl-buy-column {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
}

.cwspl-gallery-column {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    position: relative;
}

.cwspl-details-column {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.cwspl-services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
    padding: 18px 4px 26px;
}

.cwspl-service {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: #424854;
    font-size: 13px;
}

.cwspl-service-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #d9e2f2;
    color: var(--cwspl-primary);
    border-radius: 13px;
    font-size: 24px;
    background: #f7faff;
}

.cwspl-service strong {
    font-size: 13px;
    font-weight: 700;
}

.cwspl-service small {
    color: #a0a5ae;
    font-size: 11px;
    line-height: 1.8;
}

.cwspl-price-box {
    border-radius: 18px;
    background: #f4f6fa;
    padding: 18px 16px 16px;
    text-align: center;
}

.cwspl-price-heading {
    color: #656d79;
    font-size: 14px;
    margin-bottom: 7px;
}

.cwspl-price-heading span {
    color: var(--cwspl-primary);
    margin-right: 4px;
}

.cwspl-price {
    color: var(--cwspl-primary);
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.7;
}

.cwspl-price del {
    color: #aeb4be;
    font-size: 13px;
    font-weight: 400;
    margin-left: 8px;
}

.cwspl-price ins {
    text-decoration: none;
}

.cwspl-cart-button .cart {
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cwspl-cart-button .quantity {
    margin: 0 !important;
}

.cwspl-cart-button .quantity .qty {
    min-height: 42px;
    border: 1px solid #dce1e9;
    border-radius: 10px;
    width: 58px;
    background: #fff;
}

.cwspl-cart-button .single_add_to_cart_button,
.cwspl-cart-button .add_to_cart_button {
    flex: 1;
    min-height: 42px;
    border-radius: 12px !important;
    background: var(--cwspl-primary) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border: 0 !important;
    padding: 10px 14px !important;
    transition: .2s ease;
}

.cwspl-cart-button .single_add_to_cart_button:hover {
    background: var(--cwspl-primary-dark) !important;
    transform: translateY(-1px);
}

.cwspl-cart-button .variations {
    width: 100%;
    margin-bottom: 10px !important;
}

.cwspl-cart-button .variations select {
    border: 1px solid var(--cwspl-line);
    border-radius: 9px;
    padding: 9px;
}

.cwspl-mini-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.cwspl-mini-actions button {
    flex: 1;
}

.cwspl-favorite,
.cwspl-compare {
    border: 1px solid #dce3ee;
    background: #fff;
    border-radius: 10px;
    color: #525b68;
    padding: 10px 8px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: .2s;
}

.cwspl-favorite:hover,
.cwspl-compare:hover,
.cwspl-favorite.is-active {
    border-color: var(--cwspl-primary);
    color: var(--cwspl-primary);
    background: #f4f8ff;
}

.cwspl-contact-box {
    margin-top: 14px;
    padding: 16px 12px;
    border: 1px dashed #b9c5d7;
    border-radius: 15px;
    text-align: center;
    font-size: 12px;
    color: #606977;
}

.cwspl-contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.cwspl-contact-buttons a {
    color: #fff;
    background: var(--cwspl-primary);
    border-radius: 9px;
    padding: 10px 6px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.cwspl-contact-buttons a:last-child {
    background: #18b968;
}

.cwspl-contact-box small {
    display: block;
    color: #a2a8b2;
    font-size: 10px;
    margin-top: 8px;
    line-height: 1.7;
}

.cwspl-sale-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    background: var(--cwspl-primary);
    color: #fff;
    border-radius: 30px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
}

.cwspl-main-image {
    position: relative;
    min-height: 330px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 15px;
    padding: 12px;
}

.cwspl-main-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 440px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.cwspl-zoom {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border: 1px solid #edf0f4;
    border-radius: 50%;
    background: #fff;
    color: #697282;
    font-size: 21px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .06);
}

.cwspl-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 12px auto 0;
    flex-wrap: wrap;
}

.cwspl-thumb {
    width: 66px;
    height: 66px;
    border: 1px solid var(--cwspl-line);
    border-radius: 10px;
    background: #fff;
    padding: 5px;
    cursor: pointer;
    overflow: hidden;
}

.cwspl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cwspl-thumb.is-active {
    border: 2px solid var(--cwspl-primary);
}

.cwspl-view-count {
    border-radius: 14px;
    background: #eef4ff;
    color: var(--cwspl-primary);
    padding: 12px 14px;
    font-size: 12px;
    margin-bottom: 16px;
}

.cwspl-title {
    font-size: clamp(20px, 1.7vw, 27px);
    line-height: 1.65;
    margin: 0 0 8px !important;
    color: #4a515d;
    font-weight: 800;
}

.cwspl-sku {
    font-size: 11px;
    color: #a1a6af;
    margin: 0 0 10px;
}

.cwspl-sku span {
    color: #69717e;
}

.cwspl-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
}

.cwspl-rating .star-rating {
    float: none;
    margin: 0;
    color: #f5a623;
}

.cwspl-rating span {
    color: #9da3ad;
}

.cwspl-short-description {
    font-size: 13px;
    line-height: 2.2;
    color: #555d69;
}

.cwspl-short-description p {
    margin: 0 0 8px;
}

.cwspl-short-description ul,
.cwspl-default-features {
    list-style: none;
    padding: 0;
    margin: 8px 0 18px;
}

.cwspl-short-description li,
.cwspl-default-features li {
    position: relative;
    padding-right: 18px;
    margin: 7px 0;
}

.cwspl-short-description li:before,
.cwspl-default-features li:before {
    content: "";
    position: absolute;
    right: 1px;
    top: .8em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cwspl-primary);
}

.cwspl-default-features {
    font-size: 13px;
    line-height: 2.2;
    color: #555d69;
}

.cwspl-details-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 22px 0 16px;
}

.cwspl-details-buttons button {
    flex: 1;
    min-width: 130px;
}

.cwspl-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--cwspl-line);
    border-bottom: 1px solid var(--cwspl-line);
    font-size: 12px;
    color: #596270;
}

.cwspl-stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #20b66a;
}

.cwspl-stock-note {
    margin-right: auto;
    color: #20a862;
}

.cwspl-meta {
    font-size: 11px;
    color: #777f8b;
    line-height: 2.1;
    padding-top: 12px;
    overflow-wrap: anywhere;
}

.cwspl-meta span {
    color: #a1a7b0;
}

.cwspl-meta a {
    color: var(--cwspl-primary);
    text-decoration: none;
}

.cwspl-tabs-wrap,
.cwspl-related-wrap {
    max-width: 1500px;
    margin: 18px auto;
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 6px 24px rgba(24, 36, 60, .06);
}

.cwspl-tabs-wrap .woocommerce-tabs {
    margin: 0 !important;
}

.cwspl-tabs-wrap .woocommerce-tabs ul.tabs {
    display: flex;
    gap: 6px;
    border: 1px solid var(--cwspl-line);
    border-radius: 12px;
    padding: 7px !important;
    margin: 0 0 20px !important;
    overflow-x: auto;
}

.cwspl-tabs-wrap .woocommerce-tabs ul.tabs:before,
.cwspl-tabs-wrap .woocommerce-tabs ul.tabs li:before,
.cwspl-tabs-wrap .woocommerce-tabs ul.tabs li:after {
    display: none !important;
}

.cwspl-tabs-wrap .woocommerce-tabs ul.tabs li {
    border: 0 !important;
    background: transparent !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    margin: 0 !important;
    white-space: nowrap;
}

.cwspl-tabs-wrap .woocommerce-tabs ul.tabs li.active {
    background: #eef4ff !important;
    color: var(--cwspl-primary) !important;
}

.cwspl-tabs-wrap .woocommerce-tabs ul.tabs li a {
    color: inherit !important;
    font-weight: 600 !important;
}

.cwspl-tabs-wrap .woocommerce-Tabs-panel {
    font-size: 13px;
    line-height: 2.1;
    color: #555d69;
}

.cwspl-tabs-wrap .woocommerce-Tabs-panel h2 {
    font-size: 19px;
}

.cwspl-related-wrap .related>h2 {
    font-size: 22px;
    text-align: center;
    margin: 0 0 20px;
}

.cwspl-related-wrap .related ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.cwspl-related-wrap .related ul.products:before,
.cwspl-related-wrap .related ul.products:after {
    display: none;
}

.cwspl-related-wrap .related ul.products li.product {
    width: auto !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--cwspl-line);
    border-radius: 13px;
    background: #fff;
}

.cwspl-related-wrap .related ul.products li.product img {
    border-radius: 9px;
}

.cwspl-related-wrap .related ul.products li.product .price {
    color: var(--cwspl-primary) !important;
}

.cwspl-page .woocommerce-message,
.cwspl-page .woocommerce-info {
    border-top-color: var(--cwspl-primary);
}

.cwspl-page .woocommerce-message:before,
.cwspl-page .woocommerce-info:before {
    color: var(--cwspl-primary);
}

.cwspl-page .quantity .qty {
    max-width: 70px;
}

.cwspl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(12, 18, 30, .88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cwspl-lightbox img {
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
}

.cwspl-lightbox-close {
    position: absolute;
    top: 20px;
    left: 24px;
    border: 0;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 25px;
    background: #fff;
    color: #222;
    cursor: pointer;
}

@media (max-width:1100px) {
    .cwspl-product-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .cwspl-buy-column {
        grid-column: 1;
        grid-row: 2;
    }

    .cwspl-gallery-column {
        grid-column: 1;
        grid-row: 1;
    }

    .cwspl-details-column {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .cwspl-main-image {
        min-height: 280px;
    }

    .cwspl-related-wrap .related ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width:700px) {
    .cwspl-page {
        padding: 12px 10px 28px;
    }

    .cwspl-breadcrumb {
        padding: 12px 14px;
        font-size: 11px;
        border-radius: 12px;
    }

    .cwspl-breadcrumb a {
        display: none;
    }

    .cwspl-product-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 15px;
        gap: 18px;
        border-radius: 15px;
    }

    .cwspl-gallery-column,
    .cwspl-details-column,
    .cwspl-buy-column {
        grid-column: 1;
        grid-row: auto;
    }

    .cwspl-gallery-column {
        grid-row: 1;
    }

    .cwspl-details-column {
        grid-row: 2;
    }

    .cwspl-buy-column {
        grid-row: 3;
    }

    .cwspl-main-image {
        min-height: 230px;
    }

    .cwspl-main-img {
        max-height: 330px;
    }

    .cwspl-services-grid {
        padding: 10px 4px 18px;
        gap: 18px 10px;
    }

    .cwspl-price {
        font-size: 21px;
    }

    .cwspl-tabs-wrap,
    .cwspl-related-wrap {
        padding: 14px;
        border-radius: 14px;
    }

    .cwspl-tabs-wrap .woocommerce-tabs ul.tabs {
        gap: 0;
    }

    .cwspl-tabs-wrap .woocommerce-tabs ul.tabs li {
        padding: 8px 10px !important;
        font-size: 12px;
    }

    .cwspl-related-wrap .related ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .cwspl-related-wrap .related ul.products li.product {
        padding: 8px !important;
    }

    .cwspl-contact-buttons {
        grid-template-columns: 1fr 1fr;
    }
}