/**
 * Southern Mark Shop Styles
 * Organized by visual order from top to bottom, left to right
 */

/* ==========================================================================
   1. MAIN CONTAINER
   ========================================================================== */

.sm-shop {
    display: flex;
    gap: 2rem;
    margin: 0 auto;
    flex-direction: column;
}


/* ==========================================================================
   2. FILTERS SECTION (LEFT SIDEBAR)
   ========================================================================== */

/* 2.1 Filters Container
   ========================================================================== */

.sm-shop__filters {
    flex: 0 0 300px;
    background: var(--sm-green-2);
    border-radius: 8px;
    padding: 1.5rem;
}


/* 2.2 Filters Header
   ========================================================================== */

.sm-shop__filters__header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.sm-shop__filters__header__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--sm-black);
    flex-shrink: 0;
}

/* 2.2.2 Search Field
   ========================================================================== */

.sm-shop__search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

input.sm-shop__search__input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.25rem;
    border: 1px solid var(--sm-green-2);
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

input.sm-shop__search__input:focus {
    outline: none;
    border-color: var(--sm-blue);
}

.sm-shop__search__clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--sm-gray);
    font-size: 1.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.sm-shop__search__clear:hover {
    color: var(--sm-red);
}

.sm-shop__search__suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--sm-green-2);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sm-shop__search__suggestion {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--sm-green);
    transition: background 0.2s ease;
}

.sm-shop__search__suggestion:hover {
    background: var(--sm-green-2);
}

.sm-shop__search__suggestion:last-child {
    border-bottom: none;
}

.sm-shop__search__suggestion__title {
    font-weight: 500;
    color: var(--sm-black);
    margin-bottom: 0.25rem;
}

.sm-shop__search__suggestion__meta {
    font-size: 0.75rem;
    color: var(--sm-gray);
}

.sm-shop__filters__header__description {
    margin-bottom: 1rem;
}

.sm-shop__filters__header__description p {
    font-size: 0.875rem;
    color: var(--sm-gray);
    margin: 0;
    line-height: 1.5;
}


/* 2.2.1 Filters Header Actions
   ========================================================================== */

.sm-shop__filters__header__actions {
    display: flex;
    justify-content: center;
    gap: 1em;
}

.sm-shop__filters__header__actions__button {
    padding: 1em 3em;
    background: var(--sm-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s ease;
    /* width: 100%; */
    /* max-width: 50%; */
}

.sm-shop__filters__header__actions__button:hover {
    background: var(--sm-blue-2);
}

.sm-shop__filters__header__actions__button:active {
    background: var(--sm-blue-2);
}

.sm-shop__filters__header__actions__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 2.3 Filters Content Container
   ========================================================================== */

.sm-shop__filters__content {
    display: flex;
    flex-direction: column;
    max-inline-size: 100%;
    gap: 1em;
}


/* 2.3.1 Grid Section
   ========================================================================== */
.sm-shop__filters__grid {
    --gap: 0.5rem;
    gap: var(--gap);
    display: grid;
    grid-template-columns: repeat(3, calc(33% - (.5*var(--gap))));
    flex-grow: 1;
    justify-content: space-between;
}

/* When there are only 2 filters (shapes disabled), make the second one span 2 columns */
.sm-shop__filters__grid .sm-shop__filters__content__filter:last-child:nth-child(2) {
    grid-column: 2 / 4;
}


/* 2.3.2 Flex Section
   ========================================================================== */
.sm-shop__filters__flex {
    display: flex;
     /* Aligns items to the start of the main axis (left) */
    justify-content: center;
    gap: 1.5rem;
}

.sm-shop__filters__flex .sm-shop__filters__content__filter__content {
    display: flex;
    align-items: center;
}


/* 2.4 Individual Filter Block
   ========================================================================== */
.sm-shop__filters__content__filter {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;
    max-inline-size: 100%;
    flex-direction: row;
    overflow: hidden;
}


/* 2.5 Filter Header
   ========================================================================== */

.sm-shop__filters__content__filter__header {
    /* No specific styles - structural element */
    text-align: center;
    position: relative;
}

.sm-shop__filters__content__filter__header__title {
    font-size: 1.125rem;
    font-weight: 600;
    /* margin: 0 0 1.3rem 0; */
    color: var(--sm-black);;
    padding-bottom: 0;
}

.sm-shop__filters__content__filter__header__description{
    color: var(--sm-gray);
    font-size: 12px;
}

.sm-shop__filters__content__filter--buttons .sm-shop__filters__content__filter__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sm-shop__filters__content__filter--buttons .sm-shop__filters__content__filter__header__title {
    margin: 0;
    padding: 0;
}

.sm-shop__filters__content__filter__header__clear {
    border: none;
    background: none;
    color: var(--sm-blue);;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 3px;
    position: absolute;
    top: 0;
    right: 0;
    font-style: oblique;
}


/* 2.6 Filter Content (Terms Flex Container)
   ========================================================================== */

.sm-shop__filters__content__filter__content {
    --gap:.5em;
    --min: 81px;
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--min),1fr));
    gap:var(--gap);
    justify-content:start;
    min-inline-size: calc(2*var(--min) + 2*var(--gap));
    flex-wrap: wrap;
    max-height: 190px;
    overflow-y: auto;
    padding-top: 2px;
    padding-bottom: 3rem;
    transition: max-height 0.5s ease-out;
}

.sm-shop__filters__content__filter__content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8em; /* The height of the transparent gradient */
    pointer-events: none; /* Allows interaction with content underneath */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)); /* Adjust colors as needed */
  /* For better cross-browser compatibility, consider adding vendor prefixes */
    -webkit-mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    margin-bottom: 1rem;
}

.sm-shop__filters__content__filter__content.expanded::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)); /* Adjust colors as needed */
  /* For better cross-browser compatibility, consider adding vendor prefixes */
    -webkit-mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

.sm-shop__filters__content__filter__content.expanded {
    max-height: 1000px;
}

.sm-shop__filters__content__filter__content.no-button {
    padding-bottom: 0;
}

.sm-shop__filters__content__filter__content.no-button::after {
    background: none;
}

.sm-shop__filters__content__filter--buttons .sm-shop__filters__content__filter__content {
    gap: 1rem;
}

.sm-shop__filters__content__filter__content__terms {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5em;
}

/* Filter section needs relative positioning for absolute button */
.sm-shop__filters__content__filter {
    position: relative;
}

.sm-shop__filters__content__filter.product_tag {
    display: none!important;
}

/* Expand/Shrink Button */
.sm-shop__filter__expand-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(100, 100, 100, 0.125);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s ease, opacity 0.2s ease;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.sm-shop__filter__expand-btn:hover {
    background: rgba(200, 200, 200, 0.4);
}

.sm-shop__filter__expand-btn.expanded {
}

.sm-shop__filter__expand-btn__icon {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.sm-shop__filter__expand-btn.expanded .sm-shop__filter__expand-btn__icon {
    transform: rotate(180deg);
}


/* 2.7 Individual Filter Term
   ========================================================================== */

.sm-shop__filters__content__filter__content__term {
 box-sizing:border-box;
 min-inline-size:0;     /* allow shrinking to track */
 min-block-size:0;
 display:flex;
 flex-direction:column;
 align-items:center;
 gap:.4rem;
 border: 1px solid var(--sm-green);
 border-radius:6px;
 padding:.5rem;
 text-align:center;
 max-inline-size: 100%;
 cursor: pointer;
}

/* ensure *children* can also shrink inside the card */
.sm-shop__filters__content__filter__content__term *{
}

button.sm-shop__filters__content__filter__content__term {
    padding: .75em 1.5em;
    font-weight: 500;
    font-size: .75rem;
    border: 1px solid var(--sm-green);
    flex-shrink: 1;
    flex-basis: auto;
    align-self: auto;
    flex-grow: 1;
    flex-direction: row;
    justify-content: center;
    max-width: 33.333%;
}

.sm-shop__filters__content__filter__content__term:hover {
    border-color: var(--sm-yellow);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sm-shop__filters__content__filter__content__term:active {
    transform: translateY(0);
}

.sm-shop__filters__content__filter__content__term.active {
    border-color: var(--sm-blue);
    background: #f0f8ff;
}


/* 2.8 Filter Term Image
   ========================================================================== */

.sm-shop__filters__content__filter__content__term__image {
inline-size:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:4px;
  background:#f5f5f5;
  display:block;  
}

.sm-shop__filters__content__filter__content__term__image img {
max-inline-size:100%;
  block-size:100%;
  object-fit:contain;    /* or 'cover' */
  display:block;
}

/* 2.9 Filter Term Title
   ========================================================================== */

.sm-shop__filters__content__filter__content__term__title {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    color: var(--sm-black);
    padding: 0;
    overflow-wrap: anywhere;
}

/* 2.10 Filter Count
   ========================================================================== */

.sm-shop__filter-count {
    font-size: 0.75rem;
    color: var(--sm-gray);
    font-weight: 400;
    white-space: nowrap;
}


/* 2.11 Filter Term Description
   ========================================================================== */

.sm-shop__filters__content__filter__content__term__description {
    font-size: 0.625rem;
    color: var(--sm-gray);
    margin: 0.25rem 0 0 0;
    line-height: 1.2;
}


/* ==========================================================================
   3. PRODUCTS SECTION (RIGHT MAIN CONTENT)
   ========================================================================== */

/* 3.1 Products Container
   ========================================================================== */

.sm-shop__products {
    background: var(--sm-green-2);
    border-radius: 8px;
    padding: 1.5rem;
}


/* 3.2 Products Header
   ========================================================================== */

.sm-shop__products__header {
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--sm-green-2);;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.sm-shop__products__header__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--sm-black);
}

.sm-shop__products__header__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex: 1;
}

/* 3.2.1 Sort Dropdown
   ========================================================================== */

.sm-shop__sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    order: 2;
    flex-shrink: 0;
}

.sm-shop__sort__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sm-gray);
    margin: 0;
}

.sm-shop__sort__select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 2px solid var(--sm-green);
    border-radius: 4px;
    font-size: 0.875rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
}

.sm-shop__sort__select:focus {
    outline: none;
    border-color: var(--sm-blue);
}

.sm-shop__sort__select:hover {
    border-color: var(--sm-green-2);
}

.sm-shop__products__header__pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    order: 1;
    flex: 1;
    justify-content: center;
}

/* When pagination is hidden (infinite mode), align sort to the right */
.sm-shop__products__header__pagination:empty + .sm-shop__sort {
    margin-left: auto;
}


/* 3.3 Products Flex Container
   ========================================================================== */

.sm-shop__products__content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    transition: opacity 0.3s ease, transform 0.4s ease, height 1s ease;
    overflow: hidden;
}

.sm-shop__products__content.loading {
    opacity: 0.5;
}

/* Page transition animation */
.sm-shop__products__content.page-transitioning {
    transform: translateY(-30px);
    opacity: 0;
}

.sm-shop__products__content .sm-shop__product {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Infinite scroll loading animation */
.sm-shop__product--loading {
    opacity: 0;
}

.sm-shop__products__content.loading-more .sm-shop__product--loading {
    animation: fadeInProduct 0.6s ease forwards;
}

@keyframes fadeInProduct {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading placeholder cards */
.sm-shop__product--loading-placeholder {
    background: #f9f9f9;
    border: 2px dashed var(--sm-green-2);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    opacity: 0;
    animation: fadeInSlow 1s ease forwards;
}

.sm-shop__product__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.sm-shop__product__loading__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--sm-green);
    border-top-color: var(--sm-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.sm-shop__product__loading__text {
    font-size: 0.875rem;
    color: var(--sm-gray);
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* 3.4 Individual Product Card
   ========================================================================== */

.sm-shop__product {
    background: #fff;
    border: 1px solid var(--sm-green);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: default;
    flex: 0 0 auto;
    width: calc(20% - 1rem); /* 3 items per row with gap */
    display: flex;
    flex-direction: column;
}

.sm-shop__product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.sm-shop__product:active {
    transform: translateY(-2px);
}

.sm-shop__product.template {
    display: none;
}


/* 3.5 Product Image
   ========================================================================== */

.sm-shop__product__image {
    width: calc(100% - 20px);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    border: 1px solid var(--sm-green);
    margin: 10px;
    border-radius: 4px;
}

.sm-shop__product__image img {
    object-fit: contain;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px;
}


/* 3.6 Product Info Container
   ========================================================================== */

.sm-shop__product__info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}


/* 3.7 Product Title
   ========================================================================== */

.sm-shop__product__info__title {
    font-size: 1.125rem;
    font-weight: 600;
    /* margin: 0 0 0.5rem 0; */
    color: var(--sm-black);
    /* line-height: 1.4; */
    padding-bottom: 0;
    font-size: 1em;
    font-weight: 400;
}


/* 3.8 Product Description
   ========================================================================== */

.sm-shop__product__info__description {
    font-size: 0.875rem;
    color: var(--sm-black);
    /* margin: 0 0 0.75rem 0; */
    line-height: 1.5;
    flex: 1;
    font-weight: 800;
}


/* 3.9 Product Price
   ========================================================================== */

.sm-shop__product__info__price {
    font-weight: 700;
    margin: 0;
    color: var(--sm-blue);
    margin-top: auto;
    margin-bottom: .5em;
}

.sm-shop__product__info__price del {
    color: var(--sm-red);
}


/* 3.10 Product Actions
   ========================================================================== */

.sm-shop__product__info__actions {
    margin-top: 10px;
}

.sm-shop__product__info__actions__button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--sm-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s ease;
    display: block;
    text-align: center;
    text-decoration: none;
}

.sm-shop__product__info__actions__button:hover {
    background: var(--sm-blue-2);
}

.sm-shop__product__info__actions__button:active {
    background: var(--sm-blue-2);
}


/* ==========================================================================
   4. UTILITY STATES
   ========================================================================== */

/* 4.1 Loading Overlay
   ========================================================================== */

.sm-shop__loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: all;
}

.sm-shop__loading-overlay.active {
    display: flex;
}

.sm-shop__loading-overlay__content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.sm-shop__loading-overlay__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--sm-green);
    border-top-color: var(--sm-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.sm-shop__loading-overlay__text {
    font-size: 1rem;
    color: var(--sm-gray);
    margin: 0;
}

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


/* 4.2 No Products Message
   ========================================================================== */

.sm-shop__products__content .no-products {
    flex: 1 1 100%;
    text-align: center;
    padding: 3rem 1rem !important;
    font-size: 1.125rem;
    color: var(--sm-gray);
    background: #f9f9f9;
    border-radius: 8px;
    margin: 0;
}

/* 4.4 Pagination
   ========================================================================== */

.sm-shop__pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    flex: 1 1 100%;
}

.sm-shop__pagination__item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    background: #fff;
    border: 1px solid var(--sm-green);
    border-radius: 4px;
    color: var(--sm-black);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-shop__pagination__item:hover {
    border-color: var(--sm-blue-2);
    color: var(--sm-blue);
}

.sm-shop__pagination__item.active {
    background: var(--sm-blue);
    border-color: var(--sm-blue);
    color: #fff;
    cursor: default;
}

.sm-shop__pagination__item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.sm-shop__pagination__ellipsis {
    padding: 0 0.5rem;
    color: #999;
    font-weight: 500;
}


/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* 5.1 Tablet Landscape (1024px and below)
   ========================================================================== */

@media (max-width: 1024px) {
    .sm-shop {
        flex-direction: column;
    }
    
    .sm-shop__filters {
        flex: 1;
        max-width: 100%;
    }
    
    .sm-shop__filters__content__filter__content__term {
        /* width: calc(25% - 0.5625rem); */ /* Keep 4 items per row */
    }
    
    .sm-shop__product {
        width: calc(33% - 0.75rem); /* 3 items per row */
    }
}


/* 5.2 Tablet Portrait (768px and below)
   ========================================================================== */

@media (max-width: 768px) {
    .sm-shop {
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .sm-shop__filters__header__top {
        flex-direction: column;
        gap: 0;
    }

    .sm-shop__search input {
        padding: 1em;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .sm-shop__filters {
        padding: 1.25rem;
    }

    .sm-shop__filters__grid {
        display: flex;
        flex-direction: column;
    }

    .sm-shop__filters__content__filter{
        max-height:unset;
    }
    
    /* Better filter term sizing on tablet */
    .sm-shop__filters__content__filter__content__term {
        min-height: 50px;
        padding: 0.625rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Touch-friendly buttons */
    .sm-shop__filters__content__filter--buttons .sm-shop__filters__content__filter__content__term {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .sm-shop__product {
        width: calc(50% - 0.5rem);
    }

    .sm-shop__products__header {
        flex-direction: column;
        gap: 0;
    }

    .sm-shop__products__header__controls {
        flex-direction: column;
        gap: 1rem; /* Add spacing between sort and pagination */
    }
    
    .sm-shop__filters__content__filter--buttons .sm-shop__filters__content__filter__header{
        display: block;
    }
    
    .sm-shop__filters__content__filter--buttons .sm-shop__filters__content__filter__content {
        justify-content: center;
    }
}


/* 5.3 Mobile (480px and below)
   ========================================================================== */

@media (max-width: 480px) {
    .sm-shop {
        padding: 1rem 0.5rem;
        gap: 1rem;
    }
    
    .sm-shop__filters {
        padding: 1rem;
    }
    
    .sm-shop__filters__header__title {
        font-size: 1.25rem;
    }
    
    .sm-shop__products__header__title {
        font-size: 1.5rem;
    }
    
    .sm-shop__products__content {
        gap: 1rem;
    }
    
    /* Fix text cutoff in filter buttons */
    .sm-shop__filters__content__filter__content__term {
        width: 100%; /* Full width on mobile to prevent text cutoff */
        min-height: 60px; /* Ensure enough height for text */
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: none; /* Disable hyphenation for cleaner look */
    }
    
    /* Make filter images square and fill the gray box area on mobile */
    .sm-shop__filters__content__filter__content__term__image {
        width: 100%;
        aspect-ratio: 1 / 1; /* Force square shape */
        margin-bottom: 0.5rem;
    }
    
    .sm-shop__filters__content__filter__content__term__image img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* Keep full image visible within square */
    }
    
    /* Improve search box on mobile */
    .sm-shop__search input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.875rem 1rem;
    }
    
    /* Better filter section spacing */
    .sm-shop__filters__content__filter {
        margin-bottom: 1.25rem;
    }
    
    /* Improve filter headers */
    .sm-shop__filters__content__filter__header {
        padding: 0.75rem 0;
        font-size: 1rem;
    }
    
    /* Better button sizing for brands/tags - make them wider */
    .sm-shop__filters__content__filter--buttons .sm-shop__filters__content__filter__content__term {
        width: 100%; /* Full width for brand buttons */
        min-height: 44px; /* Touch-friendly */
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        text-align: left; /* Align text to left for better readability */
    }
    
    /* Improve pagination on mobile */
    .sm-shop__products__pagination {
        gap: 0.25rem;
    }
    
    .sm-shop__products__pagination button {
        min-width: 40px;
        min-height: 40px;
        font-size: 0.875rem;
    }
    
    /* Single column products */
    .sm-shop__product {
        width: 100%; /* 1 item per row */
    }
    
    /* Improve product card spacing */
    .sm-shop__product__info {
        padding: 1rem;
    }
    
    .sm-shop__product__info__title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .sm-shop__product__info__description {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    /* Clear All Filters button */
    .sm-shop__filters__clear {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        margin-top: 1rem;
    }
}

/* Temporarily hide Tags filter */
.sm-shop__filters__content > div:has(h3:contains('Tags')) { display: none \!important; }

/* Temporarily hide Tags filter - using adjacent sibling selector */
.sm-shop__filters__content > div:nth-last-child(2) {
    display: none \!important;
}

/* ==========================================================================
   SKELETON LOADERS
   ========================================================================== */

.sm-shop__product--skeleton {
    pointer-events: none;
}

.sm-shop__skeleton {
    background: #e5e7eb;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Skeleton image - uses WooCommerce placeholder */
.sm-shop__product--skeleton .sm-shop__product__image {
    background: var(--sm-gray);
    border: 1px solid var(--sm-green);
    position: relative;
    overflow: hidden;
}

.sm-shop__product--skeleton .sm-shop__product__image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23d1d5db" width="100" height="100"/><path fill="%23ffffff" d="M50 20 L80 80 L20 80 Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
}

/* Skeleton text blocks */
.sm-shop__skeleton--title {
    height: 20px;
    width: 80%;
    margin-bottom: 12px;
}

.sm-shop__skeleton--text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.sm-shop__skeleton--text.sm-shop__skeleton--short {
    width: 60%;
}

.sm-shop__skeleton--price {
    height: 24px;
    width: 40%;
    margin-bottom: 12px;
    margin-top: 12px;
}

.sm-shop__skeleton--button {
    height: 40px;
    width: 100%;
    border-radius: 4px;
}

/* Shimmer animation */
.sm-shop__skeleton__shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 40%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.2) 60%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
    animation-delay: var(--shimmer-delay, 0s);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Ensure skeleton loaders maintain product grid layout */
.sm-shop__product--skeleton .sm-shop__product__info {
    padding: 1rem;
}
