/* ==========================================================================
   Tienda Online - Módulo de catálogo público
   Extiende las variables definidas en main.css (:root)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, var(--primary) 55%, #3b82f6 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 56px 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.85;
    margin: 0 0 8px;
}

.hero h1 {
    font-size: 2.4rem;
    margin: 0 0 12px;
    max-width: 640px;
}

.hero-text {
    font-size: 1.05rem;
    max-width: 560px;
    opacity: 0.95;
    margin: 0 0 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero .btn-outline {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: #fff;
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.catalog-section {
    margin-bottom: 40px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-head h2 {
    font-size: 1.5rem;
    margin: 0;
}

.section-link {
    font-weight: 600;
    font-size: 0.9rem;
}

.muted {
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Grid de categorías
   -------------------------------------------------------------------------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.category-carousel {
    position: relative;
}

.category-carousel .category-grid {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 2px 2px 10px;
}

.category-carousel .category-grid::-webkit-scrollbar {
    display: none;
}

.category-carousel .category-card {
    flex: 0 0 clamp(210px, 22vw, 270px);
    scroll-snap-align: start;
}

.category-carousel-controls {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 8px;
}

.category-carousel-controls[hidden] {
    display: none;
}

.category-carousel-button {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 8px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--white);
    color: var(--dark);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.category-carousel-button:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.category-carousel-button:disabled {
    opacity: .45;
    cursor: default;
}

.category-carousel-button svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 560px) {
    .category-carousel .category-card {
        flex-basis: min(78vw, 270px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-carousel .category-grid {
        scroll-behavior: auto;
    }
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: var(--dark);
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.category-card .category-media {
    position: relative;
    display: block;
    flex: 0 0 var(--category-image-height, 150px);
    width: 100%;
    height: var(--category-image-height, 150px);
    background: var(--categories-image-background, #fff);
}

.category-card .category-media.img-ph img {
    object-fit: var(--category-image-fit, contain);
}

.category-card .category-media .img-initials {
    color: #64748b;
}

.category-card .category-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 70px;
    padding: 12px 16px;
    border-top: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .96);
}

.category-card .category-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #101828 !important;
    line-height: 1.25;
}

.category-card .category-meta {
    font-size: 0.8rem;
    color: #475467 !important;
    opacity: 1;
    line-height: 1.3;
}

/* Vista previa AJAX del buscador de la cabecera. */
.has-search-suggestions {
    position: relative;
    z-index: 50;
}

.search-suggestions {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    max-height: min(70vh, 440px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 16px 40px rgb(15 23 42 / 18%);
}

.search-suggestions[hidden] {
    display: none;
}

.search-suggestion {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
}

.search-suggestion:hover,
.search-suggestion:focus,
.search-suggestion[aria-selected="true"] {
    outline: none;
    background: var(--bg);
    text-decoration: none;
}

.search-suggestion img,
.search-suggestion-placeholder {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 7px;
    background: #eef2f7;
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 700;
    object-fit: contain;
}

.search-suggestion-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.search-suggestion-name {
    overflow: hidden;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.search-suggestion-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    color: var(--primary);
    font-size: .9rem;
    font-weight: 700;
}

.search-suggestion-regular {
    color: #64748b;
    font-size: .8rem;
    font-weight: 400;
    text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   Placeholder de imágenes (las imágenes demo no existen en disco)
   -------------------------------------------------------------------------- */
.img-ph {
    position: relative;
    background: #fff;
    overflow: hidden;
}

.img-ph .img-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    user-select: none;
}

.img-ph .img-initials[hidden] {
    display: none;
}

.img-ph img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Grid y tarjeta de producto
   -------------------------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--products-background, var(--white));
    border: 1px solid var(--products-border, var(--border));
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    color: var(--products-text, var(--dark));
    font-family: var(--products-font, var(--font-body));
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--products-hover, #cbd5e1);
}

.product-card.is-out {
    opacity: 0.85;
}

.product-img {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.product-img.img-ph {
    background: #fff;
}

.product-img:hover {
    text-decoration: none;
}

.product-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px 18px;
}

.product-cat {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
}

.product-name {
    font-size: 1rem;
    margin: 0;
    line-height: 1.35;
}

.product-name a {
    color: var(--products-title, var(--dark));
}

.product-name a:hover {
    color: var(--products-hover, var(--primary));
    text-decoration: none;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 6px;
}

.price-now {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--products-price, var(--dark));
}

.price-old {
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   Badges de oferta / agotado
   -------------------------------------------------------------------------- */
.badge-sale,
.badge-out {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
}

.badge-sale {
    background: var(--danger);
}

.badge-out {
    background: var(--dark);
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 16px;
	padding-top: 10px;
}

.breadcrumb .sep {
    color: #cbd5e1;
}

.breadcrumb .current {
    color: var(--dark);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Cabecera de catálogo
   -------------------------------------------------------------------------- */
.catalog-head {
    margin-bottom: 20px;
}

.catalog-head h1 {
    font-size: 1.9rem;
    margin: 0 0 6px;
}

.catalog-desc {
    color: var(--muted);
    margin: 0 0 6px;
    max-width: 720px;
}

.catalog-count {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.subcategory-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.chips-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 500;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Layout catálogo (sidebar + resultados)
   -------------------------------------------------------------------------- */
.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.catalog-sidebar {
    position: sticky;
    top: 88px;
}

.catalog-filters {
    margin-bottom: 0;
}

.filters-title {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

.filter-group {
    margin-bottom: 14px;
}

.filter-group label {
    margin-bottom: 4px;
}

.btn-block {
    width: 100%;
    margin-top: 4px;
}

.filter-reset {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
}

.catalog-layout-flat { grid-template-columns: minmax(0, 1fr); }
.catalog-filters-toolbar { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); align-items: end; gap: 12px; margin: 0 0 20px; padding: 16px; }
.catalog-filters-toolbar .filters-title { grid-column: 1 / -1; margin: 0; font-size: 1rem; }
.catalog-filters-toolbar .filter-group { min-width: 0; margin: 0; }
.catalog-filters-toolbar .filter-group label { font-size: .8rem; }
.catalog-filters-toolbar .filter-group input,
.catalog-filters-toolbar .filter-group select { min-width: 0; width: 100%; }
.catalog-filters-toolbar > button { white-space: nowrap; }
.catalog-filters-toolbar .filter-reset { display: inline-block; margin: 0; white-space: nowrap; }

.category-tree { padding: 18px; }
.category-tree h2 { margin: 0 0 12px; font-size: 1.05rem; }
.category-tree-list,
.category-tree-list ul { margin: 0; padding: 0; list-style: none; }
.category-tree-item { padding: 7px 0; border-top: 1px solid var(--border); }
.category-tree-line { position: relative; display: flex; flex-wrap: wrap; align-items: center; }
.category-tree-line > a { display: block; width: calc(100% - 30px); padding: 3px 0; color: var(--text); font-weight: 600; }
.category-tree-line > a:hover,
.category-tree-item.is-current > .category-tree-line > a { color: var(--primary); text-decoration: none; }
.category-tree-branch { display: contents; }
.category-tree-branch > summary { position: absolute; z-index: 1; top: 0; right: 0; display: grid; width: 28px; height: 30px; place-items: center; border-radius: 5px; color: var(--muted); cursor: pointer; list-style: none; }
.category-tree-branch > summary::-webkit-details-marker { display: none; }
.category-tree-branch > summary::after { content: '›'; font-size: 23px; line-height: 1; transition: transform .15s ease; }
.category-tree-branch[open] > summary::after { transform: rotate(90deg); }
.category-tree-branch > ul { display: none; flex: 0 0 100%; width: 100%; padding: 2px 0 0 14px; }
.category-tree-branch[open] > ul { display: block; }
.category-tree-branch .category-tree-line > a { font-size: .92rem; font-weight: 500; }

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state h2 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Paginación
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.page-link.is-current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Ficha de producto
   -------------------------------------------------------------------------- */
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
    margin-bottom: 48px;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.gallery-main .img-initials {
    font-size: 4rem;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    cursor: pointer;
    overflow: hidden;
}

.gallery-thumb .img-initials {
    font-size: 1.4rem;
}

.gallery-thumb.is-active {
    border-color: var(--primary);
}

.gallery-thumb:hover {
    border-color: var(--primary);
}

.product-info {
    min-width: 0;
}

.product-title {
    font-size: 1.8rem;
    margin: 6px 0 12px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.rating-text {
    font-size: 0.88rem;
    color: var(--muted);
}

/* Estrellas CSS: base gris + relleno dorado por ancho % */
.stars {
    position: relative;
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    font-family: system-ui, sans-serif;
    color: #cbd5e1;
    letter-spacing: 2px;
}

.stars::before {
    content: "\2605\2605\2605\2605\2605";
}

.stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #f59e0b;
}

.stars-fill::before {
    content: "\2605\2605\2605\2605\2605";
}

.product-detail-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 12px 0;
}

.product-detail-price .price-now {
    font-size: 1.9rem;
}

.product-detail-price .price-old {
    font-size: 1.1rem;
}

.product-short {
    color: var(--muted);
}

/* Ficha más compacta: agrupa mejor los datos y da protagonismo al precio. */
.product-info > .product-cat {
    display: inline-block;
    margin-bottom: 6px;
}

.product-info > .product-brand,
.product-info > .product-sku {
    margin: 0 0 7px;
    line-height: 1.45;
}

.product-info > .product-title {
    margin: 8px 0 6px;
}

.product-detail-price {
    margin: 6px 0 10px;
}

.product-detail-price .price-now {
    color: var(--primary, #2563eb);
    font-weight: 750;
}

.product-info > .product-short {
    margin: 8px 0 12px;
}

.product-info > .stock-info {
    margin: 8px 0 12px;
}

.product-info > .product-actions {
    margin-bottom: 16px;
}

/* Variantes */
.variants {
    margin: 18px 0;
}

.variants-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.variant-option {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.variant-option:hover {
    border-color: var(--primary);
}

.variant-option.is-selected {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.variant-option.is-out {
    opacity: 0.55;
    text-decoration: line-through;
}

.stock-info {
    font-weight: 600;
    color: var(--success);
    margin: 8px 0 16px;
}

.stock-info.is-out {
    color: var(--danger);
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.product-share,
.product-wishlist {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.product-share-label {
    font-weight: 600;
}

.product-share a,
.product-share-copy,
.product-wishlist > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-share svg {
    width: 19px;
    height: 19px;
    flex: none;
}

.product-share-copy {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.product-wishlist .icon-inline {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: -4px;
}

.product-share-status {
    color: #15803d;
    font-size: 0.9rem;
}

.product-wishlist {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.product-wishlist form {
    margin: 0;
}

.qty-field {
    width: 110px;
}

.qty-field input {
    width: 100%;
}

.btn-lg {
    padding: 13px 26px;
    font-size: 1rem;
}

.product-description h2 {
    font-size: 1.2rem;
}

.product-description {
    margin: -24px 0 72px;
    padding: 24px 24px 48px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.description-body {
    color: #334155;
}

/* --------------------------------------------------------------------------
   Reseñas
   -------------------------------------------------------------------------- */
.product-reviews {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.product-reviews .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.review-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-item {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.review-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.review-stars {
    display: inline-flex;
    gap: 2px;
    color: var(--border);
    font-size: 1rem;
    line-height: 1;
}

.review-stars .star.is-on {
    color: #f5b301;
}

.review-author {
    font-weight: 600;
}

.review-date {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.85rem;
}

.review-title {
    font-size: 1.05rem;
    margin: 4px 0 6px;
}

.review-content {
    margin: 0;
    color: var(--text, #333);
    line-height: 1.6;
}

.review-form-wrap {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.review-form-wrap h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 560px;
}

.review-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-field label {
    font-weight: 600;
    font-size: 0.9rem;
}

.review-field input,
.review-field select,
.review-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    font: inherit;
    background: var(--white);
}

.review-field textarea {
    resize: vertical;
    min-height: 96px;
}

.review-note {
    font-size: 0.85rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Error 404
   -------------------------------------------------------------------------- */
.error-page {
    text-align: center;
    padding: 64px 24px;
}

.error-page h1 {
    font-size: 3rem;
    margin-bottom: 8px;
}

.error-page p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .catalog-sidebar {
        position: static;
    }

    .catalog-filters-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .catalog-filters-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px; }
    .catalog-filters-toolbar .filters-title { grid-column: 1 / -1; }
    .catalog-filters-toolbar > button { width: 100%; }
    .catalog-filters-toolbar .filter-reset { align-self: center; text-align: center; }
    .category-tree { max-height: 320px; overflow: auto; }
    .hero {
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .qty-field {
        width: 100%;
    }
}
