/* ============================================================
   shop.css — Yaroo4x4 | Siatka produktów + filtry kategorii
   Wgraj do: wp-content/themes/yaroo4x4/assets/css/shop.css
   ============================================================ */

/* ── Toolbar (filtry + sortowanie) ──────────────────────────────────────── */
#shop-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Pigułki kategorii */
.shop-cat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cat-pill {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #bdbdc7;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.22s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.cat-pill:hover {
    color: #ffffff;
    background: rgba(255, 122, 0, 0.1);
    border-color: rgba(255, 122, 0, 0.35);
}

.cat-pill.active {
    color: #ffffff;
    background: rgba(255, 122, 0, 0.15);
    border-color: rgba(255, 122, 0, 0.5);
    box-shadow: 0 0 12px rgba(255, 122, 0, 0.15);
}

/* Pasek sortowania */
.shop-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    gap: 1rem;
    flex-wrap: wrap;
}

.shop-sort-bar .woocommerce-result-count {
    margin: 0;
    font-size: 0.875rem;
    color: #9a9a9a;
    font-weight: 500;
}

.shop-sort-bar .woocommerce-ordering {
    margin: 0;
}

.shop-sort-bar .woocommerce-ordering select {
    background: #17171c;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.55rem 2.2rem 0.55rem 0.9rem;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='2.2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    transition: border-color 0.2s ease;
}

.shop-sort-bar .woocommerce-ordering select:focus {
    border-color: rgba(255, 122, 0, 0.5);
}

/* ── Siatka produktów ────────────────────────────────────────────────────── */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Karta produktu ──────────────────────────────────────────────────────── */
ul.products li.product {
    background: linear-gradient(160deg, #1d1d24, #17171c) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 18px !important;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

ul.products li.product:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 122, 0, 0.25) !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

/* ── Wrapper zdjęcia ─────────────────────────────────────────────────────── */
ul.products li.product a.woocommerce-loop-product__link,
ul.products li.product > a:first-of-type {
    display: block;
    padding: 1rem 1rem 0;
    text-decoration: none;
}

/* ── Zdjęcie z pomarańczową poświatą ─────────────────────────────────────── */
ul.products li.product a img,
ul.products li.product .wp-post-image {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px !important;
    display: block;

    /* Pomarańczowa poświata */
    border: 1px solid rgba(255, 122, 0, 0.2) !important;
    box-shadow:
        0 0 0 1px rgba(255, 122, 0, 0.08),
        0 0 22px rgba(255, 122, 0, 0.28),
        0 0 50px rgba(255, 122, 0, 0.12),
        0 12px 28px rgba(0, 0, 0, 0.4) !important;

    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

ul.products li.product:hover a img,
ul.products li.product:hover .wp-post-image {
    transform: scale(1.04);
    box-shadow:
        0 0 0 1px rgba(255, 122, 0, 0.3),
        0 0 30px rgba(255, 122, 0, 0.42),
        0 0 65px rgba(255, 122, 0, 0.18),
        0 16px 36px rgba(0, 0, 0, 0.45) !important;
}

/* ── Badge "Wyprzedaż" ───────────────────────────────────────────────────── */
ul.products li.product .onsale {
    position: absolute !important;
    top: 1.1rem !important;
    left: 1.1rem !important;
    right: auto !important;
    min-height: auto !important;
    min-width: auto !important;
    padding: 0.3rem 0.75rem !important;
    border-radius: 999px !important;
    background: #ff7a00 !important;
    color: #ffffff !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    line-height: 1.4 !important;
    z-index: 2;
}

/* ── Informacje o produkcie ──────────────────────────────────────────────── */
ul.products li.product .woocommerce-loop-product__title {
    color: #ffffff !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    padding: 1rem 1rem 0.3rem !important;
    margin: 0 !important;
    letter-spacing: -0.01em;
}

/* Kategoria nad tytułem (jeśli dostępna) */
ul.products li.product .woocommerce-loop-category__title {
    color: #ff9a3d !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem 0 !important;
    margin: 0 !important;
}

/* Cena */
ul.products li.product .price {
    color: #ffffff !important;
    font-size: 1.08rem !important;
    font-weight: 800 !important;
    padding: 0.35rem 1rem 0.85rem !important;
    margin: 0 !important;
    display: block;
    letter-spacing: -0.02em;
}

ul.products li.product .price ins {
    text-decoration: none !important;
    color: #ff9a3d !important;
}

ul.products li.product .price del {
    color: #666 !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    margin-right: 0.4rem;
}

/* ── Przycisk "Dodaj do koszyka" ─────────────────────────────────────────── */
ul.products li.product .button,
ul.products li.product .add_to_cart_button,
ul.products li.product .product_type_simple,
ul.products li.product .product_type_variable {
    display: block !important;
    width: calc(100% - 2rem) !important;
    margin: auto 1rem 1rem !important;
    padding: 0.82rem 1rem !important;
    background: linear-gradient(135deg, #ff7a00, #ff9a3d) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
    line-height: 1.4 !important;
}

ul.products li.product .button:hover,
ul.products li.product .add_to_cart_button:hover {
    background: linear-gradient(135deg, #e56e00, #ff8c28) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 20px rgba(255, 122, 0, 0.3) !important;
    color: #ffffff !important;
}

ul.products li.product .button.added,
ul.products li.product .added_to_cart {
    background: rgba(255, 122, 0, 0.12) !important;
    color: #ff9a3d !important;
    border: 1px solid rgba(255, 122, 0, 0.3) !important;
}

/* ── Paginacja ───────────────────────────────────────────────────────────── */
.woocommerce-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.woocommerce-pagination ul {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.6rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #bdbdc7;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.woocommerce-pagination ul li a:hover {
    background: rgba(255, 122, 0, 0.1);
    border-color: rgba(255, 122, 0, 0.3);
    color: #ffffff;
}

.woocommerce-pagination ul li span.current {
    background: linear-gradient(135deg, #ff7a00, #ff9a3d);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.3);
}

/* ── Brak produktów ──────────────────────────────────────────────────────── */
.woocommerce-info {
    background: rgba(255, 255, 255, 0.03) !important;
    border-top: 3px solid #ff7a00 !important;
    border-radius: 12px !important;
    color: #bdbdc7 !important;
    padding: 1.5rem !important;
}

/* ── Responsywność ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 560px) {
    ul.products {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .shop-sort-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .shop-cat-filter {
        gap: 0.4rem;
    }
    .cat-pill {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
}
