/* =============================================================================
   Product Grid – BEM Stylesheet
   File: /wp-content/themes/flatsome-child/assets/css/shortcodes.css
   ============================================================================= */

/* Product Grid – wrapper for AJAX */
.product-grid-wrapper {
    position: relative;
}

.product-grid-wrapper--loading {
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.2s;
}

/* Product Grid – direct values */
.product-grid {
    display              : grid;
    grid-template-columns: repeat(4, 1fr);
    gap                  : 24px;
    padding              : 0;
    margin               : 0;
    list-style           : none;
}

.product-grid__empty {
    grid-column: 1 / -1;
    text-align : center;
    color      : #374151;
    padding    : 40px 0;
}

.product-grid__item {
    display: flex;
}

.product-card {
    position      : relative;
    display       : flex;
    flex-direction: column;
    width         : 100%;
    background    : #ffffff;
    border        : 1px solid #e5e7eb;
    border-radius : 16px;
    box-shadow    : 0 2px 12px rgba(0, 0, 0, .08);
    overflow      : hidden;
    transition    : box-shadow .25s ease, transform .25s ease;
}

.product-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
    transform : translateY(-4px);
}

.product-card__badge {
    position     : absolute;
    top          : 12px;
    left         : 12px;
    z-index      : 2;
    background   : #aa7e3d;
    color        : #fff;
    font-size    : .75rem;
    font-weight  : 700;
    padding      : 3px 8px;
    border-radius: 20px;
    line-height  : 1.4;
}

.product-card__header {
    position        : relative;
    width           : 100%;
    aspect-ratio    : 4 / 3;
    overflow        : hidden;
    background-color: #f9f5ec;
}

.product-card__header a {
    display: block;
    height : 100%;
}

.product-card__image {
    width     : 100%;
    height    : 100%;
    object-fit: cover;
    display   : block;
    transition: transform .35s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.04);
}

.product-card__image--placeholder {
    background: #f3f4f6;
}

.product-card__body {
    display       : flex;
    flex-direction: column;
    flex          : 1;
    padding       : 16px;
    gap           : 10px;
}

.product-card__title {
    margin     : 0;
    font-size  : 1rem;
    font-weight: 700;
    color      : #aa7e3d;
    line-height: 1.4;
    text-align: left;
}

.product-card__title a {
    color          : inherit;
    text-decoration: none;
    transition     : color .2s;
}

.product-card__title a:hover {
    color: #aa7e3d;
}

.product-card__price {
    display    : flex;
    align-items: baseline;
    flex-wrap  : wrap;
    gap        : 6px;
}

.product-card__price-old {
    font-size      : .875rem;
    color          : #9ca3af;
    text-decoration: line-through;
}

.product-card__price-old .woocommerce-Price-amount,
.product-card__price-old .woocommerce-Price-currencySymbol {
    color          : #9ca3af;
    text-decoration: line-through;
}

.product-card__price-current {
    font-size  : 1rem;
    font-weight: 700;
    color      : #111827;
}

.product-card__price-current .woocommerce-Price-amount,
.product-card__price-current .woocommerce-Price-currencySymbol {
    color: #aa7e3d;
}

.product-card__meta {
    margin    : 0;
    padding   : 0;
    list-style: none;
    display   : flex;
    flex-direction: column;
    gap       : 4px;
}

.product-card-bottom-wrapper {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

#wrapper .product-card__meta-item {
    font-size  : .8125rem;
    color      : #374151;
    line-height: 1.5;
    display    : flex;
    flex-wrap  : wrap;
    gap        : 4px;
    margin-left: 0;
}

.product-card__meta-item strong {
    font-weight: 600;
    flex-shrink: 0;
}

.product-card__ingredient,
.product-card__weight,
.product-card__expiry {
    color: #374151;
}

.product-card__rating {
    display    : flex;
    align-items: center;
    gap        : 4px;
}

.product-card__stars {
    display: flex;
    gap    : 1px;
}

.product-card__star {
    font-size: 1rem;
    color    : #d1d5db;
}

.product-card__star--full,
.product-card__star--half {
    color: #f59e0b;
}

.product-card__rating-count {
    font-size: .75rem;
    color    : #9ca3af;
}

.product-card__button {
    display        : inline-flex;
    align-items    : center;
    justify-content: center;
    margin-top     : auto;
    padding        : 11px 20px;
    background     : #aa7e3d;
    color          : #fff;
    font-size      : .875rem;
    font-weight    : 600;
    text-decoration: none;
    border-radius  : 50px;
    border         : none;
    cursor         : pointer;
    transition     : background .2s ease, transform .15s ease;
    white-space    : nowrap;
}

.product-card__button:hover,
.product-card__button:focus-visible {
    background: #aa7e3d;
    color     : #fff;
    transform : translateY(-1px);
    outline   : none;
}

/* Tablet: ≤ 1024px → 2 columns */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: ≤ 600px → 1 column */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
        gap                  : 16px;
    }
    .product-card__body {
        padding: 14px;
    }
}

/* =============================================================================
   Coupon Grid – BEM Stylesheet
   Shortcode: [coupon_grid_custom]
   ============================================================================= */

/* Coupon Grid – direct values */
.coupon-grid {
    display              : grid;
    grid-template-columns: repeat(4, 1fr);
    gap                  : 20px;
    padding              : 0;
    margin               : 0;
}

.coupon-grid__item {
    display: flex;
}

.coupon-card {
    position      : relative;
    display       : flex;
    flex-direction: row;
    width         : 100%;
    background    : #ffffff;
    border-radius : 14px;
    overflow      : hidden;
}

.coupon-card::before,
.coupon-card::after {
    content      : '';
    position     : absolute;
    left         : 78px;
    transform    : translateX(-50%);
    width        : 22px;
    height       : 22px;
    border-radius: 50%;
    background   : #f2f4e3;
    z-index      : 2;
}

.coupon-card::before {
    top   : -11px;
}

.coupon-card::after {
    bottom: -11px;
}

.coupon-card__decor {
    flex-shrink    : 0;
    width          : 78px;
    background     : #aa7e3d;
    display        : flex;
    align-items    : center;
    justify-content: center;
}

.coupon-card__icon {
    display    : block;
    flex-shrink: 0;
}

.coupon-card__content {
    display       : flex;
    flex-direction: column;
    flex          : 1;
    padding       : 18px 16px;
    gap           : 8px;
    min-width     : 0;
}

.coupon-card__code {
    margin     : 0;
    font-size  : .9375rem;
    font-weight: 700;
    color      : #aa7e3d;
    line-height: 1.3;
}

.coupon-card__label {
    font-weight : 700;
    color       : #374151;
    margin-right: .25em;
}

.coupon-card__description {
    margin     : 0;
    font-size  : .8125rem;
    color      : #374151;
    line-height: 1.5;
    flex       : 1;
}

.coupon-card__copy-button {
    align-self     : flex-start;
    margin: auto 0 0 auto;
    padding        : 9px 22px;
    background     : #aa7e3d;
    color          : #fff;
    font-size      : .8125rem;
    font-weight    : 600;
    border         : none;
    border-radius  : 50px;
    cursor         : pointer;
    transition     : background .2s ease;
    white-space    : nowrap;
    line-height    : 1.4;
}

.coupon-card__copy-button:hover,
.coupon-card__copy-button:focus-visible {
    background: #aa7e3d;
    outline   : none;
}

.coupon-card__copy-button--copied {
    background: #aa7e3d;
    cursor    : default;
}

@media (max-width: 1024px) {
    .coupon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .coupon-grid {
        grid-template-columns: repeat(1, 1fr);
        gap                  : 14px;
    }
    .coupon-card__content {
        padding: 14px 12px;
    }
}

/* =============================================================================
   Testimonial Slider – BEM Stylesheet
   Shortcode: [testimonial_slider_custom]
   ============================================================================= */

/* Testimonial Slider – direct values */
.testimonial-slider {
    padding-left: 20px !important;
    padding-right: 20px !important;
}
.testimonial-slider__item {
    background: #f9f5ec;
    border    : 2px solid #1b4332;
    border-radius: 24px;
    overflow: hidden;
}
.testimonial-slider__empty {
    text-align: center;
    color     : #374151;
    padding   : 40px 0;
}

.testimonial-slider .swiper-wrapper {
    align-items: stretch;
}

.testimonial-slider__item.swiper-slide {
    display: flex;
    height : auto;
}

.testimonial-card {
    display       : flex;
    flex-direction: column;
    width         : 100%;
    background    : #ffffff;
    border-radius : 18px;
    padding       : 40px 44px;
    gap           : 20px;
}

.testimonial-card__header {
    display    : flex;
    align-items: center;
    gap        : 18px;
}

.testimonial-card__avatar {
    flex-shrink  : 0;
    width        : 72px;
    height       : 72px;
    border-radius: 12px;
    border       : 2px solid #d1d5db;
    object-fit   : cover;
    display      : block;
}

.testimonial-card__avatar--placeholder {
    background   : #f3f4f6;
    display      : flex;
    align-items  : center;
    justify-content: center;
    color        : #9ca3af;
}

.testimonial-card__info {
    display       : flex;
    flex-direction: column;
    gap           : 4px;
}

.testimonial-card__name {
    margin     : 0;
    font-size  : 1.0625rem;
    font-weight: 700;
    color      : #111827;
    line-height: 1.3;
}

.testimonial-card__rating {
    font-size  : 1.25rem;
    color      : #f59e0b;
    line-height: 1;
    letter-spacing: .05em;
}

.testimonial-card__content {
    font-size  : 1.0625rem;
    color      : #374151;
    line-height: 1.75;
}

.testimonial-card__content p:first-child { margin-top: 0; }
.testimonial-card__content p:last-child  { margin-bottom: 0; }

.testimonial-slider__nav {
    position       : absolute;
    top            : 50%;
    transform      : translateY(-50%);
    z-index        : 10;
    width          : 48px;
    height         : 48px;
    background     : #ffffff;
    border         : 2px solid #1b4332;
    border-radius  : 50%;
    color          : #1b4332;
    display        : flex;
    align-items    : center;
    justify-content: center;
    cursor         : pointer;
    transition     : background .2s ease, color .2s ease;
    padding        : 0;
    outline        : none;
    appearance     : none;
    -webkit-appearance: none;
    margin: 0;
}

.testimonial-slider__nav:hover,
.testimonial-slider__nav:focus-visible {
    background: #1b4332;
    color     : #ffffff;
    outline   : none;
}

.testimonial-slider__nav--prev {
    left: 0;
}

.testimonial-slider__nav--next {
    right: 0;
}

.testimonial-slider__nav.swiper-button-disabled {
    opacity       : .35;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .testimonial-slider {
        padding: 40px 64px;
    }
    .testimonial-card {
        padding: 28px 32px;
    }
}

@media (max-width: 768px) {
    .testimonial-slider {
        padding: 32px 48px;
    }
    .testimonial-card {
        padding: 24px 20px;
    }
    .testimonial-card__header {
        flex-direction: column;
        align-items   : flex-start;
        gap           : 12px;
    }
}

@media (max-width: 480px) {
    .testimonial-slider {
        padding: 28px 36px;
        border-radius: 16px;
    }
    .testimonial-slider__nav {
        width: 38px;
        height: 38px;
        left: -19px;
        right: -19px;
    }
    .testimonial-card {
        padding: 20px 16px;
        border-radius: 14px;
    }
    .testimonial-card__content {
        font-size: .9375rem;
    }
}


/* =============================================================================
   Blog Grid – BEM Stylesheet
   Shortcode: [blog_grid_custom]
   ============================================================================= */

.blog-grid {
    display              : grid;
    grid-template-columns: repeat(3, 1fr);
    gap                  : 24px;
    padding              : 0;
    margin               : 0;
}

.blog-grid__empty {
    grid-column: 1 / -1;
    text-align : center;
    color      : #374151;
    padding    : 40px 0;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.blog-card {
    display       : flex;
    flex-direction: column;
    background    : #ffffff;
    border-radius : 16px;
    box-shadow    : 0 2px 12px rgba(0, 0, 0, .08);
    overflow      : hidden;
    transition    : box-shadow .25s ease, transform .25s ease;
}

.blog-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
    transform : translateY(-4px);
}

/* ── Image wrapper ─────────────────────────────────────────────────────────── */
.blog-card__image-wrapper {
    display     : block;
    width       : 100%;
    aspect-ratio: 16 / 10;
    overflow    : hidden;
    flex-shrink : 0;
}

.blog-card__image {
    width      : 100%;
    height     : 100%;
    object-fit : cover;
    display    : block;
    transition : transform .35s ease;
}

.blog-card:hover .blog-card__image {
    transform: scale(1.05);
}

.blog-card__image--placeholder {
    width     : 100%;
    height    : 100%;
    background: #f3f4f6;
}

/* ── Content ───────────────────────────────────────────────────────────────── */
.blog-card__content {
    display       : flex;
    flex-direction: column;
    flex          : 1;
    padding       : 16px 20px 20px;
    gap           : 12px;
}

/* ── Title ─────────────────────────────────────────────────────────────────── */
.blog-card__title {
    margin     : 0;
    font-size  : 1rem;
    font-weight: 700;
    color      : #111827;
    line-height: 1.5;
    flex       : 1;
}

.blog-card__title a {
    color          : inherit;
    text-decoration: none;
    transition     : color .2s ease;
    display        : -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp     : 3;
    -webkit-box-orient: vertical;
    overflow       : hidden;
}

.blog-card__title a:hover {
    color: #1b4332;
}

/* ── Meta row ──────────────────────────────────────────────────────────────── */
.blog-card__meta {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    gap            : 8px;
    margin-top     : auto;
}

.blog-card__date {
    font-size : .8125rem;
    color     : #9ca3af;
    white-space: nowrap;
}

.blog-card__readmore {
    font-size      : .8125rem;
    font-weight    : 600;
    color          : #374151;
    text-decoration: none;
    white-space    : nowrap;
    transition     : color .2s ease;
}

.blog-card__readmore:hover {
    color: #1b4332;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

/* Tablet: ≤ 1024px → 2 columns */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: ≤ 600px → 1 column */
@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: repeat(1, 1fr);
        gap                  : 16px;
    }
}

/* Product Grid Pagination */
.product-grid__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 32px 0 0 0;
}

.product-grid__pagination .page-numbers {
    display: inline-block;
    min-width: 36px;
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 500;
    color: #2d6a4f;
    background: #f9f5ec;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: background .2s, color .2s, box-shadow .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    cursor: pointer;
}

.product-grid__pagination .page-numbers:hover,
.product-grid__pagination .page-numbers:focus {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
}

.product-grid__pagination .page-numbers.current {
    background: #1b4332;
    color: #fff;
    border-color: #1b4332;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
}

.product-grid__pagination .page-numbers.dots {
    background: none;
    color: #888;
    border: none;
    box-shadow: none;
    cursor: default;
}

.product-grid__pagination .page-numbers.prev,
.product-grid__pagination .page-numbers.next {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 8px 16px;
    background: #e5e7eb;
    color: #2d6a4f;
    border-radius: 8px;
}

.product-grid__pagination .page-numbers.prev:hover,
.product-grid__pagination .page-numbers.next:hover {
    background: #2d6a4f;
    color: #fff;
}

@media (max-width: 600px) {
    .product-grid__pagination .page-numbers {
        min-width: 28px;
        padding: 6px 8px;
        font-size: .95rem;
    }
    .product-grid__pagination {
        gap: 4px;
    }
}

/* Blog Grid Pagination */
.blog-grid__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 32px 0 0 0;
}

.blog-grid__pagination .page-numbers {
    display: inline-block;
    min-width: 36px;
    padding: 8px 14px;
    font-size: 18px;
    font-weight: 600;
    color: var(--fs-color-primary);
    background: #fff;
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.blog-grid__pagination .page-numbers:hover,
.blog-grid__pagination .page-numbers:focus {
    background: var(--fs-color-primary);
    color: #fff;
    border-color: var(--fs-color-primary);
}

.blog-grid__pagination .page-numbers.current {
    background: var(--fs-color-primary);
    color: #fff;
    border-color: var(--fs-color-primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
}

.blog-grid__pagination .page-numbers.dots {
    background: none;
    color: #888;
    border: none;
    box-shadow: none;
    cursor: default;
}

.blog-grid__pagination .page-numbers.prev,
.blog-grid__pagination .page-numbers.next {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 8px 16px;
    background: #fff;
    color: var(--fs-color-primary);
}

.blog-grid__pagination .page-numbers.prev:hover,
.blog-grid__pagination .page-numbers.next:hover {
    background: var(--fs-color-primary);
    color: #fff;
}

@media (max-width: 600px) {
    .blog-grid__pagination .page-numbers {
        min-width: 28px;
        padding: 6px 8px;
        font-size: .95rem;
    }
    .blog-grid__pagination {
        gap: 4px;
    }
}
