/**
 * Shop Page Styles - Product Cards, Layout, Sidebar, Search Results
 * Loaded conditionally on shop/category/tag/brand/product/search pages
 * @package flavor-starter
 */

/* ==========================================================================
   PRODUCT CARD
   ========================================================================== */
.product-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-card);
}

.product-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

/* Image Wrapper */
.product-card__image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: visible;
    background-color: var(--color-gray-50);
}

.product-card__image-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.03);
}

/* Tags - Left Side */
.product-card__tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.product-card__tag {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.product-card__tag:hover {
    filter: brightness(0.95);
    transform: translateX(2px);
}

.product-card__tag-more {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--color-white);
    border-radius: var(--radius-sm);
}

/* Cart Animation */
.product-card__cart-animation {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
    animation: fadeIn 0.2s ease;
}

.cart-fly {
    animation: cartFlyUp 1s ease forwards;
}

.cart-fly svg {
    width: 40px;
    height: 40px;
    stroke: var(--color-primary);
    stroke-width: 1.5;
}

/* Content */
.product-card__content {
    padding: 14px;
}

/* Brand */
.product-card__brand {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    margin-bottom: 4px;
    transition: color 0.15s ease;
}

.product-card__brand:hover {
    color: var(--color-accent);
}

/* Name */
.product-card__name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: auto;
}

.product-card__name a {
    color: var(--color-gray-800);
    text-decoration: none;
    transition: color 0.15s ease;
}

.product-card__name a:hover {
    color: var(--color-primary);
}

/* Price */
.product-card__price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.product-card__price {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-gray-800);
}

.product-card__price--old {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-gray-400);
    text-decoration: line-through;
}

.product-card__price--sale {
    color: var(--color-accent);
}

/* Variations (250g, 500g, 1kg buttons) */
.product-card__variations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.product-card__variations.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.product-card__variation-btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-750);
    background-color: var(--color-gray-150);
    border: 2px solid var(--color-gray-250);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-card__variation-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.product-card__variation-btn.is-selected {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* Error message for variations */
.product-card__variation-error {
    color: var(--color-error);
    font-size: 11px;
    font-weight: 500;
    margin-top: -4px;
    margin-bottom: 10px;
    padding: 6px 10px;
    background-color: var(--color-error-light);
    border-radius: 6px;
    text-align: center;
}

.product-card__variation-error.shake,
.product-card__stock-error.shake {
    animation: shake 0.5s ease;
}

.product-card__stock-error {
    color: var(--color-error);
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: var(--color-error-light);
    border-radius: 6px;
    text-align: center;
    display: none;
}

/* Actions */
.product-card__actions {
    display: flex;
    gap: 8px;
}

/* Quantity Selector */
.product-card__quantity {
    display: flex;
    align-items: center;
    background-color: var(--color-gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.product-card__quantity.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.product-card__qty-btn {
    width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-gray-600);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.product-card__qty-btn:hover:not(:disabled) {
    background-color: var(--color-gray-200);
    color: var(--color-primary);
}

.product-card__qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.product-card__qty-value {
    width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-800);
}

/* Add Button */
.product-card__add-btn {
    flex: 1;
    height: 36px;
    background: var(--gradient-primary);
    color: var(--color-white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.product-card__add-btn:hover:not(:disabled):not(.is-added) {
    background: var(--gradient-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 102, 51, 0.3);
}

.product-card__add-btn:active:not(.is-added) {
    transform: translateY(0);
}

.product-card__add-btn:disabled {
    cursor: not-allowed;
}

/* Disabled/Out of Stock State */
.product-card__add-btn--disabled {
    background: var(--color-gray-300);
    cursor: not-allowed;
    opacity: 0.7;
}

.product-card__add-btn--disabled:hover {
    background: var(--color-gray-300);
    transform: none;
    box-shadow: none;
}

/* Text visibility */
.btn-text-mobile {
    display: none;
}

.btn-text-desktop {
    display: inline;
}

/* Loading State */
.product-card__add-btn.is-loading {
    background: var(--gradient-primary);
    pointer-events: none;
}

.product-card__add-btn.is-loading .btn-text,
.product-card__add-btn.is-loading .btn-text-desktop {
    display: none;
}

.product-card__add-btn.is-loading .btn-loading {
    display: flex;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Added State */
.product-card__add-btn.is-added {
    background: var(--gradient-success);
    cursor: default;
}

.product-card__add-btn.is-added .btn-text,
.product-card__add-btn.is-added .btn-text-desktop {
    display: none;
}

.product-card__add-btn.is-added .btn-added {
    display: flex;
}

.btn-added {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    animation: popIn 0.3s ease;
}

.btn-added svg {
    width: 14px;
    height: 14px;
    animation: checkmark 0.4s ease 0.1s both;
}

/* Tags limit */
.product-card__tags .product-card__tag:nth-child(n+3) {
    display: none;
}

.product-card__tags-more {
    font-size: 11px;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-white);
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   SHOP PAGE - LAYOUT
   ========================================================================== */

/* Hide default WooCommerce sidebar */
.woocommerce-page #secondary,
.woocommerce-page .widget-area:not(.shop-sidebar),
.woocommerce-page aside:not(.shop-sidebar),
.woocommerce-page .sidebar:not(.shop-sidebar),
.archive.woocommerce #secondary,
.archive.woocommerce .widget-area:not(.shop-sidebar),
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary,
body.tax-product_tag #secondary,
.woocommerce-page .site-main aside:not(.shop-sidebar),
.woocommerce aside#secondary,
aside.widget-area:not(.shop-sidebar) {
    display: none;
}

/* Full width content */
.woocommerce-page #primary,
.woocommerce-page .content-area,
body.post-type-archive-product #primary,
body.post-type-archive-product .content-area {
    width: 100%;
    max-width: 100%;
    float: none;
    margin: 0;
}

/* Shop container */
.woocommerce-page .site-main {
    padding: 30px 0;
}

/* Products Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
    content: none;
}

.woocommerce ul.products li.product {
    margin: 0;
    padding: 0;
    float: none;
    width: 100%;
}

/* Shop title */
.woocommerce-products-header {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.woocommerce-products-header__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-black);
    margin: 0;
}

/* Results and ordering */
.woocommerce .woocommerce-result-count {
    margin: 0 0 20px;
    color: var(--color-gray-550);
    font-size: 14px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.woocommerce .woocommerce-ordering {
    max-width: 1400px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.woocommerce .woocommerce-ordering select {
    padding: 10px 14px;
    border: 1px solid var(--color-gray-250);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-gray-750);
    background: var(--color-white);
}

/* Pagination */
.woocommerce nav.woocommerce-pagination {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 0 20px;
    text-align: center;
}

.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 8px;
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--color-white);
    color: var(--color-gray-750);
    border: 1px solid var(--color-gray-250);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Breadcrumb */
.woocommerce-breadcrumb {
    max-width: 1400px;
    margin: 0 auto 20px;
    padding: 0 20px;
    font-size: 13px;
    color: var(--color-gray-550);
}

.woocommerce-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* WooCommerce messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    max-width: 1400px;
    margin: 0 auto 20px;
    padding: 15px 20px;
    border-radius: var(--radius-md);
}

/* No products found */
.woocommerce-info.woocommerce-no-products-found {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   SHOP PAGE - NUEVA ESTRUCTURA CON SIDEBAR
   ========================================================================== */

/* Page container */
.shop-page {
    background: #f8fafc;
    padding-bottom: 60px;
}

/* Breadcrumb */
.shop-breadcrumb {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-250);
}

.shop-breadcrumb__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--color-gray-550);
}

.shop-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s;
}

.shop-breadcrumb a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.shop-breadcrumb .sep {
    margin: 0 8px;
    color: var(--color-gray-400);
}

.shop-breadcrumb .current {
    color: var(--color-gray-750);
}

/* Header */
.shop-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-250);
    padding: 20px 0;
}

.shop-header__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.shop-header__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-black);
    margin: 0;
}

.shop-header__count {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--color-gray-150);
    border-radius: var(--radius-2xl);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-gray-550);
}

/* Main Layout */
.shop-layout {
    padding-top: 25px;
}

.shop-layout__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Layout without sidebar */
.shop-layout--no-sidebar .shop-layout__container {
    grid-template-columns: 1fr;
}

.shop-layout--no-sidebar .shop-products ul.products {
    grid-template-columns: repeat(4, 1fr);
}

/* Mobile-only elements: hidden on desktop */
.shop-mobile-toolbar {
    display: none;
}

.shop-sidebar-overlay {
    display: none;
}

.shop-sidebar__mobile-header {
    display: none;
}

.shop-sidebar__mobile-apply {
    display: none;
}

/* Sidebar */
.shop-sidebar {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 20px;
    position: sticky;
    top: 100px;
}

/* Active filters */
.shop-filters__active {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-gray-250);
}

.shop-filters__active-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shop-filters__active-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-gray-550);
}

.shop-filters__clear {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    cursor: pointer;
    transition: color 0.15s;
}

.shop-filters__clear:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.shop-filters__active-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-2xl);
}

.pill-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    /* Touch target mínimo 44px via padding invisible */
    position: relative;
}

.pill-remove::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
}

.pill-remove:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Filter Groups */
.shop-filters__group {
    margin-bottom: 24px;
}

.shop-filters__group:last-child {
    margin-bottom: 0;
}

.shop-filters__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-black);
    margin: 0 0 14px 0;
}

/* Mobile: Make filter title clickable accordion toggle */
@media (max-width: 1024px) {
    .shop-filters__title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 14px 0;
        margin: 0;
        cursor: pointer;
        border-bottom: 1px solid var(--color-gray-200);
    }

    .shop-filters__title::after {
        content: '';
        width: 10px;
        height: 10px;
        border-right: 2px solid var(--color-gray-500);
        border-bottom: 2px solid var(--color-gray-500);
        transform: rotate(45deg);
        transition: transform 0.3s ease;
        margin-top: -4px;
    }

    .shop-filters__group.is-active .shop-filters__title::after {
        transform: rotate(-135deg);
        margin-top: 4px;
    }
}

.shop-filters__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Mobile: Collapse filter list by default */
@media (max-width: 1024px) {
    .shop-filters__list {
        display: none;
        padding: 10px 0;
    }

    .shop-filters__group.is-active .shop-filters__list {
        display: flex;
    }
}

/* Filter Item / Checkbox */
.shop-filters__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 0 -10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s;
}

.shop-filters__item:hover {
    background: var(--color-gray-50);
}

.shop-filters__item input[type="checkbox"] {
    display: none;
}

.shop-filters__checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    position: relative;
    transition: all 0.15s;
    flex-shrink: 0;
}

.shop-filters__item input:checked+.shop-filters__checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.shop-filters__item input:checked+.shop-filters__checkbox::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid var(--color-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.shop-filters__label {
    flex: 1;
    font-size: 14px;
    color: var(--color-gray-750);
}

.shop-filters__count {
    font-size: 13px;
    color: var(--color-gray-400);
}

/* Items ocultos (Ver más) */
.shop-filters__item--hidden {
    display: none;
}

.shop-filters__group.is-expanded .shop-filters__item--hidden {
    display: flex;
}

/* Botón Ver más / Ver menos */
.shop-filters__toggle {
    display: block;
    width: 100%;
    padding: 6px 0;
    margin-top: 4px;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s ease;
}

.shop-filters__toggle:hover {
    color: var(--color-accent);
}

/* Products Grid */
.shop-products {
    min-height: 400px;
}

.shop-products ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-products ul.products::before,
.shop-products ul.products::after {
    display: none;
    content: none;
}

.shop-products li.product {
    margin: 0;
    padding: 0;
    float: none;
    width: 100%;
}

/* No products */
.shop-no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    color: var(--color-gray-550);
}

.shop-no-products p {
    margin: 0 0 20px;
    font-size: 15px;
}

.shop-btn-reset {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.shop-btn-reset:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
}

/* Pagination inside products */
.shop-products nav.woocommerce-pagination {
    margin-top: 30px;
    grid-column: 1 / -1;
}

/* Loading state */
.shop-products.is-loading {
    opacity: 0.5;
    pointer-events: none;
}


/* ==========================================================================
   RESPONSIVE - SHOP PRODUCTS (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
    .shop-products ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   TOUCH DEVICES
   ========================================================================== */
@media (hover: none) {
    .product-card:hover {
        box-shadow: var(--shadow-card);
        transform: none;
    }

    .product-card:hover .product-card__image {
        transform: none;
    }

    .product-card__add-btn:hover:not(:disabled):not(.is-added) {
        transform: none;
        box-shadow: none;
    }

    /* Active state for touch */
    .product-card__add-btn:active:not(:disabled):not(.is-added) {
        background: var(--gradient-primary-hover);
        transform: scale(0.98);
    }

    .product-card__qty-btn:active:not(:disabled) {
        background-color: var(--color-gray-200);
        color: var(--color-primary);
    }
}


/* ==========================================================================
   SEARCH RESULTS - GENERAL (Non-product searches)
   ========================================================================== */
.search-results-general {
    display: grid;
    gap: 20px;
}

.search-result-card {
    display: flex;
    gap: 20px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

.search-result-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.search-result-card__image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-gray-100);
}

.search-result-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-card__content {
    flex: 1;
    min-width: 0;
}

.search-result-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-black);
    margin: 0 0 10px;
    line-height: 1.3;
}

.search-result-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-result-card__title a:hover {
    color: var(--color-primary);
}

.search-result-card__excerpt {
    font-size: 14px;
    color: var(--color-gray-550);
    line-height: 1.6;
    margin-bottom: 12px;
}

.search-result-card__excerpt p {
    margin: 0;
}

.search-result-card__link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: var(--color-white);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.search-result-card__link:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .search-result-card {
        flex-direction: column;
        gap: 15px;
    }

    .search-result-card__image {
        width: 100%;
        height: 180px;
    }

    .search-result-card__title {
        font-size: 16px;
    }
}

/* ==========================================================================
   MOBILE SHOP LAYOUT (max-width: 768px)
   IMPORTANT: This MUST be at the end of the file to override base styles
   ========================================================================== */
@media (max-width: 768px) {
    /* Hide breadcrumb on mobile */
    .shop-breadcrumb {
        display: none;
    }

    /* Show mobile toolbar */
    .shop-mobile-toolbar {
        display: block;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-gray-250);
        position: sticky;
        top: var(--header-height, 70px);
        z-index: 50;
    }

    .shop-mobile-toolbar__container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 10px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .shop-mobile-toolbar__sort {
        flex: 1;
    }

    .shop-mobile-toolbar__select {
        width: 100%;
        padding: 10px 14px;
        border: 2px solid var(--color-gray-250);
        border-radius: var(--radius-md);
        font-size: 14px;
        font-weight: 500;
        color: var(--color-gray-750);
        background: var(--color-white);
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2 4 6 8 10 4'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 32px;
    }

    .shop-mobile-toolbar__filter-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        background: var(--color-primary);
        color: var(--color-white);
        font-size: 14px;
        font-weight: 600;
        border: none;
        border-radius: var(--radius-md);
        cursor: pointer;
        white-space: nowrap;
    }

    .shop-mobile-toolbar__filter-btn:active {
        opacity: 0.9;
    }

    .shop-mobile-toolbar__filter-btn svg {
        stroke: var(--color-white);
    }

    .shop-mobile-toolbar__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        background: var(--color-accent);
        color: var(--color-white);
        font-size: 11px;
        font-weight: 700;
        border-radius: var(--radius-full);
    }

    /* Sidebar: hidden by default, slide-in panel when opened */
    .shop-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 85vw);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: none;
        padding: 0 20px 20px;
    }

    .shop-sidebar.is-open {
        display: block;
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    /* Overlay */
    .shop-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .shop-sidebar-overlay.is-visible {
        display: block;
    }

    /* Mobile header inside sidebar */
    .shop-sidebar__mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 0;
        border-bottom: 1px solid var(--color-gray-250);
        margin-bottom: 16px;
        position: sticky;
        top: 0;
        background: var(--color-white);
        z-index: 1;
    }

    .shop-sidebar__mobile-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--color-black);
    }

    .shop-sidebar__mobile-close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-gray-600);
        border-radius: var(--radius-md);
    }

    .shop-sidebar__mobile-close:active {
        background: var(--color-gray-100);
    }

    /* Apply button at bottom of sidebar */
    .shop-sidebar__mobile-apply {
        display: block;
        padding: 16px 0;
        margin-top: 20px;
        border-top: 1px solid var(--color-gray-250);
        position: sticky;
        bottom: 0;
        background: var(--color-white);
    }

    .shop-sidebar__apply-btn {
        width: 100%;
        padding: 14px;
        background: var(--gradient-primary);
        color: var(--color-white);
        font-size: 15px;
        font-weight: 600;
        border: none;
        border-radius: var(--radius-md);
        cursor: pointer;
    }

    .shop-sidebar__apply-btn:active {
        opacity: 0.9;
    }

    /* Shop header compact */
    .shop-header {
        padding: 12px 0;
    }

    .shop-header__container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 0 15px;
    }

    .shop-header__title {
        font-size: 20px;
    }

    .shop-header__count {
        font-size: 12px;
        padding: 4px 10px;
    }

    /* Shop layout - CRITICAL: override 280px 1fr grid */
    .shop-layout {
        padding-top: 15px;
    }

    .shop-layout__container {
        grid-template-columns: 1fr;
        padding: 0 12px;
        gap: 0;
    }

    /* Products grid - 2 columns on mobile */
    .shop-products ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ==========================================================================
   MOBILE TINY (max-width: 400px) - Single column products
   ========================================================================== */
@media (max-width: 400px) {
    .shop-products ul.products {
        grid-template-columns: 1fr;
    }
}
