/* ============================================================
   SINGLE PRODUCT v6 — 3/5+2/5, sticky panel via JS
   ============================================================ */
.ds-sp-page { background: #f8f9fa; min-height: 60vh; padding-bottom: 48px; }
.ds-sp-wrap { max-width: 1920px; margin: 0 auto; padding: 0 20px; }

/* Breadcrumb */
.ds-sp-bc { padding: 10px 0 14px; font-size: 12px; color: #767676; }
.ds-sp-bc .woocommerce-breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ds-sp-bc a { color: #767676; text-decoration: none; }
.ds-sp-bc a:hover { color: #FF5A00; }

/* MAIN LAYOUT */
.ds-sp-layout {
    display: grid !important;
    grid-template-columns: 3fr 2fr !important;
    gap: 20px !important;
    align-items: start !important;
    position: relative !important;
}

/* LEFT */
.ds-sp-left { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* GALLERY — wyśrodkowane, duże */
.ds-sp-gallery-wrap { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 20px; }
.ds-sp-gallery-wrap .woocommerce-product-gallery { float: none !important; width: 100% !important; margin: 0 auto !important; }

.ds-sp-gallery-wrap .woocommerce-product-gallery__image {
    aspect-ratio: 1/1;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    background: #fafafa;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 560px !important; /* większe zdjęcie */
    margin: 0 auto !important; /* wyśrodkowane */
}
.ds-sp-gallery-wrap .woocommerce-product-gallery__image img,
.ds-sp-gallery-wrap .woocommerce-product-gallery__image a img {
    width: 100% !important; height: 100% !important;
    object-fit: contain !important; padding: 12px !important;
    display: block !important; max-width: 100% !important;
}
.ds-sp-gallery-wrap .flex-control-thumbs { display: flex !important; gap: 8px !important; flex-wrap: wrap !important; justify-content: center !important; margin: 12px auto 0 !important; padding: 0 !important; list-style: none !important; max-width: 560px !important; }
.ds-sp-gallery-wrap .flex-control-thumbs li { width: 72px !important; height: 72px !important; margin: 0 !important; cursor: pointer; flex-shrink: 0; }
.ds-sp-gallery-wrap .flex-control-thumbs img { width: 100% !important; height: 100% !important; object-fit: contain !important; border: 1px solid #e0e0e0 !important; border-radius: 4px !important; padding: 4px !important; }
.ds-sp-gallery-wrap .flex-control-thumbs .flex-active { border-color: #FF5A00 !important; }
.ds-sp-gallery-wrap span.onsale { position: absolute !important; top: 12px !important; left: 0 !important; background: #00813a !important; color: #fff !important; font-size: 12px !important; font-weight: 700 !important; padding: 4px 12px !important; border-radius: 0 3px 3px 0 !important; z-index: 2 !important; }

/* Sekcje w lewej kolumnie */
.ds-sp-related, .ds-sp-below-section { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 18px; }
.ds-sp-below-section { margin-top: 0; }

/* Carousel w sekcjach produktu — 5 kart */
.ds-sp-related .ds-carousel__item,
.ds-sp-below-section .ds-carousel__item { flex: 0 0 200px !important; }

/* Parameters */
.ds-sp-params { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 18px 20px; }
.ds-sp-params__title { font-size: 13px; font-weight: 700; color: #111; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 12px; }
.ds-sp-params__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-sp-params__table tr { border-bottom: 1px solid #f0f0f0; }
.ds-sp-params__table tr:last-child { border-bottom: none; }
.ds-sp-params__label { color: #767676; padding: 7px 12px 7px 0; width: 42%; vertical-align: top; }
.ds-sp-params__value { color: #111; font-weight: 500; padding: 7px 0; }

/* Short description */
.ds-sp-shortdesc { background: #fff; border: 1px solid #e5e5e5; border-left: 4px solid #FF5A00; border-radius: 0 8px 8px 0; padding: 14px 18px; font-size: 14px; line-height: 1.7; color: #333; }
.ds-sp-shortdesc p:last-child { margin-bottom: 0; }

/* Tabs */
.ds-sp-tabs-wrap { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 18px 22px; }
.ds-sp-tabs-wrap .woocommerce-tabs ul.tabs { border-bottom: 2px solid #e5e5e5; padding: 0; margin: 0 0 16px; display: flex; gap: 4px; list-style: none; }
.ds-sp-tabs-wrap .woocommerce-tabs ul.tabs li { background: none; border: none; margin: 0; padding: 0; }
.ds-sp-tabs-wrap .woocommerce-tabs ul.tabs li a { display: block; padding: 8px 14px; font-size: 14px; font-weight: 600; color: #555; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s; }
.ds-sp-tabs-wrap .woocommerce-tabs ul.tabs li.active a,
.ds-sp-tabs-wrap .woocommerce-tabs ul.tabs li a:hover { color: #FF5A00; border-bottom-color: #FF5A00; }
.ds-sp-tabs-wrap .woocommerce-tabs .panel p,
.ds-sp-tabs-wrap .woocommerce-tabs .panel li { font-size: 14px; line-height: 1.7; color: #444; }
.ds-sp-tabs-wrap .woocommerce-tabs .panel h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }

/* ACF */
.ds-sp-acf { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 22px; }
.ds-sp-acf--1 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ds-sp-acf__title { font-size: 19px; font-weight: 700; color: #111; margin: 0 0 10px; }
.ds-sp-acf__left p, .ds-sp-acf--2 p { font-size: 14px; line-height: 1.65; color: #444; }
.ds-sp-acf__left img { width: 100%; border-radius: 6px; margin-top: 10px; }
.ds-sp-iconbox { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; padding: 10px; background: #f8f9fa; border-radius: 6px; }
.ds-sp-iconbox__dot { width: 8px; height: 8px; border-radius: 50%; background: #FF5A00; flex-shrink: 0; margin-top: 5px; }
.ds-sp-iconbox strong { display: block; font-size: 13px; font-weight: 700; color: #111; margin-bottom: 2px; }
.ds-sp-iconbox p { font-size: 12px; color: #555; margin: 0; }
.ds-sp-acf__imgboxes { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 14px; }
.ds-sp-acf__imgbox { background: #f8f9fa; border-radius: 6px; overflow: hidden; text-align: center; }
.ds-sp-acf__imgbox img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ds-sp-acf__imgbox strong { display: block; font-size: 13px; padding: 8px 10px 4px; color: #111; }
.ds-sp-acf__imgbox p { font-size: 12px; color: #555; padding: 0 10px 10px; margin: 0; }

/* Related/below sections - sekcja tytulów 22px */
.ds-sp-related .ds-section__title,
.ds-sp-below-section .ds-section__title { font-size: 18px !important; }

/* Reviews */
.ds-sp-reviews { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 22px; }
.ds-sp-reviews__title { font-size: 19px; font-weight: 700; color: #111; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid #e5e5e5; }
.ds-sp-reviews .woocommerce-Reviews-title { display: none; }
.ds-sp-reviews .comment_container { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.ds-sp-reviews .comment_container:last-child { border-bottom: none; }
.ds-sp-reviews .avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.ds-sp-reviews .comment-text { flex: 1; }
.ds-sp-reviews .star-rating { color: #FF5A00; font-size: 13px; }
.ds-sp-reviews .woocommerce-review__author { font-weight: 700; font-size: 14px; }
.ds-sp-reviews .woocommerce-review__date { font-size: 12px; color: #999; margin-left: 6px; }
.ds-sp-reviews .description p { font-size: 14px; line-height: 1.65; color: #444; margin-top: 6px; }
.ds-sp-reviews #reply-title { font-size: 15px; font-weight: 700; margin: 18px 0 10px; }
.ds-sp-reviews .comment-form-comment textarea,
.ds-sp-reviews .comment-form-author input,
.ds-sp-reviews .comment-form-email input { width: 100% !important; border: 1px solid #ddd !important; border-radius: 4px !important; padding: 9px 12px !important; font-size: 14px !important; font-family: 'Inter', sans-serif !important; box-sizing: border-box !important; }
.ds-sp-reviews .form-submit input[type="submit"] { background: #FF5A00 !important; color: #fff !important; border: none !important; padding: 10px 22px !important; border-radius: 4px !important; font-weight: 700 !important; cursor: pointer !important; }

/* ════════════════════════════════════
   RIGHT 2/5 — STICKY PANEL (JS-driven)
   ════════════════════════════════════ */
.ds-sp-right { min-width: 0; }

/* Panel — sticky przez JS (nie CSS, bo Kadence blokuje) */
.ds-sp-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 22px;
    /* JS doda position: fixed lub sticky dynamicznie */
}

/* Panel w trybie sticky (klasa dodawana przez JS) */
.ds-sp-panel.is-fixed {
    position: fixed !important;
    z-index: 100 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.1) !important;
    overflow-y: auto;
}

/* Panel gdy scrollujemy poza lewą kolumnę */
.ds-sp-panel.is-bottom {
    position: absolute !important;
    bottom: 0 !important;
    top: auto !important;
}

.ds-sp-panel__cats { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.ds-sp-panel__cat { font-size: 11px; color: #FF5A00; background: #fff3ea; padding: 2px 8px; border-radius: 3px; text-decoration: none; font-weight: 500; }
.ds-sp-panel__cat:hover { background: #FF5A00; color: #fff; }
.ds-sp-panel__title { font-size: 24px !important; font-weight: 700 !important; line-height: 1.35 !important; color: #111 !important; margin: 0 0 10px !important; font-family: 'Inter', sans-serif !important; }
.ds-sp-panel__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ds-sp-stars { display: flex; gap: 1px; }
.ds-sp-panel__rating-link { font-size: 12px; color: #767676; text-decoration: none; }
.ds-sp-panel__rating-link:hover { color: #FF5A00; }
.ds-sp-panel__sku { font-size: 12px; color: #999; margin-bottom: 12px; }

/* Price */
.ds-sp-panel__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #f0f0f0; }
.ds-sp-panel__price-sale { font-size: 26px; font-weight: 800; color: #111; }
.ds-sp-panel__price-sale .woocommerce-Price-amount { font-size: 26px !important; color: #111 !important; font-weight: 800 !important; }
.ds-sp-panel__price-reg { font-size: 14px; color: #999; text-decoration: line-through; }
.ds-sp-panel__price-reg .woocommerce-Price-amount { font-size: 14px !important; color: #999 !important; }
.ds-sp-panel__price-disc { background: #cc2200; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }

/* Bulk */
.ds-bulk-pricing { margin: 0 0 12px; }
.ds-bulk-pricing__label { font-size: 11px; font-weight: 600; color: #767676; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 7px; }
.ds-bulk-pricing__tiers { display: flex !important; flex-direction: row !important; gap: 6px; flex-wrap: wrap; }
.ds-bulk-pricing__tier { display: flex; flex-direction: column; align-items: center; padding: 7px 10px; border: 2px solid #e0e0e0; border-radius: 6px; cursor: pointer; background: #fff; transition: all .15s; min-width: 82px; text-align: center; font-family: 'Inter', sans-serif; }
.ds-bulk-pricing__tier:hover, .ds-bulk-pricing__tier.is-active { border-color: #FF5A00; background: #fff3ea; }
.ds-bulk-pricing__tier-qty { font-size: 12px; font-weight: 600; color: #333; }
.ds-bulk-pricing__tier-discount { font-size: 17px; font-weight: 800; color: #00813a; line-height: 1.1; }
.ds-bulk-pricing__tier-save { font-size: 10px; color: #767676; margin-top: 2px; }

/* Stock */
.ds-sp-panel__stock { margin-bottom: 10px; }
.ds-sp-stock--in { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #00813a; }
.ds-sp-stock--out { font-size: 13px; font-weight: 600; color: #cc2200; }

/* Qty */
.ds-sp-panel__qty { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; color: #555; font-weight: 500; }
.ds-qty-wrap { display: inline-flex; align-items: stretch; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; height: 40px; }
.ds-qty-btn { width: 36px; background: #fafafa; border: none; cursor: pointer; font-size: 18px; color: #333; display: flex; align-items: center; justify-content: center; }
.ds-qty-btn:hover { background: #f0f0f0; }
.ds-qty-wrap .qty { width: 50px !important; text-align: center !important; border: none !important; border-left: 1px solid #ccc !important; border-right: 1px solid #ccc !important; font-size: 15px !important; font-family: 'Inter', sans-serif !important; -moz-appearance: textfield !important; background: #fff !important; padding: 0 !important; }
.ds-qty-wrap .qty::-webkit-outer-spin-button, .ds-qty-wrap .qty::-webkit-inner-spin-button { -webkit-appearance: none !important; }

/* CTA */
.ds-sp-panel__cta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ds-btn-sp { display: block; width: 100%; padding: 13px; border-radius: 4px; font-size: 14px; font-weight: 700; text-align: center; cursor: pointer; border: none; font-family: 'Inter', sans-serif; transition: all .15s; text-decoration: none; box-sizing: border-box; }
.ds-btn-sp--buy { background: #FF5A00; color: #fff !important; }
.ds-btn-sp--buy:hover { background: #e04e00 !important; color: #fff !important; }
.ds-btn-sp--cart { background: #fff; color: #FF5A00 !important; border: 1.5px solid #FF5A00 !important; }
.ds-btn-sp--cart:hover { background: #FF5A00 !important; color: #fff !important; }

/* Wishlist */
.ds-sp-panel__wl { margin-bottom: 10px; }

/* Delivery */
.ds-sp-panel__delivery { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.ds-sp-del { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: #444; }
.ds-sp-del svg { flex-shrink: 0; margin-top: 1px; }
.ds-sp-del strong { color: #111; font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 1100px) { .ds-sp-layout { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 767px) {
    .ds-sp-wrap { padding: 0 12px; }
    .ds-sp-layout { grid-template-columns: 1fr !important; }
    .ds-sp-right { order: -1; }
    .ds-sp-panel, .ds-sp-panel.is-fixed, .ds-sp-panel.is-bottom { position: static !important; }
    .ds-sp-panel__title { font-size: 15px !important; }
    .ds-sp-acf--1 { grid-template-columns: 1fr; }
    .ds-sp-acf__imgboxes { grid-template-columns: 1fr; }
}

/* ── UKRYJ zakładkę "Opis" (nav), zostaw samą treść ── */
.ds-sp-tabs-wrap .woocommerce-tabs ul.tabs { display: none !important; }
.ds-sp-tabs-wrap .woocommerce-tabs .wc-tab,
.ds-sp-tabs-wrap .woocommerce-tabs .panel {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================================
   MOBILE PRODUCT PAGE — poprawna kolejność + karuzele
   ============================================================ */
@media (max-width: 767px) {
    /* Kolejność na mobile: 1. panel (tytuł+cena), 2. galeria, 3. reszta */
    .ds-sp-layout {
        display: flex !important;
        flex-direction: column !important;
    }
    .ds-sp-right  { order: 1 !important; }  /* Tytuł + cena PIERWSZA */
    .ds-sp-left   { order: 2 !important; }  /* Galeria + treść DRUGA */

    /* Na mobile panel jest statyczny, bez sticky */
    .ds-sp-panel, .ds-sp-panel.is-fixed, .ds-sp-panel.is-bottom {
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
        width: auto !important;
        left: auto !important;
        top: auto !important;
    }

    /* Karuzele na mobile - poziome scrollowanie */
    .ds-sp-related .ds-carousel,
    .ds-sp-below-section .ds-carousel { padding: 0 6px !important; }

    .ds-sp-related .ds-carousel__item,
    .ds-sp-below-section .ds-carousel__item {
        flex: 0 0 160px !important;
    }

    /* Pokaż strzałki na mobile */
    .ds-sp-related .ds-carousel__btn,
    .ds-sp-below-section .ds-carousel__btn { display: flex !important; }
}
