/* ===== Product Grid / Slider Widget 12226 — v1.1.0 ===== */

.pgs-12226-wrap {
    width: 100%;
}

/* Grid layout */
.pgs-12226-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* Swiper wrapper */
.pgs-12226-swiper-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 40px;
}

/* When mode=grid, swiper-wrap acts as plain grid container */
.pgs-12226-swiper-wrap.pgs-12226-is-grid .pgs-12226-swiper {
    overflow: visible;
}
.pgs-12226-swiper-wrap.pgs-12226-is-grid .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    transform: none !important;
    width: 100% !important;
}
.pgs-12226-swiper-wrap.pgs-12226-is-grid .swiper-slide {
    width: auto !important;
    margin: 0 !important;
}
.pgs-12226-swiper-wrap.pgs-12226-is-grid .pgs-12226-btn-prev,
.pgs-12226-swiper-wrap.pgs-12226-is-grid .pgs-12226-btn-next,
.pgs-12226-swiper-wrap.pgs-12226-is-grid .pgs-12226-pagination {
    display: none !important;
}

.pgs-12226-swiper {
    width: 100%;
    overflow: hidden;
}

/* Card */
.pgs-12226-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.pgs-12226-card.pgs-12226-lift:hover {
    transform: translateY(-6px);
}

/* Image */
.pgs-12226-img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
}

.pgs-12226-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.pgs-12226-img-wrap.pgs-12226-zoom img:hover {
    transform: scale(1.08);
}

/* Placeholder for editor preview */
.pgs-12226-placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

/* Badge */
.pgs-12226-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    pointer-events: none;
}

/* Body */
.pgs-12226-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

/* Title */
.pgs-12226-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.pgs-12226-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pgs-12226-title a:hover {
    color: #6EC1E4;
}

/* Rating */
.pgs-12226-rating { line-height: 1; }
.pgs-12226-stars  { font-size: 14px; letter-spacing: 1px; }
.pgs-12226-star-filled { color: #f5a623; }
.pgs-12226-star-empty  { color: #ddd; }

/* Price row — price left, tax notice bottom-aligned right */
.pgs-12226-price-row {
    display: flex;
    align-items: flex-end;   /* tax notice sits at the bottom */
    gap: 6px;
    flex-wrap: wrap;
}

/* Price */
.pgs-12226-price {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    line-height: 1.2;
}

.pgs-12226-price .woocommerce-Price-amount { color: #6EC1E4; }
.pgs-12226-price del .woocommerce-Price-amount { color: #999; font-weight: 400; font-size: 0.85em; }
.pgs-12226-price ins { text-decoration: none; }

/* Tax / Shipping notice — small, bottom-aligned */
.pgs-12226-tax-notice {
    font-size: 10px;
    color: #aaaaaa;
    line-height: 1.3;
    white-space: nowrap;
    padding-bottom: 1px;  /* fine-tune baseline alignment */
}

/* Button */
.pgs-12226-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #6EC1E4;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.25s ease, color 0.25s ease;
    margin-top: auto;
    box-sizing: border-box;
}

.pgs-12226-btn:hover {
    background: #54595F;
    color: #fff;
    text-decoration: none;
}

/* Navigation Arrows */
.pgs-12226-btn-prev,
.pgs-12226-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: #6EC1E4;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    margin-top: -20px;
}

.pgs-12226-btn-prev { left: -20px; }
.pgs-12226-btn-next { right: -20px; }

.pgs-12226-btn-prev::after,
.pgs-12226-btn-next::after {
    font-family: swiper-icons;
    font-size: 14px;
    color: #fff;
    font-weight: 700;
}

.pgs-12226-btn-prev::after { content: 'prev'; }
.pgs-12226-btn-next::after { content: 'next'; }

.pgs-12226-btn-prev:hover,
.pgs-12226-btn-next:hover { background: #54595F; }

.pgs-12226-btn-prev.swiper-button-disabled,
.pgs-12226-btn-next.swiper-button-disabled { opacity: 0.4; cursor: not-allowed; }

/* Pagination */
.pgs-12226-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px 0 0;
}

.pgs-12226-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 1;
    margin: 0 4px;
    transition: background 0.2s ease;
}

.pgs-12226-pagination .swiper-pagination-bullet-active { background: #6EC1E4; }

.pgs-12226-swiper .swiper-slide { height: auto; }

/* Responsive grid fallback */
@media (max-width: 1024px) {
    .pgs-12226-swiper-wrap.pgs-12226-is-grid .swiper-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .pgs-12226-swiper-wrap.pgs-12226-is-grid .swiper-wrapper {
        grid-template-columns: repeat(1, 1fr);
    }
    .pgs-12226-btn-prev { left: 0; }
    .pgs-12226-btn-next { right: 0; }
    .pgs-12226-tax-notice { white-space: normal; }
}
