/* =====================================================
   ДЕСКТОП — чистые карточки товаров ArtsShop
   Этот файл отвечает только за:
   1) карточки товаров в категориях;
   2) single product;
   3) бейджи скидки/наличия;
   4) QR-блок;
   5) кнопки просмотрщика фотографий.
===================================================== */

@media screen and (min-width: 769px) {

    /* =====================================================
       КАТЕГОРИИ — сетка товаров
       Делаем карточки аккуратными и одинаковыми
    ===================================================== */

    body.tax-product_cat ul.products{
        display:grid !important;
        grid-template-columns:repeat(4,minmax(0,1fr)) !important;
        gap:28px !important;
        align-items:stretch !important;
        width:100% !important;
        margin:26px 0 0 !important;
        padding:0 !important;
    }

    body.tax-product_cat ul.products::before,
    body.tax-product_cat ul.products::after{
        display:none !important;
        content:none !important;
    }

    body.tax-product_cat ul.products li.product{
        position:relative !important;
        float:none !important;
        width:auto !important;
        max-width:none !important;
        margin:0 !important;
        padding:0 0 18px !important;
        border-radius:28px !important;
        background:linear-gradient(180deg,#fffaf3,#ffffff) !important;
        border:1px solid rgba(212,137,49,.24) !important;
        box-shadow:0 14px 34px rgba(0,0,0,.10) !important;
        overflow:hidden !important;
        text-align:center !important;
        transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
    }

    body.tax-product_cat ul.products li.product:hover{
        transform:translateY(-6px) !important;
        border-color:rgba(212,137,49,.44) !important;
        box-shadow:0 22px 46px rgba(0,0,0,.15) !important;
    }

    body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link{
        position:relative !important;
        display:flex !important;
        flex-direction:column !important;
        min-height:100% !important;
        padding:16px 16px 0 !important;
        text-decoration:none !important;
        color:inherit !important;
        overflow:visible !important;
    }

    /* Картинка товара в категории */
    body.tax-product_cat ul.products li.product img{
        display:block !important;
        width:100% !important;
        height:255px !important;
        object-fit:contain !important;
        object-position:center center !important;
        margin:0 !important;
        padding:8px !important;
        border-radius:22px !important;
        background:#fff !important;
        box-shadow:inset 0 0 0 1px rgba(23,77,81,.06) !important;
    }

    /* Название товара */
    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title{
        min-height:48px !important;
        margin:14px 0 8px !important;
        padding:0 !important;
        color:#081f22 !important;
        font-size:17px !important;
        line-height:1.14 !important;
        font-weight:950 !important;
        text-transform:uppercase !important;
        letter-spacing:.02em !important;
    }

    /* =====================================================
       КАТЕГОРИИ — бейджи скидки и наличия
       Скидка слева, наличие справа
    ===================================================== */

    .artshop-clean-loop-badges{
        position:absolute !important;
        top:26px !important;
        left:26px !important;
        right:26px !important;
        z-index:25 !important;
        display:flex !important;
        align-items:flex-start !important;
        justify-content:space-between !important;
        gap:10px !important;
        pointer-events:none !important;
    }

    .artshop-clean-badge,
    .artshop-clean-badge-spacer{
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        min-height:34px !important;
        border-radius:999px !important;
    }

    .artshop-clean-badge{
        padding:8px 12px !important;
        color:#fff !important;
        font-family:"Arial Black","Trebuchet MS","Segoe UI",Arial,sans-serif !important;
        font-size:13px !important;
        font-weight:950 !important;
        line-height:1 !important;
        letter-spacing:.01em !important;
        border:2px solid rgba(255,255,255,.92) !important;
        box-shadow:0 9px 20px rgba(0,0,0,.18) !important;
        text-shadow:0 1px 0 rgba(0,0,0,.28) !important;
    }

    .artshop-clean-badge--sale{
        min-width:66px !important;
        background:linear-gradient(135deg,#ff2a2a,#b60000) !important;
    }

    .artshop-clean-badge--stock.is-in-stock{
        min-width:104px !important;
        background:linear-gradient(135deg,#18b957,#0a8137) !important;
    }

    .artshop-clean-badge--stock.is-out-stock{
        min-width:120px !important;
        background:linear-gradient(135deg,#c71919,#850000) !important;
    }

    .artshop-clean-badge-spacer{
        min-width:1px !important;
        width:1px !important;
    }

    /* Убираем любые старые стандартные WooCommerce sale-плашки в каталоге */
    body.tax-product_cat ul.products li.product > .onsale,
    body.tax-product_cat ul.products li.product a > .onsale{
        display:none !important;
    }

    /* =====================================================
       КАТЕГОРИИ — Автор / Артикул / Цена
    ===================================================== */

    .artshop-clean-loop-info{
        display:flex !important;
        flex-direction:column !important;
        align-items:center !important;
        justify-content:center !important;
        gap:8px !important;
        width:100% !important;
        margin:8px auto 0 !important;
        padding:0 16px !important;
        box-sizing:border-box !important;
        text-align:center !important;
    }

    .artshop-clean-loop-line{
        display:flex !important;
        align-items:baseline !important;
        justify-content:center !important;
        gap:6px !important;
        width:100% !important;
        font-size:14px !important;
        line-height:1.15 !important;
    }

    .artshop-clean-loop-label{
        color:#174d51 !important;
        font-weight:950 !important;
    }

    .artshop-clean-loop-value{
        color:#141414 !important;
        font-weight:850 !important;
    }

    .artshop-clean-loop-price{
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        gap:8px !important;
        min-height:38px !important;
        margin-top:4px !important;
        padding:7px 14px !important;
        border-radius:999px !important;
        background:linear-gradient(135deg,#10393d,#0f5b63) !important;
        color:#fff !important;
        border:1px solid rgba(212,137,49,.45) !important;
        box-shadow:0 10px 22px rgba(16,57,61,.20) !important;
    }

    .artshop-clean-loop-price-label{
        color:#ffe1a4 !important;
        font-size:13px !important;
        font-weight:950 !important;
    }

    .artshop-clean-loop-price-value,
    .artshop-clean-loop-price-value .amount{
        color:#fff !important;
        -webkit-text-fill-color:#fff !important;
        font-size:17px !important;
        font-weight:950 !important;
        line-height:1 !important;
    }

    .artshop-clean-loop-price-value del{
        color:rgba(255,255,255,.62) !important;
        -webkit-text-fill-color:rgba(255,255,255,.62) !important;
        font-size:14px !important;
        font-weight:800 !important;
        opacity:1 !important;
        text-decoration-thickness:2px !important;
    }

    .artshop-clean-loop-price-value ins{
        color:#fff !important;
        -webkit-text-fill-color:#fff !important;
        text-decoration:none !important;
    }

    /* Стандартную цену WooCommerce скрываем, потому что цена теперь в нашей плашке */
    body.tax-product_cat ul.products li.product > .price,
    body.tax-product_cat ul.products li.product .price:not(.artshop-clean-loop-price-value){
        display:none !important;
    }
}

/* =====================================================
   ДЕСКТОП — single product: общая карточка
===================================================== */

@media screen and (min-width: 769px) {

    body.single-product div.product{
        position:relative !important;
        display:grid !important;
        grid-template-columns:minmax(560px,1.15fr) minmax(430px,.85fr) !important;
        gap:36px !important;
        align-items:start !important;
        width:100% !important;
        max-width:none !important;
        margin:28px auto 34px !important;
        padding:34px !important;
        border-radius:34px !important;
        background:
            radial-gradient(circle at 10% 0%, rgba(212,137,49,.10), transparent 34%),
            linear-gradient(180deg,#fffaf3,#ffffff) !important;
        border:1px solid rgba(212,137,49,.28) !important;
        box-shadow:0 18px 46px rgba(0,0,0,.12) !important;
        overflow:visible !important;
        box-sizing:border-box !important;
    }

    /* Левая колонка с фото */
    body.single-product div.product .woocommerce-product-gallery{
        position:relative !important;
        grid-column:1 !important;
        width:100% !important;
        max-width:none !important;
        float:none !important;
        margin:0 !important;
        padding:0 !important;
        overflow:visible !important;
    }

    body.single-product div.product .woocommerce-product-gallery__wrapper,
    body.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__image{
        border-radius:28px !important;
        overflow:hidden !important;
        background:#fff !important;
    }

    body.single-product div.product .woocommerce-product-gallery img{
        width:100% !important;
        height:auto !important;
        max-height:620px !important;
        object-fit:contain !important;
        object-position:center center !important;
        border-radius:26px !important;
        background:#fff !important;
    }

    body.single-product div.product .flex-control-thumbs{
        display:flex !important;
        gap:14px !important;
        margin:18px 0 0 !important;
        padding:0 !important;
    }

    body.single-product div.product .flex-control-thumbs li{
        width:92px !important;
        margin:0 !important;
        float:none !important;
        border-radius:18px !important;
        overflow:hidden !important;
        border:1px solid rgba(212,137,49,.26) !important;
        background:#fff !important;
        box-shadow:0 8px 18px rgba(0,0,0,.08) !important;
    }

    body.single-product div.product .flex-control-thumbs img{
        height:92px !important;
        object-fit:cover !important;
        border-radius:18px !important;
    }

    /* Правая колонка покупки */
    body.single-product div.product .summary{
        grid-column:2 !important;
        width:100% !important;
        max-width:none !important;
        float:none !important;
        margin:0 !important;
        padding:32px !important;
        border-radius:32px !important;
        background:
            radial-gradient(circle at 100% 0%, rgba(23,77,81,.10), transparent 32%),
            linear-gradient(180deg,#ffffff,#fbf7ef) !important;
        border:1px solid rgba(212,137,49,.28) !important;
        box-shadow:0 14px 34px rgba(0,0,0,.10) !important;
        box-sizing:border-box !important;
    }

    body.single-product div.product .product_title{
        margin:0 0 18px !important;
        color:#10393d !important;
        font-size:34px !important;
        line-height:1.12 !important;
        font-weight:950 !important;
        letter-spacing:-.025em !important;
    }

    body.single-product div.product p.price,
    body.single-product div.product span.price{
        display:flex !important;
        align-items:baseline !important;
        gap:16px !important;
        margin:0 0 20px !important;
        color:#10393d !important;
        font-size:34px !important;
        line-height:1 !important;
        font-weight:950 !important;
    }

    body.single-product div.product p.price del,
    body.single-product div.product span.price del{
        color:#7d8984 !important;
        font-size:25px !important;
        font-weight:800 !important;
        opacity:1 !important;
        text-decoration-thickness:2px !important;
    }

    body.single-product div.product p.price ins,
    body.single-product div.product span.price ins{
        color:#10393d !important;
        text-decoration:none !important;
        font-weight:950 !important;
    }

    body.single-product div.product .stock{
        display:inline-flex !important;
        align-items:center !important;
        gap:8px !important;
        margin:0 0 20px !important;
        padding:9px 14px !important;
        border-radius:999px !important;
        background:#e7faee !important;
        color:#0a8137 !important;
        font-size:15px !important;
        font-weight:950 !important;
        line-height:1 !important;
    }

    body.single-product div.product .stock.out-of-stock{
        background:#fff0f0 !important;
        color:#b00000 !important;
    }

    body.single-product div.product form.cart{
        display:flex !important;
        align-items:center !important;
        gap:14px !important;
        margin:20px 0 18px !important;
        padding:0 !important;
    }

    body.single-product div.product form.cart .quantity input.qty{
        width:96px !important;
        height:58px !important;
        border:1px solid rgba(23,77,81,.16) !important;
        border-radius:18px !important;
        background:#fff !important;
        color:#10393d !important;
        font-size:20px !important;
        font-weight:850 !important;
        text-align:center !important;
        box-shadow:inset 0 1px 0 rgba(255,255,255,.8) !important;
    }

    body.single-product div.product form.cart .single_add_to_cart_button{
        height:58px !important;
        min-width:210px !important;
        padding:0 30px !important;
        border-radius:999px !important;
        background:linear-gradient(135deg,#10393d,#0f5b63) !important;
        color:#fff !important;
        font-size:18px !important;
        font-weight:950 !important;
        box-shadow:0 12px 24px rgba(16,57,61,.24) !important;
    }

    body.single-product div.product .product_meta{
        display:none !important;
    }
}

/* =====================================================
   ДЕСКТОП — single product: бирки поверх картинки
===================================================== */

@media screen and (min-width: 769px) {

    .artshop-clean-single-badges{
        position:absolute !important;
        left:52px !important;
        top:52px !important;
        width:calc((100% - 68px) * .565) !important;
        z-index:55 !important;
        display:flex !important;
        align-items:flex-start !important;
        justify-content:space-between !important;
        gap:14px !important;
        pointer-events:none !important;
    }

    .artshop-clean-single-badge,
    .artshop-clean-single-badge-spacer{
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        min-height:46px !important;
        border-radius:999px !important;
    }

    .artshop-clean-single-badge{
        padding:11px 18px !important;
        color:#fff !important;
        font-family:"Arial Black","Trebuchet MS","Segoe UI",Arial,sans-serif !important;
        font-size:17px !important;
        font-weight:950 !important;
        line-height:1 !important;
        letter-spacing:.01em !important;
        border:2px solid rgba(255,255,255,.92) !important;
        box-shadow:0 11px 24px rgba(0,0,0,.20) !important;
        text-shadow:0 1px 0 rgba(0,0,0,.28) !important;
    }

    .artshop-clean-single-badge--sale{
        min-width:92px !important;
        background:linear-gradient(135deg,#ff2a2a,#b60000) !important;
    }

    .artshop-clean-single-badge--stock.is-in-stock{
        min-width:138px !important;
        background:linear-gradient(135deg,#18b957,#0a8137) !important;
    }

    .artshop-clean-single-badge--stock.is-out-stock{
        min-width:160px !important;
        background:linear-gradient(135deg,#c71919,#850000) !important;
    }

    .artshop-clean-single-badge-spacer{
        width:1px !important;
    }

    body.single-product div.product > span.onsale,
    body.single-product div.product .woocommerce-product-gallery span.onsale{
        display:none !important;
    }
}

/* =====================================================
   ДЕСКТОП — single product: информационная панель
===================================================== */

@media screen and (min-width: 769px) {

    .artshop-clean-single-panel{
        margin:22px 0 0 !important;
        padding:18px !important;
        border-radius:24px !important;
        background:linear-gradient(180deg,#f7efe4,#ffffff) !important;
        border:1px solid rgba(212,137,49,.24) !important;
        box-shadow:0 10px 24px rgba(0,0,0,.07) !important;
    }

    .artshop-clean-single-panel__title{
        margin:0 0 14px !important;
        color:#10393d !important;
        font-size:18px !important;
        font-weight:950 !important;
        line-height:1.15 !important;
    }

    .artshop-clean-single-panel__grid{
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
        gap:10px !important;
    }

    .artshop-clean-single-panel__item{
        padding:12px 13px !important;
        border-radius:18px !important;
        background:#fff !important;
        border:1px solid rgba(23,77,81,.10) !important;
    }

    .artshop-clean-single-panel__item--wide{
        grid-column:1 / -1 !important;
    }

    .artshop-clean-single-panel__item span{
        display:block !important;
        margin-bottom:5px !important;
        color:#d48931 !important;
        font-size:12px !important;
        font-weight:950 !important;
        line-height:1 !important;
        text-transform:uppercase !important;
        letter-spacing:.045em !important;
    }

    .artshop-clean-single-panel__item strong{
        display:block !important;
        color:#10393d !important;
        font-size:15px !important;
        font-weight:850 !important;
        line-height:1.25 !important;
    }

    .artshop-clean-single-panel__stock{
        color:#0a8137 !important;
        font-weight:950 !important;
    }

    .artshop-clean-single-panel__item a{
        color:#10393d !important;
        font-weight:950 !important;
        text-decoration:underline !important;
        text-underline-offset:3px !important;
    }
}

/* =====================================================
   ДЕСКТОП — QR-блок старого модуля
===================================================== */

@media screen and (min-width: 769px) {

    body.single-product .product-qr-box,
    body.single-product .art-product-qr{
        margin:22px 0 0 !important;
        padding:16px !important;
        width:100% !important;
        max-width:250px !important;
        border-radius:24px !important;
        background:linear-gradient(180deg,#fffaf3,#ffffff) !important;
        border:1px solid rgba(212,137,49,.32) !important;
        box-shadow:0 12px 26px rgba(0,0,0,.10) !important;
        text-align:center !important;
        box-sizing:border-box !important;
    }

    body.single-product .product-qr-title,
    body.single-product .art-product-qr__title{
        margin:0 0 10px !important;
        color:#10393d !important;
        font-size:16px !important;
        font-weight:950 !important;
        line-height:1.15 !important;
        text-align:center !important;
    }

    body.single-product .product-qr-box img,
    body.single-product .art-product-qr img{
        display:block !important;
        width:150px !important;
        height:150px !important;
        margin:0 auto !important;
        padding:8px !important;
        border-radius:18px !important;
        background:#ffffff !important;
        border:1px solid rgba(23,77,81,.14) !important;
        box-shadow:0 8px 18px rgba(0,0,0,.08) !important;
        object-fit:contain !important;
    }
}

/* =====================================================
   ДЕСКТОП — восстановление кнопок просмотрщика фото
   Этот блок чинит крестик, fullscreen и zoom в WooCommerce PhotoSwipe
===================================================== */

@media screen and (min-width: 769px) {

    .pswp{
        z-index:999999 !important;
    }

    .pswp__top-bar{
        display:block !important;
        opacity:1 !important;
        visibility:visible !important;
        z-index:999999 !important;
    }

    .pswp__button,
    .pswp__button--close,
    .pswp__button--fs,
    .pswp__button--zoom,
    .pswp__button--arrow--left,
    .pswp__button--arrow--right{
        display:block !important;
        opacity:1 !important;
        visibility:visible !important;
        pointer-events:auto !important;
        z-index:1000000 !important;
        filter:drop-shadow(0 2px 4px rgba(0,0,0,.65)) !important;
    }

    .pswp__button--close{
        position:absolute !important;
        right:10px !important;
        top:10px !important;
    }

    .pswp__button--fs{
        position:absolute !important;
        right:58px !important;
        top:10px !important;
    }

    .pswp__button--zoom{
        position:absolute !important;
        right:106px !important;
        top:10px !important;
    }
}

/* =====================================================
   ДЕСКТОП — PhotoSwipe: видимые кнопки управления в превьюере
===================================================== */

@media screen and (min-width: 769px) {

    body .pswp{
        z-index:999999 !important;
    }

    body .pswp__bg{
        background:#000000 !important;
        opacity:1 !important;
    }

    body .pswp__top-bar{
        height:64px !important;
        background:linear-gradient(180deg,rgba(0,0,0,.78),rgba(0,0,0,0)) !important;
        opacity:1 !important;
        z-index:999999 !important;
    }

    body .pswp__counter{
        color:#ffffff !important;
        font-size:16px !important;
        font-weight:800 !important;
        line-height:64px !important;
        padding-left:18px !important;
        opacity:1 !important;
        text-shadow:0 2px 5px rgba(0,0,0,.75) !important;
    }

    body .pswp__button{
        display:block !important;
        opacity:1 !important;
        visibility:visible !important;
        pointer-events:auto !important;

        width:46px !important;
        height:46px !important;
        min-width:46px !important;
        min-height:46px !important;

        margin:9px 8px 0 0 !important;
        padding:0 !important;

        border:2px solid rgba(255,255,255,.82) !important;
        border-radius:10px !important;

        background:#0b0b0b !important;
        background-image:none !important;

        color:#ffffff !important;
        text-indent:0 !important;
        overflow:hidden !important;

        box-shadow:0 6px 18px rgba(0,0,0,.55) !important;
        transform:none !important;
    }

    body .pswp__button:hover{
        background:#0b3f43 !important;
        border-color:#ffd47a !important;
        color:#ffd47a !important;
        opacity:1 !important;
    }

    body .pswp__button:before{
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;

        width:100% !important;
        height:100% !important;

        color:inherit !important;
        font-family:Arial, Helvetica, sans-serif !important;
        font-size:30px !important;
        line-height:1 !important;
        font-weight:900 !important;

        text-indent:0 !important;
        text-shadow:0 2px 5px rgba(0,0,0,.8) !important;
    }

    /* Крестик закрытия */
    body .pswp__button--close:before{
        content:"×" !important;
        font-size:38px !important;
        transform:translateY(-1px) !important;
    }

    /* Zoom */
    body .pswp__button--zoom:before{
        content:"+" !important;
        font-size:34px !important;
    }

    body .pswp--zoomed-in .pswp__button--zoom:before{
        content:"−" !important;
        font-size:38px !important;
        transform:translateY(-2px) !important;
    }

    /* Fullscreen */
    body .pswp__button--fs:before{
        content:"⛶" !important;
        font-size:25px !important;
    }

    /* Share лучше скрыть, он тут не нужен и часто выглядит пустым квадратом */
    body .pswp__button--share{
        display:none !important;
    }

    /* Стрелки влево/вправо */
    body .pswp__button--arrow--left,
    body .pswp__button--arrow--right{
        width:58px !important;
        height:58px !important;
        min-width:58px !important;
        min-height:58px !important;

        margin-top:-29px !important;

        border:2px solid rgba(255,255,255,.82) !important;
        border-radius:999px !important;

        background:#0b0b0b !important;
        background-image:none !important;

        opacity:1 !important;
        visibility:visible !important;
        color:#ffffff !important;

        box-shadow:0 8px 22px rgba(0,0,0,.62) !important;
    }

    body .pswp__button--arrow--left{
        left:24px !important;
    }

    body .pswp__button--arrow--right{
        right:24px !important;
    }

    body .pswp__button--arrow--left:before,
    body .pswp__button--arrow--right:before{
        position:static !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;

        width:100% !important;
        height:100% !important;

        margin:0 !important;
        padding:0 !important;

        background:none !important;
        color:inherit !important;

        font-family:Arial, Helvetica, sans-serif !important;
        font-size:40px !important;
        line-height:1 !important;
        font-weight:900 !important;

        text-shadow:0 2px 5px rgba(0,0,0,.8) !important;
    }

    body .pswp__button--arrow--left:before{
        content:"‹" !important;
        transform:translateX(-2px) translateY(-2px) !important;
    }

    body .pswp__button--arrow--right:before{
        content:"›" !important;
        transform:translateX(2px) translateY(-2px) !important;
    }

    body .pswp__button--arrow--left:hover,
    body .pswp__button--arrow--right:hover{
        background:#0b3f43 !important;
        border-color:#ffd47a !important;
        color:#ffd47a !important;
    }

    /* Убираем битые дефолтные спрайты Woo/PhotoSwipe */
    body .pswp__button,
    body .pswp__button--arrow--left:before,
    body .pswp__button--arrow--right:before{
        background-image:none !important;
    }

    body .pswp__caption{
        display:block !important;
        min-height:0 !important;
        background:linear-gradient(0deg,rgba(0,0,0,.68),rgba(0,0,0,0)) !important;
    }

    body .pswp__caption__center{
        color:#ffffff !important;
        font-size:15px !important;
        font-weight:700 !important;
        text-align:center !important;
        text-shadow:0 2px 5px rgba(0,0,0,.9) !important;
    }
}

