/* ==========================================================================
   Ajax Product Search - Frontend Styles
   ========================================================================== */

/* CSS Variables (defaults - overridden by PHP) */
:root {
    --aps-bg-overlay: rgba(0, 0, 0, 0.95);
    --aps-bg-content: #ffffff;
    --aps-text-colour: #333333;
    --aps-accent-colour: #2563eb;
    --aps-close-colour: #ffffff;
    --aps-columns-desktop: 4;
    --aps-columns-tablet: 3;
    --aps-columns-mobile: 2;
}

/* ==========================================================================
   Popup Container
   ========================================================================== */

.aps-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483641!important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-flyout,
#cart-drawer,
.xoo-wsc-cart-active .xoo-wsc-container, .xoo-wsc-slider,
.mfp-content,
.mfp-woosq,
.wc-block-components-drawer__screen-overlay {
    z-index: 2147483643!important;
    overflow: auto;
}
#csd-popup {
    z-index: 2147483644!important;
    overflow: auto;
}
#woosq-popup .slick-dots > * {
	background: #ffffff42!important;
}
.woosq-product .thumbnails .slick-arrow.slick-next {
    left: auto!important;
}

.archive .mfp-content #pa_colours,
body:not(.single-product) .mfp-content #pa_colours {
  display: none;
}

.archive .mfp-content #pa_allsizes,
body:not(.single-product) .mfp-content #pa_allsizes {
display:none;
}
body:not(.single-product) .variations >tbody th {
  padding-bottom:20px;
}

.aps-popup.aps-active {
    opacity: 1;
    visibility: visible;
}

/* Animation Variants */
.aps-popup.aps-animation-fade .aps-popup-container {
    transition: opacity 0.3s ease;
}

.aps-popup.aps-animation-slide .aps-popup-container {
    transform: translateY(-30px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.aps-popup.aps-animation-slide.aps-active .aps-popup-container {
    transform: translateY(0);
}

.aps-popup.aps-animation-scale .aps-popup-container {
    transform: scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.aps-popup.aps-animation-scale.aps-active .aps-popup-container {
    transform: scale(1);
}

.aps-popup.aps-animation-none .aps-popup-container,
.aps-popup.aps-animation-none {
    transition: none;
}

/* Overlay */
.aps-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--aps-bg-overlay);
}

/* ==========================================================================
   Woosq Quick View
   ========================================================================== */

#woosq-popup .view-details-btn {
  height: 60px!important;
  align-content: center;
  font-weight: bolder;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUpAnimpcb 0.6s ease-out forwards;
  animation-delay: 0.3s; /* adjust delay here */
  text-decoration:none!important;
}

#woosq-popup a.view-details-btn {
text-decoration:none!important;
}

@keyframes fadeUpAnimpcb {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* WooSQ accessibility hints */
.aps-swipe-hint,
.aps-scroll-hint {
    position: absolute;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 16px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align:center;
}

.aps-swipe-hint {
top: 50%;
left: 50%;
}
.aps-swipe-hint.aps-hint-visible,
.aps-scroll-hint.aps-hint-visible {
    opacity: 1;
}

.aps-scroll-hint {
    top: 50%;
    border-radius: 50%;
}

#woosq-popup .slick-slider {
    position: relative;
}

#woosq-popup .summary-content {
    position: relative;
}

/* WooSQ Add to Cart spinner */
#woosq-popup .single_add_to_cart_button.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

#woosq-popup .single_add_to_cart_button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aps-btn-spin 0.6s linear infinite;
}

@keyframes aps-btn-spin {
    to { transform: rotate(360deg); }
}

/* Swipe animation - left and right arrows */
.aps-swipe-hint svg {
    display: block;
}

.aps-swipe-hint .aps-swipe-left {
    animation: aps-swipe-left 1s ease-in-out infinite;
}

.aps-swipe-hint .aps-swipe-right {
    animation: aps-swipe-right 1s ease-in-out infinite;
}


.aps-swipe-hint.aps-hint-visible:before {
  content:'Swipe images';
  position:absolute;
  top:12px;
  left:20px;
  width:60px;
  padding:0;
  line-height:1;
  font-size:12px;
  text-align:center;
}

.aps-scroll-hint.aps-hint-visible:before {
  content:'Scroll';
  position:absolute;
  top:27px;
  left:0px;
  width:50px;
  padding:0;
  line-height:1;
  font-size:12px;
  text-align:center;
}

.aps-swipe-hint {
  padding: 5px 0px;
  border-radius: 50%;
  width:100px;
}
.aps-scroll-hint {
  padding: 5px 0px;
  border-radius: 50%;
  height:70px;
  width:50px;
}

.aps-scroll-hint {
    bottom:60px;
    top:auto;
    right:0px!important;
    left:auto;
}

@media (max-width:1060px) {
  .aps-scroll-hint {
    top: 140px;
    right:0px!important;
    left:auto;
  }
}

.aps-swipe-hint svg {
  width:100px;
}
.aps-scroll-hint svg {
  height:70px;
  margin-left:8px;
}

@keyframes aps-swipe-left {
    0%, 100% { transform: translateX(-22px); opacity: 1; }
    50% { transform: translateX(-17px); opacity: 0.5; }
}

@keyframes aps-swipe-right {
    0%, 100% { transform: translateX(22px); opacity: 1; }
    50% { transform: translateX(17px); opacity: 0.5; }
}

@keyframes aps-scroll-up {
    0%, 100% { transform: translateY(-21px); opacity: 1; }
    50% { transform: translateY(-15px); opacity: 0.5;}
}

@keyframes aps-scroll-down {
    0%, 100% { transform: translateY(12px); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.5; }
}


/* Scroll animation - up and down arrows */
.aps-scroll-hint svg {
    display: block;
}

.aps-scroll-hint .aps-scroll-up {
    animation: aps-scroll-up 1s ease-in-out infinite;
}

.aps-scroll-hint .aps-scroll-down {
    animation: aps-scroll-down 1s ease-in-out infinite;
}

/* ==========================================================================
   Popup Content Container
   ========================================================================== */

.aps-popup-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.aps-popup-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 40px 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(3px);
}

.aps-search-input::placeholder {
    opacity: 1 !important;
    transition: none !important;
}

.aps-search-input:focus::placeholder {
    opacity: 1 !important;
    transition: none !important;
}

.aps-search-input:-webkit-autofill::placeholder {
    opacity: 1 !important;
}
.aps-results-count {
    font-size: 14px;
    color: var(--aps-text-colour);
    opacity: 0.7;
    margin-right: 16px;
}

@media (max-width: 768px) {
    .aps-results-count {
        font-size: 12px;
        margin-right: 12px;
    }
}

.aps-no-exact-match {
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px 20px;
    color: var(--aps-text-colour);
    opacity: 0.7;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

/* Quick Filters */
.aps-quick-filters,
.aps-quick-categories,
.aps-custom-filters {
    padding: 12px 0px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.aps-filters-section {
	overflow-y: auto;
	overflow-x: hidden;
}
@media (min-width:768px) {
    .aps-filters-section {
      padding:8px;
}
}

.aps-quick-filters-label,
.aps-quick-categories-label,
.aps-custom-filters-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--aps-text-colour);
    opacity: 0.7;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aps-quick-filters-buttons,
.aps-quick-categories-buttons,
.aps-custom-filters-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aps-quick-filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--aps-accent-colour);
    background: transparent;
    color: var(--aps-accent-colour);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform:capitalize;
}

.aps-quick-filter-btn:hover {
    background: var(--aps-accent-colour);
    color: #fff;
}

/* Accordion Styles for Trending */
.aps-suggestions.aps-accordion {
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.aps-accordion-header {
    display: flex;
    justify-content: start;
    align-items: center;
    cursor: pointer;
    padding: 0px;
    user-select: none;
}


.aps-suggestions.aps-accordion .aps-suggestions-label {
    margin-bottom: 0;
}

.aps-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: start;
    transition: transform 0.3s ease;
}

.aps-popular-searches.aps-accordion .aps-accordion-toggle {
    transform: rotate(-90deg);
}
.aps-popular-searches.aps-accordion.aps-accordion-expanded .aps-accordion-toggle {
    transform: rotate(0deg);
}


.aps-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0px;
}

.aps-accordion-expanded .aps-accordion-content {
    max-height: 500px;
    padding: 6px 12px;
}

.aps-suggestions.aps-accordion .aps-suggestions-list.aps-accordion-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.aps-popular-searches.aps-accordion .aps-suggestions-toggle {
	display: none;
}
.aps-popular-searches.aps-accordion.aps-accordion-expanded .aps-suggestions-toggle {
	display: block;
}

/* Show More/Less Button */
.aps-show-more-btn {
    background: none;
    border: none;
    color: var(--aps-accent-colour);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 6px;
    margin-top: 8px;
    transition: opacity 0.2s ease;
}

.aps-show-more-btn:hover {
    opacity: 0.7;
}

/* Hidden buttons */
.aps-quick-filter-btn.aps-hidden {
    display: none;
}

/* ==========================================================================
   Quick View
   ========================================================================== */


/* Quick View Icon */
.aps-quick-view-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 5;
    border: none !important;
    padding: 4px!important;
}

.aps-quick-view-btn:hover {
    background: var(--aps-accent-colour, #2563eb);
    color: #fff;
    transform: scale(1.1);
}

.aps-quick-view-btn svg {
    width: 18px;
    height: 18px;
}

.aps-product-image {
    position: relative;
    overflow: hidden;
}
.mfp-woosq .mfp-close:before {
    background: white!important;
    border-radius: 50%;
}
.mfp-woosq .mfp-close:before {
    font-size: 30px!important;
    width: 30px!important;
    height: 33px!important;
}

/* Card as div (when Quick View on card click) */
a.aps-product-card,
div.aps-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* ==========================================================================
   Close Button
   ========================================================================== */

.aps-close {
    position: absolute;
    top: 5px;
    right: 20px;
    z-index: 10;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--aps-close-colour);
    transition: transform 0.2s ease, opacity 0.2s ease;
    line-height: 1;
}

.aps-close:hover {
    transform: scale(1.1);
    opacity: 0.8;
    background: var(--aps-accent-colour);
    border-radius: 50%;
    color: wheat;
}

.aps-close:focus {
    outline: 2px solid var(--aps-accent-colour);
    outline-offset: 2px;
}

.aps-close svg {
    display: block;
}

/* ==========================================================================
   Search Input
   ========================================================================== */

.aps-search-wrapper {
    flex-shrink: 0;
    margin-bottom: 24px;
}
.aps-has-results .aps-search-wrapper {
    margin-bottom: 8px;
}

.aps-search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--aps-bg-content);
    border-radius: 16px;
    padding: 0 24px;
    box-shadow: 0 4px 24px rgb(0 0 0 / 6%);
}

.aps-search-icon {
    flex-shrink: 0;
    color: #9ca3af;
    margin-right: 16px;
}

.aps-search-input {
    flex: 1;
    border: none!important;
    background: transparent!important;
    font-size: 24px!important;
    font-weight: 600!important;
    color: var(--aps-text-colour)!important;
    padding: 10px 5px!important;
    outline: none!important;
    width: 100%!important;
    position: relative !important;
    z-index: 2147483647 !important;
    box-shadow: none !important;
}

.aps-search-input::placeholder {
    color: #5f646b;
    font-size: 18px;
}

.aps-search-input:focus {
    outline: none;
}

.aps-sort-wrapper {
    flex-shrink: 0;
    margin-top: 16px;
}

.aps-sort-select {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 36px 8px 16px;
    font-size: 14px;
    color: var(--aps-text-colour);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    max-width: 250px;
}

.aps-sort-wrapper {
    display: none;
}

.aps-sort-wrapper.aps-visible {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-content: center;
    align-self: center;
}

.aps-sort-select:focus {
    outline: 2px solid var(--aps-accent-colour);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .aps-search-input-container {
        flex-wrap: wrap;
    }
    
    .aps-sort-wrapper {
        width: 100%;
        margin-left: 0;
        margin-top: 12px;
    }
    
    .aps-sort-select {
        width: 100%;
    }
}

.aps-clear-input {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #9ca3af;
    transition: color 0.2s ease;
    line-height: 1;
}

.aps-clear-input:hover {
    color: var(--aps-text-colour)!important;
    background: none !important;
    box-shadow: none !important;
}

.aps-clear-input svg {
    display: block;
}

/* ==========================================================================
   Popular & Recent Searches
   ========================================================================== */

.aps-popular-searches,
.aps-recent-searches {
    flex-shrink: 0;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.aps-suggestions-label {
    color: var(--aps-text-colour);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left:1px;
}

.aps-suggestions-list,
.aps-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aps-suggestion,
.aps-recent-item {
    background: rgb(230 230 230 / 73%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 14px;
    color: rgb(0 0 0 / 90%);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

@media (hover: hover) {
    .aps-suggestion:hover,
    .aps-recent-item:hover {
        background: var(--aps-accent-colour);
        border-color: var(--aps-accent-colour);
        color: #ffffff;
    }
}

.aps-suggestion:focus-visible,
.aps-recent-item:focus-visible {
    outline: 2px solid var(--aps-accent-colour);
    outline-offset: 2px;
}

.aps-recent-item-wrapper {
    position: relative;
    display: inline-flex;
}

.aps-recent-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    padding: 0;
    background: rgba(0, 0, 0, 0.662);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.aps-recent-item-wrapper:hover .aps-recent-remove {
    opacity: 1;
}

.aps-recent-remove:hover {
    background: #ef4444;
    color: #ffffff;
}

/* ==========================================================================
   Results Container
   ========================================================================== */

.aps-results-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    margin-right: -10px;
}

/* Custom Scrollbar */
.aps-results-container::-webkit-scrollbar {
    width: 6px;
}

.aps-results-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.aps-results-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.aps-results-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.aps-suggestion {
    transition: opacity 0.2s ease, transform 0.2s ease;
    }

.aps-suggestion.aps-hidden {
    display: none;
}

    .aps-suggestions-toggle {
        background: #fcfcfc21!important;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50px;
        padding: 6px 12px;
        font-size: 14px;
        color: var(--aps-text-colour)!important;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .aps-suggestions-toggle:hover {
    background: #fcfcfc21!important;
    border-color: var(--aps-accent-colour);
    color: var(--aps-text-colour)!important;
    }

    @media (max-width: 768px) {
        .aps-suggestions-toggle {
            padding: 6px 12px;
            font-size: 13px;
        }
    }

.aps-product-card:has(.aps-badge-out-of-stock) .aps-product-price,
.aps-product-card:has(.aps-badge-out-of-stock) .aps-badge-sale {
  display:none;
}


/* ==========================================================================
   Results Grid
   ========================================================================== */

.aps-results-grid {
    display: grid;
    grid-template-columns: repeat(var(--aps-columns-desktop), 1fr);
    gap: 24px;
}

/* ==========================================================================
   Product Card
   ========================================================================== */

.aps-product-card {
    background: var(--aps-bg-content);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--aps-text-colour);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.aps-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
}

.aps-product-card:focus {
    outline: 3px solid var(--aps-accent-colour);
    outline-offset: 2px;
}

/* Product Image */
.aps-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--aps-bg-content);
}

.aps-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aps-product-card:hover .aps-product-image img {
    transform: scale(1.05);
}

/* Badges */
.aps-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.aps-badge-sale {
    background: var(--aps-accent-colour);
    color: #ffffff;
}

.aps-badge-out-of-stock {
    background: #6b7280;
    color: #ffffff;
    left: 12px;
    right: auto;
}

/* Product Info */
.aps-product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.aps-product-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
    color: var(--aps-text-colour);
    text-transform:capitalize;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aps-product-price {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aps-price-regular {
    font-size: 16px;
    font-weight: 700;
    color: var(--aps-text-colour);
}

.aps-price-regular.aps-has-sale {
    text-decoration: line-through;
    color: #9ca3af;
    font-weight: 400;
    font-size: 14px;
}

.aps-price-sale {
    font-size: 16px;
    font-weight: 700;
    color: var(--aps-accent-colour);
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.aps-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--aps-accent-colour);
    gap: 16px;
}

.aps-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--aps-accent-colour);
    border-radius: 50%;
    animation: aps-spin 0.8s linear infinite;
}

@keyframes aps-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   No Results
   ========================================================================== */

.aps-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--aps-text-colour);
    text-align: center;
    gap: 16px;
}

.aps-no-results svg {
    opacity: 0.5;
}

.aps-no-results p {
    font-size: 16px;
    margin: 0;
    max-width: 400px;
}

/* ==========================================================================
   Product Animation
   ========================================================================== */

.aps-product-card {
    opacity: 0;
    transform: translateY(20px);
    animation: aps-fadeInUp 0.3s ease forwards;
}

@keyframes aps-fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays */
.aps-product-card:nth-child(1) { animation-delay: 0.05s; }
.aps-product-card:nth-child(2) { animation-delay: 0.1s; }
.aps-product-card:nth-child(3) { animation-delay: 0.15s; }
.aps-product-card:nth-child(4) { animation-delay: 0.2s; }
.aps-product-card:nth-child(5) { animation-delay: 0.25s; }
.aps-product-card:nth-child(6) { animation-delay: 0.3s; }
.aps-product-card:nth-child(7) { animation-delay: 0.35s; }
.aps-product-card:nth-child(8) { animation-delay: 0.4s; }
.aps-product-card:nth-child(9) { animation-delay: 0.45s; }
.aps-product-card:nth-child(10) { animation-delay: 0.5s; }
.aps-product-card:nth-child(11) { animation-delay: 0.55s; }
.aps-product-card:nth-child(12) { animation-delay: 0.6s; }

/* ==========================================================================
   Focus Trap Indicator
   ========================================================================== */

.aps-product-card.aps-keyboard-focus {
    outline: 3px solid var(--aps-accent-colour);
    outline-offset: 2px;
}

/* ==========================================================================
   Screen Reader Text
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ==========================================================================
   Body Lock (when popup is open)
   ========================================================================== */

body.aps-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .aps-results-grid {
        grid-template-columns: repeat(var(--aps-columns-tablet), 1fr);
    }
    
    .aps-popup-content {
        padding: 50px 30px 30px;
    }
    
    .aps-search-input {
        font-size: 20px;
        padding: 10px 0!important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .aps-results-grid {
        grid-template-columns: repeat(var(--aps-columns-mobile), 1fr);
        gap: 16px;
    }
    
    .aps-popup-content {
        padding: 50px 16px 16px;
    }

    .aps-close {
        top: 10px;
        right: 12px;
    }
    
    .aps-close svg {
        width: 28px;
        height: 28px;
    }
    
    .aps-search-input-container {
        padding: 0 16px;
        border-radius: 12px;
    }
    
    .aps-search-icon {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }
    
    .aps-search-input {
        font-size: 18px;
        padding: 10px 0!important;
    }

    .aps-search-input::placeholder {
    font-size: 15px;
    }
    
    .aps-suggestions-label {
        font-size: 12px;
        width: 100%;
        margin-bottom: 0px;
        font-weight:bolder;
    }
    
    .aps-popular-searches,
    .aps-recent-searches {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .aps-suggestion,
    .aps-recent-item {
        padding: 6px 12px;
        font-size: 12px;
    }

    
    .aps-product-info {
        padding: 12px;
    }
    
    .aps-product-name {
        font-size: 14px;
    }
    
    .aps-price-regular,
    .aps-price-sale {
        font-size: 14px;
    }
    
    .aps-badge {
        padding: 4px 8px;
        font-size: 10px;
        top: 8px;
        left: 8px;
    }
    
    .aps-badge-out-of-stock {
        right: auto;
        left: 8px;
    }
}

.aps-search-input {
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    touch-action: auto !important;
}

/* Small mobile */
@media (max-width: 400px) {
    .aps-search-input {
        font-size: 16px;
    }
}
@media (max-width: 350px) {
    .aps-results-grid {
        grid-template-columns: 1fr !important;
    }
}
