/*
|--------------------------------------------------------------------------
| Product Header
|--------------------------------------------------------------------------
*/

.ws-product-header{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 420px;
    gap:35px;
    align-items:start;
    margin:20px 0 0;
}

/*
|--------------------------------------------------------------------------
| Gallery
|--------------------------------------------------------------------------
*/

.ws-product-gallery{
    display:grid;
    grid-template-columns:90px 1fr;
    gap:18px;
    align-items:start;
}

.ws-gallery-thumbs{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.ws-gallery-thumbs img{
    width:90px;
    height:90px;
    object-fit:cover;
    border:2px solid #ddd;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

.ws-gallery-thumbs img:hover{
    border-color:#7b0d12;
}

.ws-gallery-image{
    display:flex;
    justify-content:center;
    align-items:center;

    width:100%;
    height: 500px;

    background:#fff;
    border:1px solid #ddd;
    border-radius:12px;

    padding:20px;
    box-sizing:border-box;

    overflow:hidden;

    box-shadow:0 3px 12px rgba(0,0,0,.08);
}

.ws-gallery-image img{
    width:auto;
    height:auto;

    max-width:88%;
    max-height:88%;

    object-fit:contain;
}

/*
|--------------------------------------------------------------------------
| Product Info
|--------------------------------------------------------------------------
*/

.ws-product-info{

    background:#fff;

    border:1px solid #ddd;

    border-radius:12px;

    padding:28px;

    box-shadow:0 3px 12px rgba(0,0,0,.08);
	box-sizing:border-box;

}

.ws-product-info h1{

    margin:0 0 18px;

    font-size:22px;

    line-height:1.3;

}

.ws-product-price{

    margin:20px 0 25px;

    font-size:44px;

    font-weight:700;

    color:#8b0000;

}


/*
|--------------------------------------------------------------------------
| Кнопка
|--------------------------------------------------------------------------
*/

.ws-buy-button{

    display:block;

    width:100%;

    box-sizing:border-box;

    padding:16px 20px;

    margin:25px 0;

    border:none;

    border-radius:8px;

    background:#8b0000;

    color:#fff;

    text-align:center;

    text-decoration:none;

    font-size:22px;

    font-weight:700;

    cursor:pointer;

    transition:.2s;

}

.ws-buy-button:hover{

    background:#6f0000;

}


.ws-product-meta{

    width:100%;

    border-collapse:collapse;

    margin-top:20px;

}

.ws-product-meta td{

    padding:10px 0;

    border-bottom:1px solid #eee;

}

.ws-product-meta td:first-child{

    color:#777;

    width:120px;

}


/*
|--------------------------------------------------------------------------
| Sections
|--------------------------------------------------------------------------
*/

.ws-section{

    background:#fff;

    border:1px solid #ddd;

    border-radius:12px;

    box-shadow:0 2px 10px rgba(0,0,0,.05);

    margin-top:25px;

    padding:25px;

}

.ws-section h2{

    margin:0 0 20px;

    font-size:24px;

    border-bottom:1px solid #eee;

    padding-bottom:12px;

}

#product-description,
#product-reviews {
    scroll-margin-top: 100px;
}

.ws-thumb{

    cursor:pointer;

    transition:.2s;

    border:2px solid transparent;

}

.ws-thumb.active{

    border-color:#8b0000;

}

.ws-thumb:hover{

    transform:scale(1.05);

}

#ws-main-image {
    cursor: pointer;
}


/*
|--------------------------------------------------------------------------
| Product Reviews
|--------------------------------------------------------------------------
*/

.ws-product-reviews__header {

    display: flex;

    align-items: flex-end;

    justify-content: flex-start;

    gap: 30px;

    margin-bottom: 20px;

}


.ws-product-reviews__title {

    margin: 0 !important;

    padding: 0 !important;

    border: none !important;

    font-size: 24px;

    line-height: 1.3;

}


.ws-product-reviews__count {

    margin-top: 5px;

    color: #777;

    font-size: 14px;

}


/*
|--------------------------------------------------------------------------
| Add Review Button
|--------------------------------------------------------------------------
*/

.ws-product-reviews__add {

    flex-shrink: 0;

    padding: 11px 20px;

    border: 1px solid #8b0000;

    border-radius: 8px;

    background: #fff;

    color: #8b0000;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease;

}


.ws-product-reviews__add:hover {

    background: #8b0000;

    color: #fff;

}


/*
|--------------------------------------------------------------------------
| Reviews Grid
|--------------------------------------------------------------------------
*/

.ws-product-reviews__list {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    margin-top: 20px;

}


/*
|--------------------------------------------------------------------------
| Review Card
|--------------------------------------------------------------------------
*/

.ws-review {

    display: flex;

    flex-direction: column;

    min-width: 0;

    min-height: 0;

    padding: 16px;

    background: #fafafa;

    border: 1px solid #e5e5e5;

    border-radius: 10px;

    box-sizing: border-box;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;

}


.ws-review:hover {

    border-color: #d5d5d5;

    box-shadow:
        0 3px 10px rgba(0,0,0,.05);

}


/*
|--------------------------------------------------------------------------
| Review Header
|--------------------------------------------------------------------------
*/

.ws-review__top {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 5px;

    margin-bottom: 14px;

}


.ws-review__author {

    font-size: 16px;

    font-weight: 700;

    color: #222;

}


.ws-review__date {

    color: #999;

    font-size: 13px;

}


/*
|--------------------------------------------------------------------------
| Review Text
|--------------------------------------------------------------------------
*/

.ws-review__text {

    color: #333;

    font-size: 15px;

    line-height: 1.6;

    overflow-wrap: anywhere;

}


/*
|--------------------------------------------------------------------------
| Empty Reviews
|--------------------------------------------------------------------------
*/

.ws-product-reviews__empty {

    padding: 10px 0 5px;

    color: #777;

    font-size: 15px;

}


.ws-product-reviews__empty-button {

    margin-left: 10px;

    padding: 0;

    border: none;

    background: none;

    color: #8b0000;

    font-size: inherit;

    cursor: pointer;

}


.ws-product-reviews__empty-button:hover {

    text-decoration: underline;

}


/*
|--------------------------------------------------------------------------
| Reviews Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .ws-product-reviews__list {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


@media (max-width: 600px) {

    .ws-product-reviews__header {

        align-items: flex-start;

        flex-direction: column;

        gap: 15px;

    }

    .ws-product-reviews__list {

        grid-template-columns: 1fr;

    }

    .ws-product-reviews__add {

        width: 100%;

    }

}
/*
|--------------------------------------------------------------------------
| Review Modal
|--------------------------------------------------------------------------
*/

body.ws-review-modal-open {
    overflow: hidden;
}

.ws-review-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.ws-review-modal[aria-hidden="false"] {
    display: block;
}

.ws-review-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.58);
}

.ws-review-modal__dialog {
    position: relative;
    width: min(560px, calc(100% - 30px));
    max-height: calc(100vh - 30px);
    overflow-y: auto;
    box-sizing: border-box;
    margin: 15px auto;
    padding: 30px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.ws-review-modal__dialog h2 {
    margin: 0 40px 7px 0;
    padding: 0;
    border: 0;
    font-size: 25px;
}

.ws-review-modal__subtitle {
    margin: 0 0 24px;
    color: #777;
    font-size: 14px;
}

.ws-review-modal__close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #666;
    font-size: 30px;
    line-height: 38px;
    cursor: pointer;
}

.ws-review-modal__field {
    margin-bottom: 17px;
}

.ws-review-modal__field label {
    display: block;
    margin-bottom: 7px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.ws-review-modal__field label span {
    color: #8b0000;
}

.ws-review-modal__field input:not([type="hidden"]),
.ws-review-modal__field textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #d7d7d7;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font: inherit;
    outline: none;
}

.ws-review-modal__field textarea {
    resize: vertical;
    min-height: 125px;
}

.ws-review-modal__field input:focus,
.ws-review-modal__field textarea:focus {
    border-color: #8b0000;
    box-shadow: 0 0 0 2px rgba(139,0,0,.08);
}

.ws-review-modal__field small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.ws-review-modal__captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

#ws-review-captcha-image {
    display: block;
    width: 180px;
    height: 58px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f8f8;
}

#ws-review-captcha-refresh {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #fff;
    color: #555;
    font-size: 22px;
    cursor: pointer;
}

#ws-review-captcha-refresh:hover {
    border-color: #8b0000;
    color: #8b0000;
}

.ws-review-modal__honeypot {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.ws-review-modal__error {
    min-height: 20px;
    margin: 5px 0 10px;
    color: #a00000;
    font-size: 14px;
}

.ws-review-modal__submit {
    width: 100%;
    padding: 13px 20px;
    border: 0;
    border-radius: 8px;
    background: #8b0000;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.ws-review-modal__submit:hover {
    background: #6f0000;
}

.ws-review-modal__submit:disabled {
    opacity: .65;
    cursor: wait;
}

@media (max-width: 600px) {
    .ws-review-modal__dialog {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 24px 20px;
    }
}

.ws-buy-button:disabled {
    background: #aaa;
    cursor: not-allowed;
    opacity: .75;
}

.ws-buy-button:disabled:hover {
    background: #aaa;
}

.ws-cart-message {
    min-height: 20px;
    margin: -12px 0 12px;
    font-size: 14px;
}

.ws-cart-message.is-success {
    color: #16803c;
}

.ws-cart-message.is-error {
    color: #b00020;
}


/*
|--------------------------------------------------------------------------
| Product detail cart state
|--------------------------------------------------------------------------
*/

.ws-product-cart-state {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 52px;
    position: relative;
}

.ws-product-cart-button {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    margin: 0;
    padding: 0 24px;
    box-sizing: border-box;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 700;
}

.ws-product-cart-button.is-in-cart {
    background: #00b83d;
    border-color: #00b83d;
    color: #fff;
}

.ws-product-cart-button.is-in-cart:hover {
    background: #009f35;
    border-color: #009f35;
}

.ws-product-quantity {
    display: grid;
    grid-template-columns: 42px 42px 42px;
    align-items: center;
    flex: 0 0 126px;
    width: 126px;
    height: 52px;
    min-height: 52px;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 8px;
    background: #f2f5f8;
}

.ws-product-quantity button {
    width: 42px;
    height: 52px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8b0000;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.ws-product-quantity button:hover {
    background: rgba(0,0,0,.05);
}

.ws-product-quantity span {
    min-width: 42px;
    text-align: center;
    color: #111;
    font-size: 16px;
    font-weight: 700;
}

.ws-product-buy__actions {
    align-items: center;
}

@media (max-width: 600px) {
    .ws-product-cart-state {
        min-height: 48px;
        flex-wrap: wrap;
    }

    .ws-product-cart-button {
        height: 48px;
        min-height: 48px;
    }

    .ws-product-quantity {
        height: 48px;
        min-height: 48px;
    }

    .ws-product-quantity button {
        height: 48px;
    }
}


/*
|--------------------------------------------------------------------------
| Product stock
|--------------------------------------------------------------------------
*/

.ws-product-stock {
    display: block;
    margin: 12px 0 18px;
    font-size: 15px;
    font-weight: 700;
}

.ws-product-stock.is-stock-low {
    color: #b00000;
}

.ws-product-stock.is-stock-good {
    color: #159447;
}

.ws-product-stock.is-out {
    color: #b00020;
}

.ws-product-stock.is-archived {
    color: #777;
}



/* Product detail: both cart states use identical button geometry.
   Only the "В корзине" state changes color. */
.ws-product-cart-button {
    height: 52px;
    min-height: 52px;
    box-sizing: border-box;
    padding: 0 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 700;
}

.ws-product-cart-button.is-in-cart {
    height: 52px;
    min-height: 52px;
    background: #00b83d;
    border-color: #00b83d;
    color: #fff;
}

.ws-product-cart-button.is-in-cart:hover {
    background: #009f35;
    border-color: #009f35;
}

@media (max-width: 600px) {
    .ws-product-cart-button,
    .ws-product-cart-button.is-in-cart {
        height: 48px;
        min-height: 48px;
    }
}

/* Keep product-page cart controls anchored in one place in both states.
   The button keeps the same height/box model; the quantity control occupies
   its own fixed column so the green button does not jump when the state changes. */
.ws-product-cart-state {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 52px;
    position: relative;
}

.ws-product-cart-state .ws-product-cart-button {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    margin: 0;
    box-sizing: border-box;
}

.ws-product-cart-state .ws-product-quantity {
    flex: 0 0 126px;
    width: 126px;
    height: 52px;
    min-height: 52px;
    margin: 0;
    box-sizing: border-box;
}

/* When the quantity control is present, preserve the same overall action-row
   geometry and prevent the favorite button from moving vertically. */
.ws-product-buy__actions {
    align-items: center;
}

@media (max-width: 600px) {
    .ws-product-cart-state {
        min-height: 48px;
    }

    .ws-product-cart-state .ws-product-cart-button,
    .ws-product-cart-state .ws-product-quantity {
        height: 48px;
        min-height: 48px;
    }

    .ws-product-cart-state .ws-product-quantity {
        flex-basis: 126px;
        width: 126px;
    }
}


/*
|--------------------------------------------------------------------------
| Related Products
|--------------------------------------------------------------------------
*/

.ws-related-products {
    margin-top: 0px;
}

.ws-related-products__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.ws-related-product {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ws-related-product:hover {
    border-color: #d2d2d2;
    box-shadow: 0 4px 14px rgba(0,0,0,.07);
}

.ws-related-product__image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 230px;
    padding: 14px;
    box-sizing: border-box;
    background: #fafafa;
    text-decoration: none;
}

.ws-related-product__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ws-related-product__no-image {
    color: #999;
    font-size: 14px;
}

.ws-related-product__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 10px 12px 12px;
}

.ws-related-product__name {
    min-height: 42px;
    color: #222;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.ws-related-product__name:hover {
    color: #8b0000;
}

.ws-related-product__price {
    margin-top: 12px;
    color: #8b0000;
    font-size: 22px;
    font-weight: 700;
}

.ws-related-product__stock {
    margin-top: 7px;
    font-size: 14px;
    font-weight: 600;
}

.ws-related-product__stock.is-available {
    color: #16803c;
}

.ws-related-product__stock.is-out {
    color: #b00020;
}

.ws-related-product__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.ws-related-product__details,
.ws-related-product__buy {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 7px;
    box-sizing: border-box;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.ws-related-product__details {
    border: 1px solid #d2d2d2;
    background: #fff;
    color: #555;
}

.ws-related-product__details:hover {
    border-color: #8b0000;
    color: #8b0000;
}

.ws-related-product__buy {
    border: 1px solid #8b0000;
    background: #8b0000;
    color: #fff;
}

.ws-related-product__buy:hover {
    background: #6f0000;
}

.ws-related-product__buy:disabled {
    border-color: #aaa;
    background: #aaa;
    color: #fff;
    cursor: not-allowed;
}

.ws-related-product__message {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin: 12px 0 0;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.35;
}

.ws-related-product__message.is-success {
    border-color: #cde8d3;
    background: #f1faf3;
    color: #16803c;
}

.ws-related-product__message.is-error {
    border-color: #f0caca;
    background: #fff5f5;
    color: #b00020;
}

.ws-related-product__message:empty {
    display: none;
}

@media (max-width: 1000px) {
    .ws-related-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ws-related-products__grid {
        grid-template-columns: 1fr;
    }

    .ws-related-product__image {
        height: 240px;
    }
}


/*
|--------------------------------------------------------------------------
| Product page — Buy + Favorites
|--------------------------------------------------------------------------
*/

.ws-product-buy {
    width: 100%;
}

.ws-product-buy__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 14px;
}

.ws-product-buy__actions .ws-buy-button {
    flex: 1 1 auto;
    min-width: 0;
}

.ws-product-favorite {
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    margin: 0;
    border: 1px solid #d6d6d6;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: normal;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        color .15s ease,
        border-color .15s ease,
        background-color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.ws-product-favorite:hover {
    color: #8b0000;
    border-color: #bdbdbd;
    background: #fafafa;
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .10);
}

.ws-product-favorite.is-favorite {
    color: #8b0000;
}

.ws-product-favorite.is-favorite:hover {
    color: #a00000;
}

.ws-product-favorite:focus-visible {
    outline: 2px solid #8b0000;
    outline-offset: 2px;
}

@media (max-width: 520px) {
    .ws-product-buy__actions {
        gap: 8px;
    }

    .ws-product-favorite {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        font-size: 25px;
    }
}


.ws-product-anchor-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 18px;
    font-size: 14px;
}

.ws-product-anchor-links a {
    color: #8b0000;
    text-decoration: underline;
}

.ws-product-anchor-links a:hover {
    text-decoration: underline;
}

.ws-product-anchor-links span {
    color: #999;
}
