/* Tab Buttons Container */
.ajax-tab-buttons {
    display: flex;
    gap: 15px; 
    margin-bottom: 40px; 
    justify-content: center;
    flex-wrap: wrap;
}

/* Tab Button Styling */
.ajax-tab-btn {
    padding: 12px 30px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-bottom: 4px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #444444;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    outline: none;
}

/* Active Tab & Hover State */
.ajax-tab-btn.active, 
.ajax-tab-btn:hover {
    background: #1a56db;
    color: #ffffff;
    border-color: transparent;
    border-bottom: 4px solid #1342a9;
    box-shadow: 0 8px 20px rgba(26, 86, 219, 0.35);
    transform: translateY(-2px);
}

/* Products Grid Layout */
.ajax-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    padding: 10px 5px !important;
    width: 100% !important;
}

/* Modern Premium Product Card */
.ajax-product-card {
    background: #ffffff !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e5e7eb !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

.ajax-tabs-wrapper:not(.no-hover-effect) .ajax-product-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(26, 86, 219, 0.2) !important;
}

/* ========== UPDATE: Dynamic Image Container ========== */
.ajax-product-card .product-img {
    position: relative !important;
    width: 100% !important;
    background: #f8f9fa !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.ajax-product-card .product-img a {
    width: 100% !important;
    display: block !important;
}

.ajax-product-card .product-img img {
    width: 100% !important;
    height: 250px !important; /* Managed by Elementor default */
    object-fit: fill !important; /* Default: stretch to fill the box, managed by Elementor */
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    margin: 0 auto !important;
    display: block !important;
}

.ajax-tabs-wrapper:not(.no-hover-effect) .ajax-product-card:hover .product-img img {
    transform: scale(1.05) !important;
}

/* Sale Badge */
.ajax-sale-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 2 !important;
    background: #e53935 !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18) !important;
}

/* Product Info Area */
.ajax-product-card .product-info {
    padding: 15px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    text-align: left !important;
}

.ajax-product-card .product-title {
    margin: 0 0 8px !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
}

.ajax-product-card .product-title a {
    color: #333333 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    box-shadow: none !important;
}

.ajax-product-card .product-title a:hover {
    color: #1a56db !important;
}

/* Rating Stars */
.ajax-product-card .product-rating {
    color: #f39c12 !important;
    font-size: 14px !important;
    margin-bottom: 12px !important;
    line-height: 1 !important;
}

.ajax-product-card .product-rating .rating-stars {
    letter-spacing: 2px;
}

.ajax-product-card .product-rating .rating-number {
    color: #333333;
    font-weight: 700;
    letter-spacing: normal;
    margin-right: 2px;
}

/* Price & Views Row */
.ajax-product-card .product-meta-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.ajax-product-card .product-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #333333 !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.ajax-product-card .product-price del {
    font-size: 13px !important;
    color: #999 !important;
    font-weight: normal !important;
    text-decoration: line-through !important;
    opacity: 0.8 !important;
}

.ajax-product-card .product-price ins {
    text-decoration: none !important;
    color: #333333 !important;
    font-weight: 700 !important;
    background: transparent !important;
}

.ajax-product-card .product-price bdi,
.ajax-product-card .product-price span {
    color: inherit !important;
    font-weight: inherit !important;
    text-decoration: inherit !important;
}

.ajax-product-card .product-views {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #666666 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.ajax-product-card .product-views svg {
    stroke: #888888;
}

/* Action Buttons Flex Layout */
.ajax-product-card .product-action-row {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: auto !important;
}

.ajax-product-card .buy-now-btn {
    flex-grow: 1 !important;
    background: #1a56db !important;
    color: #ffffff !important;
    text-align: center !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    transition: background 0.3s ease !important;
    border: none !important;
    display: block !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

.ajax-product-card .buy-now-btn:hover {
    background: #1342a9 !important;
    color: #ffffff !important;
}

.ajax-product-card .demo-btn {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border: 1px solid #1a56db !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.ajax-product-card .demo-btn:hover {
    background: #f4f6f8 !important;
}

.ajax-product-card .demo-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #ff9800 !important;
    display: block !important;
}

/* Beautiful Empty State */
.ajax-no-products-wrapper {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 550px !important;
    margin: 40px auto !important;
    padding: 50px 30px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.08) !important;
    border: 2px dashed rgba(108, 92, 231, 0.3) !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.ajax-no-products-wrapper .no-products-icon {
    margin: 0 auto 15px auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #ff6b6b !important;
    animation: floating 3s ease-in-out infinite !important;
}

.ajax-no-products-wrapper .no-products-title {
    font-size: 24px !important;
    color: #2c3e50 !important;
    margin: 0 0 10px 0 !important;
    font-weight: 700 !important;
    text-align: center !important;
    width: 100% !important;
}

.ajax-no-products-wrapper .no-products-desc {
    font-size: 16px !important;
    color: #666666 !important;
    margin: 0 !important;
    text-align: center !important;
    width: 100% !important;
    line-height: 1.6 !important;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Loading State — skeleton placeholder cards while AJAX fetches
   the real products, instead of a plain "Loading..." text. Uses
   the same .ajax-products-grid class so it lines up with the
   real grid's column/gap settings automatically. */
.ajax-loading {
    width: 100% !important;
}

.ajax-skeleton-card {
    background: #ffffff !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    padding: 15px !important;
    box-sizing: border-box !important;
}

.ajax-skeleton-block {
    background: linear-gradient(90deg, #eef0f2 25%, #f7f8f9 37%, #eef0f2 63%) !important;
    background-size: 400% 100% !important;
    animation: ajaxSkeletonShimmer 1.4s ease infinite !important;
    border-radius: 4px !important;
}

.ajax-skeleton-img {
    width: 100% !important;
    height: 250px !important;
    border-radius: 6px !important;
    margin-bottom: 15px !important;
}

.ajax-skeleton-line {
    height: 14px !important;
    margin-bottom: 12px !important;
}

.ajax-skeleton-line--title {
    width: 80% !important;
    height: 16px !important;
}

.ajax-skeleton-line--sm {
    width: 45% !important;
}

.ajax-skeleton-line--btn {
    width: 100% !important;
    height: 38px !important;
    margin-bottom: 0 !important;
    border-radius: 4px !important;
}

@keyframes ajaxSkeletonShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* Smooth fade-in once real products replace the skeleton/previous tab */
.ajax-content-fade-in {
    animation: ajaxContentFadeIn 0.4s ease !important;
}

@keyframes ajaxContentFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
 *  PRODUCT CARD 2 — Premium "Framed Photo" Design
 *  Deliberately different look from Card 1: padded photo
 *  frame with a soft backdrop, an always-visible circular
 *  quick-view badge that pops out of the frame's corner,
 *  rating above the title, and a pill-shaped buy button.
 *  Reuses the same element classes as Card 1 so every
 *  Elementor style control (color, typography, buttons,
 *  badge, image, etc.) keeps working on this layout too.
 * ========================================================= */

.ajax-products-grid--v2 {
    gap: 28px !important;
}

.ajax-product-card--v2 {
    border: none !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08) !important;
    overflow: visible !important;
}

.ajax-tabs-wrapper:not(.no-hover-effect) .ajax-product-card--v2:hover {
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14) !important;
    transform: translateY(-4px) !important;
}

/* Padded backdrop that "frames" the product photo */
.ajax-product-card--v2 .product-img-frame {
    position: relative !important;
    padding: 14px 14px 0 14px !important;
    background: #f4f5f7 !important;
    border-radius: 18px 18px 0 0 !important;
}

.ajax-product-card--v2 .product-img {
    aspect-ratio: 1 / 1 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
}

.ajax-product-card--v2 .product-img img {
    height: 100% !important;
    border-radius: 14px !important;
}

/* Always-visible circular quick-view badge popping out of the
   frame's bottom-right corner (no hover/opacity dependency —
   this is what was previously breaking on some setups). */
.ajax-product-card--v2 .demo-btn--floating {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.22) !important;
    z-index: 5 !important;
    transition: transform 0.25s ease, background 0.25s ease !important;
}

.ajax-product-card--v2 .demo-btn--floating:hover {
    transform: scale(1.08) !important;
}

.ajax-product-card--v2 .demo-btn--floating svg {
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
}

/* Pill-style sale badge inside the frame */
.ajax-product-card--v2 .ajax-sale-badge {
    top: 24px !important;
    left: 24px !important;
    border-radius: 30px !important;
    padding: 5px 12px !important;
    font-size: 11px !important;
}

/* Info area */
.ajax-product-card--v2 .product-info {
    padding: 22px 20px 20px !important;
}

.ajax-product-card--v2 .product-rating {
    font-size: 12px !important;
    margin-bottom: 6px !important;
    letter-spacing: 1px !important;
}

.ajax-product-card--v2 .product-title {
    font-size: 15.5px !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
    margin: 0 0 10px !important;
}

.ajax-product-card--v2 .product-meta-row {
    justify-content: flex-start !important;
    align-items: baseline !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}

.ajax-product-card--v2 .product-price {
    font-size: 18px !important;
}

.ajax-product-card--v2 .product-views {
    font-size: 12px !important;
}

/* Pill-shaped, full-width buy button with cart icon */
.ajax-product-card--v2 .buy-now-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border-radius: 30px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    padding: 13px 18px !important;
}

.ajax-product-card--v2 .buy-now-btn .cart-icon {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    flex-shrink: 0 !important;
}

/* =========================================================
 *  STANDALONE "BUY NOW" WIDGET — for use on Product pages.
 *  Reuses the .buy-now-btn / .demo-btn classes so all the
 *  shared button style controls (colors, radius, padding,
 *  size) work exactly as on the product cards.
 * ========================================================= */

.buy-now-widget-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.buy-now-widget-wrapper .action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.buy-now-widget-wrapper.is-full-width .action-row .buy-now-btn {
    flex-grow: 1;
}

.buy-now-widget-wrapper:not(.is-full-width) .action-row .buy-now-btn {
    flex-grow: 0;
}

.buy-now-widget-wrapper.align-left .action-row {
    justify-content: flex-start;
}

.buy-now-widget-wrapper.align-center .action-row {
    justify-content: center;
}

.buy-now-widget-wrapper.align-right .action-row {
    justify-content: flex-end;
}

.buy-now-widget-wrapper .buy-now-btn {
    background: #1a56db;
    color: #ffffff;
    text-align: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.3s ease;
    border: none;
    line-height: 1.5;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
}

.buy-now-widget-wrapper .buy-now-btn:hover {
    background: #1342a9;
    color: #ffffff;
}

.buy-now-widget-wrapper .buy-now-btn .cart-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

.buy-now-widget-wrapper .demo-btn {
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #1a56db;
    border-radius: 4px;
    background: #ffffff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-sizing: border-box;
    text-decoration: none;
}

.buy-now-widget-wrapper .demo-btn:hover {
    background: #f4f6f8;
}

.buy-now-widget-wrapper .demo-btn svg {
    width: 20px;
    height: 20px;
    stroke: #ff9800;
    display: block;
}

/* View button WITH a text label ("Demo") — switches from a fixed
   square icon button to an auto-width pill with icon + text, unless
   the Width control above overrides it with an explicit value. */
.buy-now-widget-wrapper .demo-btn.demo-btn--with-text {
    width: auto;
    gap: 8px;
    padding: 0 18px;
}

.buy-now-widget-wrapper .demo-btn.demo-btn--with-text span {
    color: #1a56db;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .buy-now-widget-wrapper:not(.is-full-width) .buy-now-btn {
        max-width: 100%;
    }
}

/* =========================================================
 *  "NEED HELP" BOX WIDGET — repeatable linkable item list.
 * ========================================================= */

.ajax-help-box {
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #ececf5;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    font-family: inherit;
}

.ajax-help-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 18px;
}

.ajax-help-title i,
.ajax-help-title svg {
    color: #6c3ef4;
    font-size: 24px;
    flex-shrink: 0;
}

.ajax-help-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    background: #fafaff;
    border: 1px solid #ececf5;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: 0.3s ease;
    color: #222222;
    box-sizing: border-box;
}

.ajax-help-item:last-child {
    margin-bottom: 0;
}

.ajax-help-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6c3ef4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    transition: 0.3s;
    flex-shrink: 0;
}

.ajax-help-icon i,
.ajax-help-icon svg {
    color: #ffffff;
    font-size: 18px;
}

.ajax-help-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ajax-help-text strong {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.ajax-help-text span {
    font-size: 13px;
    color: #777777;
    margin-top: 4px;
}

.ajax-help-box:not(.no-hover-lift) .ajax-help-item:hover {
    transform: translateY(-2px);
    border-color: #6c3ef4;
    box-shadow: 0 10px 20px rgba(108, 62, 244, 0.15);
}

.ajax-help-box:not(.no-hover-lift) .ajax-help-item:hover .ajax-help-icon {
    transform: scale(1.08);
}

@media (max-width: 1024px) {
    .ajax-help-box {
        padding: 18px;
    }

    .ajax-help-title {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .ajax-help-box {
        padding: 15px;
        border-radius: 14px;
    }

    .ajax-help-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .ajax-help-title i,
    .ajax-help-title svg {
        font-size: 20px;
    }

    .ajax-help-item {
        gap: 12px;
        padding: 12px;
        border-radius: 12px;
    }

    .ajax-help-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 16px;
    }

    .ajax-help-text strong {
        font-size: 15px;
    }

    .ajax-help-text span {
        font-size: 12px;
    }
}


/* =========================================================
 *  STANDALONE "PRODUCT RATING & VIEWS" WIDGET
 * ========================================================= */

.ajax-rating-views-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.ajax-rating-views-row .product-rating {
    color: #f39c12;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.ajax-rating-views-row .product-rating .rating-stars {
    letter-spacing: 2px;
}

.ajax-rating-views-row .product-rating .rating-number {
    color: #333333;
    font-weight: 700;
    letter-spacing: normal;
    margin-right: 4px;
}

.ajax-rating-views-row .product-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666666;
    font-size: 14px;
    white-space: nowrap;
}

.ajax-rating-views-row .product-views svg {
    stroke: #888888;
    flex-shrink: 0;
}


/* =========================================================
 *  CLICKABLE STAR RATING ("Real" Rating Source)
 * ========================================================= */

.ajax-rating-clickable {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.rating-stars-input {
    display: inline-flex;
    cursor: pointer;
}

.rating-stars-input .star {
    color: #d5d5d5;
    transition: color 0.15s ease, transform 0.15s ease;
    line-height: 1;
}

.rating-stars-input .star.hover-fill {
    color: inherit;
}

.rating-stars-input .star:hover {
    transform: scale(1.2);
}

.ajax-rating-clickable.rating-submitting .rating-stars-input {
    opacity: 0.5;
    pointer-events: none;
}

.ajax-rating-clickable.rating-submitted .rating-stars-input {
    cursor: default;
    pointer-events: none;
}

.rating-thanks {
    display: none;
    color: #16a34a;
    font-weight: 600;
    font-size: 13px;
    margin-left: 4px;
    animation: ajaxRatingFadeIn 0.3s ease;
}

.rating-already-voted {
    color: #16a34a;
    font-weight: 600;
    font-size: 12px;
    margin-left: 6px;
    white-space: nowrap;
}

@keyframes ajaxRatingFadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
 *  PRESS FEEDBACK — a small, snappy response on click/tap so
 *  buttons feel tactile instead of static.
 * ========================================================= */

.ajax-tab-btn:active {
    transform: translateY(0) scale(0.97) !important;
}

.ajax-product-card .buy-now-btn:active,
.buy-now-widget-wrapper .buy-now-btn:active {
    transform: scale(0.97) !important;
}

.ajax-product-card .demo-btn:active,
.buy-now-widget-wrapper .demo-btn:active {
    transform: scale(0.92) !important;
}

.ajax-product-card--v2 .demo-btn--floating:active {
    transform: scale(0.94) !important;
}

.ajax-help-box:not(.no-hover-lift) .ajax-help-item:active {
    transform: translateY(0) scale(0.98) !important;
}

.rating-stars-input .star:active {
    transform: scale(1.3) !important;
}

/* =========================================================
 *  KEYBOARD FOCUS — visible only for keyboard navigation
 *  (:focus-visible), so mouse/tap clicks stay clean while
 *  Tab-key users can still see where they are.
 * ========================================================= */

.ajax-tab-btn:focus-visible {
    outline: 3px solid rgba(26, 86, 219, 0.5) !important;
    outline-offset: 2px !important;
}

.ajax-product-card .buy-now-btn:focus-visible,
.buy-now-widget-wrapper .buy-now-btn:focus-visible,
.ajax-product-card .demo-btn:focus-visible,
.buy-now-widget-wrapper .demo-btn:focus-visible,
.ajax-product-card--v2 .demo-btn--floating:focus-visible {
    outline: 3px solid rgba(26, 86, 219, 0.5) !important;
    outline-offset: 2px !important;
}

.ajax-product-card .product-title a:focus-visible,
.ajax-help-item:focus-visible {
    outline: 3px solid rgba(26, 86, 219, 0.5) !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

/* =========================================================
 *  SHOP SIDEBAR FILTER WIDGET — left category-checkbox
 *  sidebar + right-hand AJAX product grid.
 * ========================================================= */

.shop-filter-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.shop-filter-sidebar {
    flex: 0 0 25%;
    max-width: 25%;
    box-sizing: border-box;
    background-color: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 24px 20px;
}

.shop-filter-title {
    margin: 0 0 16px;
    padding-bottom: 14px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 1px solid #eee;
}

.shop-filter-category-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.shop-filter-category-list li {
    margin: 0;
    padding: 0;
}

.shop-filter-category-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.3;
}

.shop-filter-category-list input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1a56db;
    cursor: pointer;
}

.shop-filter-cat-name {
    flex: 1 1 auto;
    color: #333333;
}

.shop-filter-cat-count {
    flex: 0 0 auto;
    color: #888888;
    font-size: 13px;
}

.shop-filter-no-categories {
    color: #888888;
    font-size: 14px;
    margin: 0 0 20px;
}

/* Categories with 0 products can't be ticked at all — this avoids the
   confusing state of "selecting an empty category still shows products"
   (there is nothing to filter to, so we don't let it be selected). */
.shop-filter-category-list li.shop-filter-cat-empty label {
    cursor: not-allowed;
    opacity: 0.5;
}

.shop-filter-category-list input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.shop-filter-apply-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin: 4px 0 14px;
    border: none;
    border-radius: 6px;
    background-color: #28a745;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.shop-filter-apply-btn:hover {
    background-color: #218838;
}

.shop-filter-reset-link {
    display: block;
    text-align: center;
    color: #1a56db;
    font-size: 14px;
    text-decoration: none;
}

.shop-filter-reset-link:hover {
    text-decoration: underline;
}

.shop-filter-products {
    flex: 1 1 0;
    min-width: 0;
}

/* Stack the sidebar above the products on smaller screens. */
@media (max-width: 767px) {
    .shop-filter-layout {
        flex-direction: column;
    }

    .shop-filter-sidebar {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100%;
    }
}

.shop-filter-apply-btn:focus-visible,
.shop-filter-reset-link:focus-visible {
    outline: 3px solid rgba(26, 86, 219, 0.5) !important;
    outline-offset: 2px !important;
}

/* ---- Mobile "Filters" toggle button ---- */
.shop-filter-mobile-toggle {
    display: none; /* shown only on mobile, see media query below */
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin: 0 0 16px;
    background-color: #ffffff;
    border: 1px solid #d5d8dc;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.shop-filter-mobile-toggle svg {
    flex: 0 0 auto;
}

.shop-filter-mobile-toggle-text {
    flex: 0 0 auto;
}

.shop-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: #e63946;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
}

@media (max-width: 767px) {
    .shop-filter-wrapper.has-mobile-filter-toggle .shop-filter-mobile-toggle {
        display: inline-flex;
    }

    /* Sidebar starts tucked away and drops down as a panel when the
       "Filters" button above is tapped, instead of always taking up
       space above the product grid. */
    .shop-filter-wrapper.has-mobile-filter-toggle .shop-filter-sidebar {
        display: none;
        position: relative;
        z-index: 5;
        margin-bottom: 16px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    }

    .shop-filter-wrapper.has-mobile-filter-toggle.shop-filter-sidebar-open .shop-filter-sidebar {
        display: block;
        animation: shopFilterPanelIn 0.2s ease;
    }
}

@keyframes shopFilterPanelIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
