/* Material Design 3 — tema tienda: naranja + acentos verde/teal sobrios */
:root {
    --md-sys-color-primary: #f46717;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #FFE2D1;
    --md-sys-color-on-primary-container: #6A2500;
    --md-sys-color-primary-dark: #D9540B;
    --md-sys-color-secondary: #1d4ed8;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-tertiary: #0F766E;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-surface: #FFFAF5;
    --md-sys-color-on-surface: #1C1917;
    --md-sys-color-surface-variant: #F5E8E0;
    --md-sys-color-on-surface-variant: #57514D;
    --md-sys-color-success: #166534;
    --md-sys-color-success-container: #DCFCE7;
    --md-sys-color-on-success-container: #14532D;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.6;
}

/* Solo lectores de pantalla / H1 principal en inicio (SEO sin duplicar título visual) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--md-sys-color-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--md-sys-color-on-surface);
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: visible;
    margin-bottom: 0;
}

.hero-banner .hero-slide,
.hero-banner .hero-video-container {
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.5;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 3rem 2rem 2rem;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin: 0;
}

/* Hero Search */
.hero-search-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 700px;
    padding: 0 2rem;
    z-index: 10001;
}

.hero-search-wrapper {
    position: relative;
    width: 100%;
}

.hero-search-input {
    width: 100%;
    padding: 1.25rem 4rem 1.25rem 2rem;
    font-size: 1.25rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.hero-search-input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.hero-search-input::placeholder {
    color: #999;
}

.hero-search-icon {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--md-sys-color-primary);
    pointer-events: none;
    font-size: 1.75rem;
}

.hero-search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 10000;
}

.hero-search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    cursor: pointer;
    gap: 1rem;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background-color: #f5f5f5;
}

.search-suggestion-icon {
    font-size: 1.5rem;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.search-suggestion-thumb {
    width: 126px;
    height: 126px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 0.2rem;
    flex-shrink: 0;
}

.search-suggestion-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.25rem;
}

.search-suggestion-name {
    font-size: 1rem;
    font-weight: 500;
}

.search-suggestion-code {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
}

.search-suggestion-type {
    font-size: 0.75rem;
    color: var(--md-sys-color-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-suggestion-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
    margin-left: auto;
}

.search-suggestion-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.95rem;
}

/* Responsive Hero Search */
@media (max-width: 768px) {
    .hero-search-container {
        max-width: 90%;
        padding: 0 1rem;
    }

    .hero-search-input {
        padding: 1rem 3rem 1rem 1.5rem;
        font-size: 1.125rem;
    }

    .hero-search-icon {
        right: 1.5rem;
        font-size: 1.5rem;
    }

    .search-suggestion-item {
        padding: 0.875rem 1.25rem;
    }

    .search-suggestion-name,
    .search-suggestion-price {
        font-size: 0.95rem;
    }
}

/* Product Grid */
.section-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #f5f5f5;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: var(--md-sys-color-on-surface);
}

.product-category {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    margin-top: auto;
}

.related-products {
    margin: 2.5rem 0 1rem;
}

.related-products-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
    text-align: left;
    color: var(--md-sys-color-on-surface);
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.related-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.related-product-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.related-product-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-bottom: 1px solid #eef1f5;
    overflow: hidden;
}

.related-product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
}

.related-product-name {
    margin: 0;
    padding: 0.85rem 1rem 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--md-sys-color-on-surface);
}

.related-product-action {
    padding: 0.5rem 1rem 1rem;
    margin-top: auto;
}

.related-product-action a {
    display: inline-block;
    max-width: 100%;
}

@media (max-width: 640px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .related-product-name {
        font-size: 0.82rem;
        padding: 0.65rem 0.7rem 0.15rem;
    }
    .related-product-action {
        padding: 0.4rem 0.7rem 0.8rem;
    }
}

/* Product Detail */
.product-detail {
    max-width: 1200px;
    margin: 1.25rem auto 3rem;
    padding: 0 2rem;
}

.product-back-bar {
    margin: 0 0 1.15rem;
}

.product-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.45rem 1.05rem 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1a2b4b;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.product-back-btn .material-icons {
    font-size: 20px;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.product-back-btn:hover,
.product-back-btn:focus-visible {
    border-color: var(--md-sys-color-primary);
    background: #fff7ed;
    color: #1a2b4b;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery {
    position: relative;
}

.product-main-image-container {
    position: relative;
    margin-bottom: 1rem;
}

.product-main-image {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    padding: 0;
}

.image-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.image-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.image-nav-btn .material-icons {
    font-size: 24px;
    color: var(--md-sys-color-primary);
}

.image-nav-prev {
    left: 10px;
}

.image-nav-next {
    right: 10px;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.product-thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

.product-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.product-thumbnail.active {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.product-info-detail h1 {
    font-size: 2rem;
    font-weight: 400;
    margin: 0 0 1rem;
}

.product-price-detail {
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    margin: 1rem 0;
}

.product-description {
    margin: 0;
    line-height: 1.8;
    color: var(--md-sys-color-on-surface-variant);
}

/* Product Tabs */
.product-tabs-container {
    margin-top: 2rem;
}

.product-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
    gap: 0;
}

.product-tab {
    padding: 1rem 1.5rem;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

/* Tab 1: Descripción - Negro */
.product-tab[data-tab="description"] {
    background-color: #000000;
    border-bottom-color: #000000;
}

.product-tab[data-tab="description"]:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Tab 2: Descripción Técnica — naranja marca */
.product-tab[data-tab="technical"] {
    background-color: var(--md-sys-color-primary);
    border-bottom-color: var(--md-sys-color-primary);
}

.product-tab[data-tab="technical"]:hover {
    background-color: var(--md-sys-color-primary-dark);
}

/* Tab 3: Vídeos — verde sobrio */
.product-tab[data-tab="videos"] {
    background-color: var(--md-sys-color-success);
    border-bottom-color: var(--md-sys-color-success);
}

.product-tab[data-tab="videos"]:hover {
    background-color: #14532D;
}

.product-tab.active {
    opacity: 1;
}

.product-tab-content {
    display: none;
    padding: 2rem 0;
    min-height: 200px;
}

.product-tab-content.active {
    display: block;
}

.product-tab-content a[download]:hover {
    background-color: var(--md-sys-color-primary-dark) !important;
}

.whatsapp-button {
    background-color: #25D366;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.whatsapp-button:hover {
    background-color: #20BA5A;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-name {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Header Search */
.nav-search-container {
    position: relative;
    margin: 0 1rem;
}

.header-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-input {
    width: 280px;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background-color: #f5f5f5;
    color: var(--md-sys-color-on-surface);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.header-search-input::placeholder {
    color: #999;
}

.header-search-input:focus {
    width: 350px;
    background-color: #ffffff;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.header-search-icon {
    position: absolute;
    right: 1rem;
    color: #666;
    font-size: 1.5rem;
    pointer-events: none;
}

.header-search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    max-height: 400px;
    overflow-y: auto;
    z-index: 99999;
    min-width: 300px;
}

.header-search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    cursor: pointer;
    gap: 0.75rem;
}

.header-search-suggestion-item:last-child {
    border-bottom: none;
}

.header-search-suggestion-item:hover,
.header-search-suggestion-item.active {
    background-color: #f5f5f5;
}

.header-search-suggestion-icon {
    font-size: 1.5rem;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.header-search-suggestion-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 0.2rem;
    flex-shrink: 0;
}

.header-search-suggestion-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.25rem;
}

.header-search-suggestion-name {
    font-size: 1rem;
    font-weight: 500;
}

.header-search-suggestion-code {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
}

.header-search-suggestion-type {
    font-size: 0.75rem;
    color: var(--md-sys-color-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-search-suggestion-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.header-search-suggestion-empty {
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.95rem;
}

.header-search-cat-hit {
    background: #fff7ed;
}

.header-search-cat-hit:hover,
.header-search-cat-hit.active {
    background: #ffedd5;
}

.header-search-cat-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--md-sys-color-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.header-search-cat-hit:hover .header-search-cat-cta {
    background: var(--md-sys-color-primary-dark);
}

@media (max-width: 640px) {
    .header-search-cat-cta {
        padding: 0.32rem 0.65rem;
        font-size: 0.72rem;
    }
}

@media (max-width: 768px) {
    .nav-search-container {
        order: -1;
        width: 100%;
        margin: 0.5rem 0;
    }

    .header-search-wrapper {
        width: 100%;
    }

    .header-search-input {
        width: 100%;
        padding: 0.875rem 3rem 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .header-search-input:focus {
        width: 100%;
    }

    .header-search-icon {
        right: 1.25rem;
        font-size: 1.5rem;
    }

    .header-search-suggestions {
        min-width: 100%;
        left: 0;
        right: 0;
    }
}

/* Footer */
.footer {
    background-color: #1C1B1F;
    color: #E5E5E5;
    margin-top: 4rem;
}

.footer-menu-section {
    background-color: #252329;
    padding: 3rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.footer-menu-column {
    min-width: 0;
}

.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-list li {
    margin-bottom: 0.75rem;
    list-style: none;
}

.footer-menu-list li:last-child {
    margin-bottom: 0;
}

.footer-menu-list a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: opacity 0.3s ease;
    display: block;
    line-height: 1.6;
}

.footer-menu-list a:hover {
    opacity: 0.8;
    padding-left: 0.25rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

@media (max-width: 1024px) {
    .footer-menu-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-menu-section {
        padding: 2rem 1rem;
    }
    
    .footer-menu-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        padding: 1.5rem 1rem;
    }
}

/* Admin Styles */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    margin-bottom: 2rem;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Admin: formulario cliente (alta / edición) */
.admin-client-form {
    max-width: 760px;
}

.admin-client-form-tabs {
    border-color: #e7e5e4 !important;
    overflow: hidden;
}

.admin-client-form-tabs .card-header {
    background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
    border-radius: 10px 10px 0 0;
}

.admin-client-form-tabs-nav .nav-item {
    margin-bottom: 0;
}

.admin-client-form-tabs-nav .admin-client-form-tab-btn {
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 0.6rem 1.1rem;
    margin-bottom: -1px;
    font-size: 0.9375rem;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Pestaña 1 — naranja */
.admin-client-form-tabs-nav .nav-item:nth-child(1) .admin-client-form-tab-btn {
    color: #9a3412;
    background: rgba(255, 237, 213, 0.65);
    border-color: rgba(251, 146, 60, 0.35);
}

.admin-client-form-tabs-nav .nav-item:nth-child(1) .admin-client-form-tab-btn:hover:not(.active) {
    color: #7c2d12;
    background: #ffedd5;
    border-color: #fb923c;
}

.admin-client-form-tabs-nav .nav-item:nth-child(1) .admin-client-form-tab-btn.active {
    color: #7c2d12;
    font-weight: 600;
    background: #fff;
    border-color: #fdba74 #fdba74 #fff;
    border-style: solid;
    border-width: 1px;
    border-bottom: 3px solid #ea580c;
    margin-bottom: -3px;
    box-shadow: 0 -2px 8px rgba(234, 88, 12, 0.12);
}

/* Pestaña 2 — teal */
.admin-client-form-tabs-nav .nav-item:nth-child(2) .admin-client-form-tab-btn {
    color: #115e59;
    background: rgba(204, 251, 241, 0.65);
    border-color: rgba(45, 212, 191, 0.35);
}

.admin-client-form-tabs-nav .nav-item:nth-child(2) .admin-client-form-tab-btn:hover:not(.active) {
    color: #134e4a;
    background: #ccfbf1;
    border-color: #2dd4bf;
}

.admin-client-form-tabs-nav .nav-item:nth-child(2) .admin-client-form-tab-btn.active {
    color: #134e4a;
    font-weight: 600;
    background: #fff;
    border-color: #5eead4 #5eead4 #fff;
    border-style: solid;
    border-width: 1px;
    border-bottom: 3px solid #0d9488;
    margin-bottom: -3px;
    box-shadow: 0 -2px 8px rgba(13, 148, 136, 0.12);
}

/* Pestaña 3 — verde */
.admin-client-form-tabs-nav .nav-item:nth-child(3) .admin-client-form-tab-btn {
    color: #166534;
    background: rgba(220, 252, 231, 0.7);
    border-color: rgba(74, 222, 128, 0.4);
}

.admin-client-form-tabs-nav .nav-item:nth-child(3) .admin-client-form-tab-btn:hover:not(.active) {
    color: #14532d;
    background: #dcfce7;
    border-color: #4ade80;
}

.admin-client-form-tabs-nav .nav-item:nth-child(3) .admin-client-form-tab-btn.active {
    color: #14532d;
    font-weight: 600;
    background: #fff;
    border-color: #86efac #86efac #fff;
    border-style: solid;
    border-width: 1px;
    border-bottom: 3px solid #16a34a;
    margin-bottom: -3px;
    box-shadow: 0 -2px 8px rgba(22, 163, 74, 0.12);
}

.admin-client-form-tabs .card-body {
    border: 1px solid #e7e5e4;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #fff;
}

.admin-client-form-tab-pane[hidden] {
    display: none !important;
}

.admin-client-form-section {
    margin-bottom: 2rem;
}

.admin-client-form-section:last-of-type {
    margin-bottom: 1.25rem;
}

.admin-client-form-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    color: var(--md-sys-color-on-surface-variant, #57514d);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--md-sys-color-surface-variant, #e8e0dc);
}

.admin-client-form-hacienda {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #44403c;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
}

.admin-client-form-hacienda strong {
    color: #1c1917;
}

.admin-client-form-hacienda a {
    color: var(--md-sys-color-primary, #ea580c);
    font-weight: 500;
}

.admin-client-form-lookup-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 1rem;
}

.admin-client-form-hacienda-result-wrap {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border-radius: 10px;
    border: 1px solid #90caf9;
    background: #e3f2fd;
}

.admin-client-form-hacienda-result-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1565c0;
    margin: 0 0 0.65rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(21, 101, 192, 0.25);
}

.admin-client-form-hacienda-result-status {
    font-size: 0.9375rem;
    line-height: 1.45;
    margin-bottom: 0.35rem;
}

.admin-client-form-hacienda-result-detail {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.admin-client-form-hacienda-result-detail .hacienda-result-line {
    display: block;
    margin-top: 0.4rem;
}

.admin-client-form-hacienda-result-detail .hacienda-result-line:first-child {
    margin-top: 0;
}

/* Éxito: texto azul en negrita */
.admin-client-form-hacienda-result-wrap--success .admin-client-form-hacienda-result-title {
    color: #0d47a1;
    font-weight: 700;
    border-bottom-color: rgba(13, 71, 161, 0.28);
}

.admin-client-form-hacienda-result-wrap--success .admin-client-form-hacienda-result-status,
.admin-client-form-hacienda-result-wrap--success .admin-client-form-hacienda-result-detail,
.admin-client-form-hacienda-result-wrap--success .admin-client-form-hacienda-result-detail strong {
    color: #0d47a1;
    font-weight: 700;
}

.admin-client-form-hacienda-result-wrap--success {
    border-color: #42a5f5;
    background: #e3f2fd;
}

/* Consultando */
.admin-client-form-hacienda-result-wrap--loading .admin-client-form-hacienda-result-status {
    color: #546e7a;
    font-weight: 500;
}

.admin-client-form-hacienda-result-wrap--loading {
    border-color: #b0bec5;
    background: #eceff1;
}

/* Error API */
.admin-client-form-hacienda-result-wrap--error .admin-client-form-hacienda-result-status {
    color: #b71c1c;
    font-weight: 600;
}

.admin-client-form-hacienda-result-wrap--error {
    border-color: #ef9a9a;
    background: #ffebee;
}

.admin-client-form-hacienda-result-wrap--error .admin-client-form-hacienda-result-title {
    color: #c62828;
    border-bottom-color: rgba(198, 40, 40, 0.25);
}

.admin-client-form-detail {
    display: none;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #44403c;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}

.admin-client-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding-top: 1.25rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--md-sys-color-surface-variant, #e8e0dc);
}

.client-create .admin-card > h1,
.client-update .admin-card > h1 {
    margin-bottom: 0.35rem;
}

.admin-client-create-lead {
    margin: 0 0 1.75rem 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface-variant, #57514d);
    max-width: 42rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .product-detail-content {
        grid-template-columns: 1fr;
    }

    .admin-container {
        padding: 1rem;
    }
}

/* Admin Layout Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.admin-sidebar {
    width: 250px;
    background-color: #1C1B1F;
    color: #E5E5E5;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #FFFFFF;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #E5E5E5;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: #FFFFFF;
}

.sidebar-nav .nav-link .material-icons {
    font-size: 24px;
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #E5E5E5;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-footer .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background-color: #FFFFFF;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
}

.user-info {
    color: var(--md-sys-color-on-surface-variant);
}

.admin-content {
    flex: 1;
    padding: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--md-sys-color-surface-variant);
}

.admin-table th {
    background-color: #F5F5F5;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.admin-table tr:hover {
    background-color: #F5F5F5;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn-primary:hover {
    background-color: var(--md-sys-color-primary-dark);
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}

.btn-danger {
    background-color: #B3261E;
    color: white;
}

.btn-danger:hover {
    background-color: #9B1F18;
}

.btn-secondary {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--md-sys-color-surface-variant);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: white;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
}

.form-control textarea {
    min-height: 120px;
    resize: vertical;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.alert-error {
    background-color: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 500;
    color: var(--md-sys-color-primary);
}

.stat-card p {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-table {
        font-size: 0.875rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
}

/* Breadcrumbs Styles */
.breadcrumbs-container {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.7rem 1.5rem;
    max-width: none;
    width: 100%;
    margin: 0;
    text-align: center;
}

.breadcrumbs {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1.35;
    --bs-breadcrumb-divider: '';
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: none;
    padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin: 0 0.5rem;
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1;
}

.breadcrumbs li a {
    color: #1e3a8a;
    text-decoration: none;
    padding: 0.28rem 0.7rem;
    border-radius: 6px;
    background: #eef2ff;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.15s, color 0.15s;
}

.breadcrumbs li a:hover {
    color: #fff;
    background: #f46717;
    text-decoration: none;
}

.breadcrumbs li.active {
    color: #334155;
    font-weight: 700;
}

.breadcrumbs li.active a {
    color: #334155;
    background: transparent;
    cursor: default;
    pointer-events: none;
    font-weight: 700;
}

.breadcrumbs li.active a:hover {
    text-decoration: none;
}

@media (max-width: 768px) {
    .breadcrumbs-container {
        padding: 0.75rem 1rem;
    }
    
    .breadcrumbs {
        font-size: 0.92rem;
        justify-content: center;
    }
}

/* Parallax Section Styles */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background-size: 100% auto;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    pointer-events: none;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Full Width Products and Categories Sections */
.products-section,
.categories-section {
    position: relative;
    padding: 2rem 0;
    width: 100%;
}

.products-section .container,
.categories-section .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.products-section > .container > h2,
.categories-section > .container > h2 {
    position: relative;
    z-index: 1;
}

.products-grid,
.category-grid {
    position: relative;
    z-index: 1;
}

/* Sponsors Section */
.sponsors-section {
    padding: 3rem 0;
    background-color: #f9f9f9;
    width: 100%;
}

.sponsors-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--md-sys-color-on-surface);
    text-align: center;
    width: 100%;
}

.sponsors-section .container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    width: 600px;
    height: 250px;
    overflow: hidden;
}

.sponsor-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.sponsor-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Category Grid for Index */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    user-select: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-card.active {
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.3);
    border-color: var(--md-sys-color-primary);
    background-color: rgba(234, 88, 12, 0.05);
}

.category-card-image {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    overflow: hidden;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-content {
    padding: 0.75rem 1rem;
    text-align: center;
}

.category-card-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

/* Products Scroll Wrapper */
.products-scroll-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto 3rem;
}

.products-scroll-wrapper .products-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0 2rem;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(234, 88, 12, 0.3) transparent;
}

.products-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
}

.products-scroll-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.products-scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.products-scroll-btn .material-icons {
    color: var(--md-sys-color-primary);
    font-size: 32px;
}

.products-scroll-left {
    left: -24px;
}

.products-scroll-right {
    right: -24px;
}

.products-scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.products-scroll-wrapper .products-grid::-webkit-scrollbar {
    height: 8px;
}

.products-scroll-wrapper .products-grid::-webkit-scrollbar-track {
    background: transparent;
}

.products-scroll-wrapper .products-grid::-webkit-scrollbar-thumb {
    background-color: rgba(234, 88, 12, 0.3);
    border-radius: 4px;
}

.products-scroll-wrapper .products-grid::-webkit-scrollbar-thumb:hover {
    background-color: rgba(234, 88, 12, 0.5);
}

.products-scroll-wrapper .products-grid .product-card {
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
}

.products-scroll-wrapper .products-grid .product-card.hidden {
    display: none;
}

/* Product Index Specific Styles */
.product-index .products-section {
    position: relative !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    padding: 2rem 0;
}

.product-index .parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background-size: 100% auto;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

.product-index .products-section > h1,
.product-index .products-section > div {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    position: relative;
    z-index: 1;
}

.product-index-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

.product-index-grid .product-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}

.product-index-grid .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Category Accordion */
.category-accordion {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.category-accordion-item {
    border-bottom: 1px solid #e0e0e0;
}

.category-accordion-item:last-child {
    border-bottom: none;
}

.category-accordion-link {
    display: block;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease;
}

.category-accordion-link:hover {
    background-color: #f5f5f5;
}

.category-accordion-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
    font-size: inherit;
    font-family: inherit;
}

.category-accordion-button:hover {
    background-color: #f5f5f5;
}

.category-accordion-button.has-subcategories {
    cursor: pointer;
}

.accordion-arrow {
    transition: transform 0.3s ease;
    font-size: 1.25rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-left: 0.5rem;
}

.category-accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
}

.category-accordion-content {
    background-color: #fafafa;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-subcategory-link {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category-subcategory-link:hover {
    background-color: #f5f5f5;
}

/* Brand Filter Styles */
.brand-filter-list {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.brand-filter-item {
    border-bottom: 1px solid #e0e0e0;
}

.brand-filter-item:last-child {
    border-bottom: none;
}

.brand-filter-link {
    display: block;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
}

.brand-filter-link:hover {
    background-color: #f5f5f5;
}

.brand-filter-link.active {
    background-color: #f0f0f0;
    color: var(--md-sys-color-primary) !important;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .product-index-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .category-card-image {
        height: 100px;
    }
    
    .category-card-image .material-icons {
        font-size: 40px !important;
    }
    
    .category-card-content {
        padding: 0.5rem 0.75rem;
    }
    
    .category-card-title {
        font-size: 0.875rem;
    }
    
    .products-scroll-wrapper {
        margin: 0 auto 3rem;
        padding: 0 3rem;
    }
    
    .products-scroll-wrapper .products-grid {
        gap: 1rem;
        padding: 0.5rem 0 1.5rem;
    }
    
    .products-scroll-wrapper .products-grid .product-card {
        flex: 0 0 calc(100% - 2rem);
        min-width: calc(100% - 2rem);
        max-width: calc(100% - 2rem);
    }
    
    .products-scroll-btn {
        width: 40px;
        height: 40px;
    }
    
    .products-scroll-btn .material-icons {
        font-size: 28px;
    }
    
    .products-scroll-left {
        left: 0.5rem;
    }
    
    .products-scroll-right {
        right: 0.5rem;
    }
    
    .product-index .products-section > div {
        grid-template-columns: 1fr !important;
    }
    
    .product-index-grid {
        grid-template-columns: 1fr !important;
    }
    
    .sponsors-section .container {
        padding: 0 1rem;
    }
    
    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .sponsor-item {
        width: 100%;
        max-width: 600px;
        height: 250px;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .products-scroll-wrapper {
        padding: 0 3rem;
    }
    
    .products-scroll-wrapper .products-grid .product-card {
        flex: 0 0 calc(100% - 2rem);
        min-width: calc(100% - 2rem);
        max-width: calc(100% - 2rem);
    }
    
    .products-scroll-left {
        left: 0.5rem;
    }
    
    .products-scroll-right {
        right: 0.5rem;
    }
}


/* Admin Login Form Styles */
.admin-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.btn-primary {
    background-color: var(--md-sys-color-primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--md-sys-color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Ensure buttons are clickable */
button[type="submit"],
input[type="submit"],
.btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto !important;
    z-index: 1;
    position: relative;
}

/* -------------------------------------------------------------------------
   Portada y catálogo — estilo referencia (cabecera oscura, acento lima, tabla)
   ------------------------------------------------------------------------- */
:root {
    --farm-navy: #f46717;
    --farm-navy-deep: #1e3a8a;
    --farm-lime: #1d4ed8;
    --farm-lime-dark: #1e40af;
    --farm-title-blue: #1d4ed8;
    --farm-footer-band: #f46717;
    --farm-sidebar-bg: #1e3a8a;
    --farm-sidebar-muted: #93c5fd;
}

.body-public-farm {
    background: #e4e9f0;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Arial, sans-serif;
}

.body-public-farm input,
.body-public-farm button,
.body-public-farm textarea,
.body-public-farm select {
    font-family: inherit;
}

.header.header-farm {
    position: sticky;
    top: 0;
    z-index: 500;
    background: var(--farm-navy-deep);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    /* overflow: visible so search dropdown is never clipped */
    overflow: visible;
}

.header-farm-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    transform: scale(1.06);
    opacity: 0.55;
    /* Clip only the blurred bg, not the whole header */
    overflow: hidden;
    clip-path: inset(0);
    border-radius: inherit;
}

.header-farm-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 26, 46, 0.75) 0%, rgba(26, 43, 75, 0.92) 100%);
    pointer-events: none;
}

.header-farm-inner {
    position: relative;
    z-index: 2;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0.35rem 1.25rem 0.55rem;
}

.header-farm-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 2rem;
}

.header-farm-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-farm-rate {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8125rem;
}

.header-farm-rate strong {
    color: var(--farm-lime);
    font-weight: 600;
}

.header-farm-search-wrap .farm-header-search.header-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.35rem 0.15rem 0.6rem;
    min-width: 200px;
}

.header-farm-search-wrap .header-search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.875rem;
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0.25rem;
}

.header-farm-search-wrap .header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.header-farm-search-wrap .header-search-input:focus {
    outline: none;
}

.header-farm-search-wrap .header-search-icon {
    color: var(--farm-lime);
}

.header-farm-search-wrap {
    position: relative;
    z-index: 9999;
}

.header-farm-search-wrap .header-search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 4px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    min-width: 320px;
}

.header-farm-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.35rem 0 0.4rem;
    min-height: 62px;
}

.logo.logo-farm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-decoration: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.logo.logo-farm:has(.logo-farm-img) {
    line-height: 0;
}

.header-farm .mobile-menu-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    display: none;
}

.header-farm-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.65rem;
    position: relative;
}

.nav-farm-icons > li.has-mega {
    position: static;
}

.mega-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 4000;
    background: #fff;
    color: #1c1917;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    border-top: 3px solid var(--md-sys-color-primary);
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 0;
    text-align: left;
}

@media (min-width: 769px) {
    .has-mega:hover > .mega-panel,
    .has-mega:focus-within > .mega-panel {
        display: grid;
    }
}

.has-mega.is-open > .mega-panel {
    display: grid;
}

.mega-featured {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    min-height: 220px;
    background: #111827;
    overflow: hidden;
}

.mega-featured-image {
    flex: 1;
    min-height: 160px;
    background-size: cover;
    background-position: center;
}

.mega-featured-image-fallback {
    background: linear-gradient(135deg, #1e3a8a, #f46717);
}

.mega-featured-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.15rem 1.15rem;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.2), rgba(17, 24, 39, 0.92));
    color: #fff;
}

.mega-featured-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mega-featured-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fdba74;
}

.mega-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem 1.25rem;
    padding: 1.25rem 1.5rem 1.5rem;
    max-height: min(70vh, 520px);
    overflow: auto;
    flex: 1;
}

.mega-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.mega-az {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    padding: 0.7rem 1.15rem 0.55rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.mega-az-btn {
    appearance: none;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #1a2b4b;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.45rem;
    border-radius: 6px;
    cursor: pointer;
}

.mega-az-btn:hover {
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
}

.mega-az-btn.is-active {
    background: #1a2b4b;
    border-color: #1a2b4b;
    color: #fff;
}

.mega-col.is-az-hidden {
    display: none;
}

.mega-col-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
    color: #0f172a;
    text-decoration: none;
    margin-bottom: 0.45rem;
    line-height: 1.25;
}

.mega-col-title:hover {
    color: var(--md-sys-color-primary);
}

.mega-col-title-solo {
    font-weight: 800;
    padding: 0.35rem 0;
}

.mega-col-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-col-list a,
.mega-col-more {
    display: block;
    font-size: 0.84rem;
    font-weight: 400;
    color: #4b5563;
    text-decoration: none;
    padding: 0.18rem 0;
    line-height: 1.3;
}

.mega-col-list a:hover,
.mega-col-more:hover {
    color: var(--md-sys-color-primary);
}

.mega-col-more {
    margin-top: 0.35rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
}

.mega-panel-brands {
    grid-template-columns: 1fr;
    padding: 1.1rem 1.35rem 1.35rem;
}

.mega-brands-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.mega-brands-title {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a2b4b;
}

.mega-brands-all {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    text-decoration: none;
}

.mega-brands-all:hover {
    text-decoration: underline;
}

.mega-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.7rem;
}

.mega-brand-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #1a2b4b;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.mega-brand-btn:hover,
.mega-brand-btn.is-active {
    border-color: var(--md-sys-color-primary);
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 4px 12px rgba(244, 103, 23, 0.16);
}

.mega-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 72px;
    height: 48px;
    border-radius: 8px;
    background: #1a2b4b;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.mega-brand-icon.has-image {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 4px;
}

.mega-brand-icon .material-icons {
    font-size: 22px;
}

.mega-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mega-brand-name {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.25;
}

.mega-brand-arrow {
    font-size: 18px;
    color: var(--md-sys-color-primary);
    opacity: 0.85;
}

.site-portada-wide .site-home-hero {
    width: 100%;
    min-height: 58vh;
    background-size: cover;
    background-position: center;
}

.site-portada-wide .site-home-hero-inner {
    width: 100%;
    max-width: none;
    padding: 4.5rem 2.5rem 3.5rem;
    text-align: left;
}

.site-home-kicker {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.site-portada-wide .site-home-title {
    font-size: clamp(2.4rem, 5.4vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    max-width: 18ch;
}

.site-home-hero-lead {
    margin: 0.85rem 0 0;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
    max-width: 40rem;
}

.site-portada-wide .site-home-search {
    margin-top: 1.75rem;
    max-width: 52rem;
}

.site-portada-wide .site-home-intro {
    max-width: 46rem;
    text-align: left;
}

.site-portada-main-wide {
    width: 100%;
    padding: 1.5rem 2rem 2.5rem;
}

.site-portada-main-wide .farm-list-card {
    border-radius: 0;
    box-shadow: none;
}

.site-portada-wide .sponsors-section {
    width: 100%;
    padding: 2rem;
}

.site-portada-wide .sponsors-grid {
    max-width: none;
    padding: 0;
}

.site-portada-wide .farm-featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    padding: 1rem 0;
}

.nav-farm-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-farm-icons > li > a.nav-farm-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: #fff;
    padding: 0.28rem 0.85rem 0.28rem 0.28rem;
    min-width: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.15s;
}

.nav-farm-icons > li > a.nav-farm-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.nav-farm-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 0;
    transition: background 0.2s, border-color 0.2s;
}

.nav-farm-icons .nav-farm-icon {
    font-size: 18px;
    color: #1e3a8a;
}

.nav-farm-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: left;
    line-height: 1.15;
    max-width: none;
}

.nav-farm-icons > li.is-active > a.nav-farm-item {
    background: #f46717;
    border-color: #ea580c;
}

.nav-farm-icons > li.is-active .nav-farm-icon-wrap {
    background: #fff;
    border-color: #fff;
}

.nav-farm-icons > li.is-active .nav-farm-icon {
    color: #ea580c;
}

.nav-farm-icons > li.is-active .nav-farm-label {
    color: #fff;
}

.main-farm-wrap {
    min-height: 40vh;
}

.farm-breadcrumbs {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.farm-breadcrumbs .breadcrumb-item,
.farm-breadcrumbs .breadcrumb-item a {
    color: var(--farm-navy);
}

.site-portada-title-band {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 1rem 1rem 1.25rem;
    background: var(--farm-page-banner-color, var(--farm-navy));
}

.site-portada-title-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--farm-page-banner-image, none);
    background-size: cover;
    background-position: center;
    opacity: 0.45;
    transform: scale(1.04);
}

.site-portada-title-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 43, 75, 0.58) 0%, rgba(26, 43, 75, 0.9) 100%);
}

.site-portada-page-title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.section-az-wrap {
    position: relative;
    z-index: 1;
    margin: 0.85rem auto 0;
    max-width: 1100px;
    padding: 0 0.5rem;
}

.section-az {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.section-az-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}

.section-az-btn:hover {
    background: #fff;
    color: #1a2b4b;
    border-color: #fff;
}

.section-az-btn.is-active {
    background: var(--md-sys-color-primary, #f46717);
    border-color: var(--md-sys-color-primary, #f46717);
    color: #fff;
}

.section-az-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.section-az-cat {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.section-az-cat:hover,
.section-az-cat.is-current {
    background: #fff;
    color: #1a2b4b;
    border-color: #fff;
}

.section-az-cat.is-az-hidden,
.catview-subcat-list li.is-az-hidden,
.mega-col.is-az-hidden {
    display: none !important;
}

.container-farm {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
}

.site-portada-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: start;
    padding-top: 1.5rem;
}

.catalog-wide {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1.25rem 1.5rem 2.5rem;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(180px, 240px);
    gap: 1.25rem;
}

.catalog-wide .farm-sidebar-aside {
    position: sticky;
    top: 6.5rem;
    align-self: start;
    max-height: calc(100vh - 7.5rem);
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #f46717 rgba(255, 255, 255, 0.12);
}

.catalog-wide .farm-sidebar-aside::-webkit-scrollbar {
    width: 8px;
}

.catalog-wide .farm-sidebar-aside::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.catalog-wide .farm-sidebar-aside::-webkit-scrollbar-thumb {
    background: #f46717;
    border-radius: 8px;
}

.catalog-wide .farm-sidebar-aside::-webkit-scrollbar-thumb:hover {
    background: #ff8a3d;
}

.mega-columns {
    scrollbar-width: thin;
    scrollbar-color: #f46717 #eef2f7;
}

.mega-columns::-webkit-scrollbar {
    width: 8px;
}

.mega-columns::-webkit-scrollbar-track {
    background: #eef2f7;
    border-radius: 8px;
}

.mega-columns::-webkit-scrollbar-thumb {
    background: #f46717;
    border-radius: 8px;
}

.mega-columns::-webkit-scrollbar-thumb:hover {
    background: #ff8a3d;
}

.catalog-wide .site-portada-main {
    min-width: 0;
}

.farm-sidebar-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.farm-sidebar-card {
    background: var(--farm-sidebar-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.farm-sidebar-title {
    margin: 0;
    padding: 1rem 0.85rem 0.9rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-transform: uppercase;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.farm-category-accordion .category-accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.farm-category-accordion .category-accordion-item:last-child {
    border-bottom: none;
}

.farm-cat-link-root,
.farm-cat-link {
    display: block;
    padding: 0.65rem 1rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.farm-cat-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.farm-category-accordion .category-accordion-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.farm-category-accordion .category-accordion-button .farm-cat-link {
    flex: 1;
    text-align: left;
}

.farm-category-accordion .accordion-arrow {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 0.5rem;
}

.farm-category-accordion .category-accordion-item.active .farm-cat-link {
    background: var(--farm-lime);
    color: var(--farm-navy-deep);
}

.farm-category-accordion .category-accordion-item.active .accordion-arrow {
    color: var(--farm-navy-deep);
}

.farm-category-accordion .category-accordion-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.35rem 0 0.5rem;
}

.farm-cat-sublink {
    display: block;
    padding: 0.4rem 1rem 0.25rem 1.25rem;
    color: var(--farm-sidebar-muted);
    font-size: 0.82rem;
    text-decoration: none;
}

.farm-cat-family {
    display: block;
    padding: 0.2rem 1rem 0.35rem 1.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
    text-decoration: none;
}

.farm-cat-sublink:hover,
.farm-cat-family:hover {
    color: #fff;
}

.farm-sidebar-card-brands .farm-brand-link {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.farm-sidebar-card-brands .farm-brand-link:hover,
.farm-sidebar-card-brands .farm-brand-link.is-active {
    background: rgba(255, 255, 255, 0.06);
}

.farm-sidebar-card-brands .farm-brand-link.is-active {
    color: #fdba74;
    font-weight: 700;
}

.farm-list-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.farm-list-intro {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: #5c6570;
    border-bottom: 1px solid #e8ecf0;
}

.farm-toolbar-search {
    display: flex;
    gap: 0;
    padding: 1rem 1.25rem;
    border-bottom: none;
    background: #f46717;
    overflow: visible;
    position: relative;
    z-index: 20;
    border-radius: 12px 12px 0 0;
}

.farm-toolbar-live-search {
    position: relative;
    flex: 1;
}

.farm-toolbar-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px 0 0 6px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    background: #fff;
    color: #1a2b4b;
}

.farm-toolbar-input:focus {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

.farm-toolbar-btn {
    border: none;
    background: #1e3a8a;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    padding: 0 1.35rem;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.farm-toolbar-btn:hover {
    filter: brightness(1.08);
}

.farm-toolbar-suggestions {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: 0;
    margin-top: 0;
    z-index: 99999;
    min-width: 0;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

/* Home index: hero + buscador grande + menu iconos */
.site-home-hero {
    position: relative;
    min-height: 46vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.site-home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.site-home-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2.5rem 1rem 2rem;
}

.site-home-brand {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.site-home-title {
    margin: 0;
    font-size: clamp(2rem, 4.6vw, 3rem);
    font-weight: 700;
    color: #fff;
}

.site-home-subtitle {
    margin: 0.65rem auto 1.4rem;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.site-home-search {
    max-width: 1800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.7rem;
}

.site-home-search .farm-toolbar-live-search {
    position: relative;
}

.site-home-search-icon {
    position: absolute;
    left: 1.35rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 2rem;
    z-index: 1;
}

.site-home-search-input {
    width: 100%;
    border: none;
    border-radius: 999px;
    font-size: 1.45rem;
    padding: 1rem 1.4rem 1rem 3.6rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.site-home-search-input:focus {
    outline: 2px solid rgba(29, 78, 216, 0.35);
}

.site-home-search-btn {
    border: none;
    border-radius: 999px;
    background: var(--farm-navy);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1.15rem;
    padding: 0 2rem;
    cursor: pointer;
    min-height: 64px;
}

.site-home-title-accent {
    font-style: italic;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-weight: 400;
}

.site-home-shortcuts-wrap {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.site-home-shortcuts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.site-home-shortcut-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: #1f2937;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-home-shortcut-item .material-icons {
    font-size: 16px;
    color: var(--farm-title-blue);
}

.site-home-shortcut-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.farm-list-subtitle {
    margin: 0;
    padding: 1rem 1.25rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: #3d4752;
}

.farm-featured-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-right: 1.25rem;
}

.farm-featured-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.farm-featured-view-btn {
    border: 1px solid #d6deea;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.farm-featured-view-btn.is-active {
    background: var(--farm-title-blue);
    color: #fff;
    border-color: var(--farm-title-blue);
}

.farm-featured-pane {
    display: none;
}

.farm-featured-pane.is-active {
    display: block;
}

.farm-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0.8rem 1.25rem 1rem;
}

.farm-featured-card {
    border: 1px solid #e7edf5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.farm-featured-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.farm-featured-card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border-bottom: 1px solid #e7edf5;
}

.farm-featured-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.6rem;
}

.farm-featured-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.7rem 0.8rem 0.9rem;
}

.farm-featured-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f3a5f;
    line-height: 1.3;
}

.farm-featured-card-brand {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    line-height: 1.4;
    align-self: flex-start;
}

.farm-featured-card-price .farm-price-cell {
    text-align: left;
}

/* Cuadrícula de productos estilo catálogo (foto + nombre + botón) */
.catalog-product-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 1.25rem 0.85rem;
    border-bottom: 1px solid #e7edf5;
    margin: 0 0 0.35rem;
}

.catalog-product-count {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.15rem;
    padding: 1.1rem 1.25rem 1.4rem;
    align-items: stretch;
}

.catalog-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.catalog-product-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.catalog-product-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}

.catalog-product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.catalog-product-card-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.9rem 0.95rem 1.05rem;
    flex: 1;
}

.catalog-product-card-brand {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 3px;
    padding: 0.08rem 0.4rem;
    line-height: 1.4;
}

.catalog-product-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a2b4b;
}

.catalog-product-card-title a {
    color: inherit;
    text-decoration: none;
}

.catalog-product-card-title a:hover {
    color: var(--md-sys-color-primary);
}

.catalog-product-card-price {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a2b4b;
}

.catalog-product-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    padding: 0.62rem 0.9rem;
    border-radius: 6px;
    background: var(--md-sys-color-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(234, 88, 12, 0.28);
}

.catalog-product-card-btn:hover {
    background: var(--md-sys-color-primary-dark);
    color: #fff;
}

.site-portada-wide .catalog-product-grid {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 640px) {
    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
        padding: 0.85rem 0.85rem 1.1rem;
    }

    .catalog-product-card-title {
        font-size: 0.88rem;
    }

    .catalog-product-card-btn {
        font-size: 0.7rem;
        padding: 0.5rem 0.45rem;
    }

    .catalog-product-toolbar {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

.farm-table-wrap {
    overflow-x: auto;
}

.farm-product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.farm-product-table thead th {
    text-align: left;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #8a939e;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e8ecf0;
    background: #fafbfc;
}

.farm-th-price {
    text-align: right;
    width: 140px;
}

.farm-product-table tbody td {
    vertical-align: middle;
    border-bottom: 1px solid #eef1f5;
    padding: 0.65rem 1.25rem;
}

.farm-table-rowlink {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.farm-table-imgwrap {
    flex-shrink: 0;
    width: 144px;
    height: 144px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d7dfeb;
    background: #ffffff;
}

.farm-table-imgwrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    padding: 0.35rem;
}

.farm-table-name {
    display: block;
    font-weight: 700;
    color: var(--farm-title-blue);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.farm-table-brand {
    display: block;
    font-size: 0.78rem;
    color: #7a8490;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.farm-table-snippet {
    display: block;
    font-size: 0.82rem;
    color: #6b7582;
    margin-top: 0.35rem;
    line-height: 1.45;
}

.farm-table-pricecell {
    text-align: right;
    vertical-align: middle;
}

.farm-price-cell {
    text-align: right;
}

.farm-price-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--farm-lime-dark);
}

.farm-price-usd {
    font-size: 0.78rem;
    color: #7a8490;
    margin-top: 0.2rem;
}

.farm-price-inquiry {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.45rem 0.9rem;
    background: var(--farm-title-blue);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.farm-list-empty,
.farm-catalog-more {
    padding: 1.25rem;
    margin: 0;
    text-align: center;
    color: #6b7582;
}

.farm-catalog-more a {
    color: var(--farm-title-blue);
    font-weight: 600;
}

.farm-pager-wrap {
    padding: 1rem 1.25rem 1.5rem;
}

.farm-pagination {
    justify-content: center;
}

/* ── Paginación: botones cuadrados ──────────────────────────────────────── */
ul.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.pagination li a,
ul.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.55rem;
    border: 1px solid #d7dfeb;
    border-radius: 6px;
    background: #fff;
    color: var(--md-sys-color-on-surface, #1a2535);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

ul.pagination li a:hover {
    background: var(--md-sys-color-primary, #EA580C);
    border-color: var(--md-sys-color-primary, #EA580C);
    color: #fff;
}

ul.pagination li.active a,
ul.pagination li.active span {
    background: var(--md-sys-color-primary, #EA580C);
    border-color: var(--md-sys-color-primary, #EA580C);
    color: #fff;
    cursor: default;
    pointer-events: none;
}

ul.pagination li.disabled a,
ul.pagination li.disabled span {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #aab0bc;
    cursor: default;
    pointer-events: none;
}

.farm-sponsors-below {
    padding: 2rem 0 3rem;
}

.footer.footer-farm {
    background: var(--farm-navy-deep);
    color: rgba(255, 255, 255, 0.88);
    margin-top: 0;
}

.footer-farm-mapband {
    background: var(--farm-footer-band);
    padding: 0.85rem 1.25rem;
    text-align: left;
}

.footer-farm-map-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
}

.footer-farm-map-icon {
    font-size: 1.85rem;
    color: rgba(255, 255, 255, 0.95);
    display: block;
    margin: 0;
    flex-shrink: 0;
}

.footer-farm-map-copy {
    min-width: 0;
}

.footer-farm-map-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.2;
}

.footer-farm-map-sub {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.35;
}

.footer-farm-menus {
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-farm-menus .footer-menu-list a {
    color: rgba(255, 255, 255, 0.85);
}

.footer-farm-bottom {
    background: var(--farm-navy-deep);
    padding: 0;
}

.footer-farm-bottom-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(0, 1fr));
    gap: 2rem 1.75rem;
    align-items: start;
    padding: 2.25rem 1.5rem 1.75rem;
}

.footer-farm-col {
    min-width: 0;
}

.footer-farm-heading {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fdba74;
}

.footer-farm-logo {
    color: #fff;
    font-size: 1.15rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: inline-flex;
    margin-bottom: 0.85rem;
}

.footer-farm-contact {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-farm-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-items: flex-start;
    margin-top: 0;
}

.footer-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.35;
    transition: color 0.18s;
}

.footer-contact-item:hover {
    color: #fdba74;
}

.footer-contact-item .material-icons {
    font-size: 1.05rem;
    opacity: 0.9;
    color: #f46717;
}

.footer-contact-wa {
    color: #4ade80;
}

.footer-contact-wa:hover {
    color: #86efac;
}

.footer-wa-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.footer-map-btns {
    display: flex;
    gap: 0.5rem;
    margin-top: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.footer-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: background 0.18s, border-color 0.18s, transform 0.15s;
}

.footer-map-btn:hover {
    background: #f46717;
    border-color: #f46717;
    color: #fff;
    transform: translateY(-1px);
}

.footer-map-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.footer-map-btn--waze,
.footer-map-btn--maps {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.footer-farm-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 1.5rem 1.1rem;
    text-align: center;
}

.footer-farm-legal p {
    margin: 0 auto;
    max-width: 1120px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.58);
}

.footer-farm-social {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

.farm-soc-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--farm-lime);
    display: inline-block;
    opacity: 0.85;
}

.farm-whatsapp-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 2000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.farm-whatsapp-fab .material-icons {
    font-size: 30px;
}

@media (max-width: 960px) {
    .site-home-search {
        grid-template-columns: 1fr;
    }

    .site-home-search-input {
        font-size: 1.15rem;
        padding: 1.45rem 1.25rem 1.45rem 3.4rem;
    }

    .site-home-search-btn {
        min-height: 72px;
        font-size: 1rem;
    }

    .site-portada-layout {
        grid-template-columns: 1fr;
    }

    .catalog-wide {
        grid-template-columns: 1fr !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .catalog-wide .farm-sidebar-aside {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .footer-farm-bottom-inner {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .footer-farm-contact-info,
    .footer-map-btns {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .footer-farm-social {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .farm-featured-header {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0.8rem;
    }

    .farm-featured-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .site-home-hero {
        min-height: 54vh;
    }

    .site-home-title {
        font-size: clamp(1.7rem, 8vw, 2.3rem);
    }

    .site-home-search-input {
        font-size: 0.98rem;
    }

    .site-home-shortcuts {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.95rem;
    }

    .site-home-shortcut-item {
        flex: 0 0 auto;
    }

    .header-farm .mobile-menu-toggle {
        display: block;
    }

    .header-farm-nav .nav-farm-icons {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0 1rem;
    }

    .header-farm-nav .nav-farm-icons.active {
        display: flex;
        /* Dark navy background so white text stays readable */
        background: #1a2b4b !important;
        border-top: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    }

    .nav-farm-icons > li > a.nav-farm-item {
        flex-direction: row;
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
        padding: 0.65rem 1rem;
        /* Ensure text is white on dark background */
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .nav-farm-icons > li > a.nav-farm-item:hover {
        background: rgba(255,255,255,0.08) !important;
        color: #fff !important;
    }

    .nav-farm-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .nav-farm-icons .nav-farm-icon {
        font-size: 22px;
    }

    .nav-farm-label {
        text-align: left;
        max-width: none;
        font-size: 0.85rem;
        font-weight: 700;
    }
}

/* ============================================================
   Logo Image — Header, Hero Banner y Footer
   ============================================================ */

/* --- Logo en el header (barra de navegación superior) --- */
.logo.logo-farm .logo-farm-img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 140px;
    max-height: 62px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    aspect-ratio: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    transition: filter 0.25s ease, transform 0.25s ease;
}

.logo.logo-farm:hover .logo-farm-img {
    filter: drop-shadow(0 3px 16px rgba(0, 0, 0, 0.6)) brightness(1.08);
    transform: translateY(-1px);
}

/* --- Logo en el hero banner (portada) --- */
.site-home-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.site-home-logo-img {
    display: block;
    max-height: 70px;
    max-width: 238px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.55));
    animation: logo-hero-enter 0.6s ease both;
}

@keyframes logo-hero-enter {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Logo en el footer --- */
.footer-farm-logo .footer-farm-logo-img {
    display: block;
    max-height: 72px !important;
    max-width: 140px !important;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.25s ease;
    opacity: 0.95;
}

.footer-farm-logo:hover .footer-farm-logo-img {
    opacity: 1;
}

/* Responsive: logo más pequeño en móvil, sin aplastar la proporción */
@media (max-width: 640px) {
    .header-farm-brand-row {
        min-height: 72px;
        padding: 0.3rem 0 0.4rem;
    }

    .logo.logo-farm .logo-farm-img {
        max-height: 45px !important;
        max-width: 118px !important;
    }

    .site-home-logo-img {
        max-height: 70px;
        max-width: 238px;
    }

    .footer-farm-logo .footer-farm-logo-img {
        max-height: 56px !important;
        max-width: 120px !important;
    }

    .footer-farm-bottom-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.75rem 1.15rem 1.35rem;
    }

    .footer-farm-map-inner {
        flex-direction: column;
        text-align: center;
        gap: 0.35rem;
    }
}

/* ============================================================
   Dashboard — Badge de versión
   ============================================================ */
.dashboard-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    background: rgba(244, 103, 23, 0.12);
    color: var(--md-sys-color-primary);
    border: 1px solid rgba(244, 103, 23, 0.28);
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

[data-theme="dark"] .dashboard-version-badge {
    background: rgba(244, 103, 23, 0.18);
    color: #ffb088;
    border-color: rgba(244, 103, 23, 0.35);
}

/* ================================================================
   RESPONSIVE OVERHAUL — mobile-first fixes
   ================================================================ */

/* --- Base: prevent horizontal scroll on all devices --- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* ----------------------------------------------------------------
   MOBILE SIDEBAR TOGGLE (home + category pages)
   ---------------------------------------------------------------- */
.mobile-sidebar-toggle {
    display: none;
    width: 100%;
    background: var(--farm-sidebar-bg, #1e3a8a);
    color: #fff;
    border: none;
    padding: 0.85rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0;
    font-family: inherit;
    letter-spacing: 0.02em;
}

.mobile-sidebar-toggle .material-icons { font-size: 22px; }
.mobile-sidebar-toggle .toggle-arrow   { transition: transform 0.3s ease; }
.mobile-sidebar-toggle.is-open .toggle-arrow { transform: rotate(180deg); }

.sidebar-collapsible {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ----------------------------------------------------------------
   BREAKPOINT ≤ 960px  — layout collapses, sidebar becomes toggle
   ---------------------------------------------------------------- */
@media (max-width: 959px) {

    /* Home page layout: sidebar above, content below */
    .site-portada-layout {
        grid-template-columns: 1fr !important;
        padding-top: 1rem !important;
        gap: 1rem !important;
    }

    .mobile-sidebar-toggle { display: flex; }

    .sidebar-collapsible {
        display: none;
        padding-top: 0.5rem;
    }

    .sidebar-collapsible.is-open { display: flex; }

    /* Category view inner grid */
    .category-view .products-section > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .category-view aside {
        width: 100% !important;
        height: auto !important;
    }
}

/* ----------------------------------------------------------------
   BREAKPOINT ≤ 768px  — mobile adjustments
   ---------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Header inner padding */
    .header-farm-inner {
        padding: 0.3rem 0.85rem 0.65rem !important;
    }

    .header-farm .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 8px;
        width: 40px;
        height: 40px;
        padding: 0;
    }

    /* Hide dollar rate on very small header */
    .header-farm-rate { display: none; }

    /* Topbar: search takes full available space */
    .header-farm-topbar-right {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .header-farm-search-wrap .farm-header-search.header-search-wrapper {
        min-width: 120px !important;
        max-width: 200px;
    }

    /* Mobile nav — clean drawer-style dropdown */
    .header-farm-nav .nav-farm-icons {
        display: none;
        flex-direction: column !important;
        width: 100%;
        padding: 0.4rem 0 0.75rem !important;
        gap: 0.1rem !important;
        border-top: 1px solid rgba(255,255,255,0.12);
        margin-top: 0.4rem;
    }

    .header-farm-nav .nav-farm-icons.active { display: flex !important; }

    .nav-farm-icons > li { width: 100%; }

    .mega-panel {
        position: static;
        display: none;
        grid-template-columns: 1fr;
        box-shadow: none;
        border-top: 1px solid #e5e7eb;
        max-height: none;
    }

    .has-mega.is-open > .mega-panel {
        display: grid;
    }

    .mega-featured {
        min-height: 140px;
    }

    .mega-columns {
        grid-template-columns: 1fr 1fr;
        max-height: 50vh;
        padding: 1rem;
    }

    .mega-brands-grid {
        grid-template-columns: 1fr;
    }

    .nav-farm-icons > li > a.nav-farm-item {
        flex-direction: row !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
        width: 100% !important;
        padding: 0.55rem 0.85rem !important;
        border-radius: 8px;
        gap: 0.75rem;
    }

    .nav-farm-icon-wrap {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0;
    }

    .nav-farm-icons .nav-farm-icon { font-size: 20px !important; }

    .nav-farm-label {
        text-align: left !important;
        max-width: none !important;
        font-size: 0.82rem !important;
        letter-spacing: 0.03em;
    }

    /* Products grid: 2 columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* Product card text smaller */
    .product-card .product-name { font-size: 0.82rem !important; }

    /* Search suggestions: smaller thumbnails */
    .header-search-suggestion-thumb {
        width: 56px !important;
        height: 56px !important;
    }

    .header-search-suggestion-item {
        padding: 0.65rem 0.9rem !important;
        gap: 0.6rem !important;
    }

    .header-search-suggestion-name { font-size: 0.88rem !important; }

    .header-search-suggestions {
        max-height: 60vh;
        min-width: 0 !important;
    }

    /* Category cards: 2 columns */
    .category-view div[style*="minmax(200px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Category view sidebar: hide the accordion labels text */
    .category-view aside h3 { font-size: 0.9rem; }

    /* Farm product table: reducir imagen en móvil */
    .farm-table-imgwrap {
        width: 72px;
        height: 72px;
        flex-shrink: 0;
    }

    /* Breadcrumbs centered and readable on small screens */
    .farm-breadcrumbs {
        overflow-x: visible;
    }
    .breadcrumbs {
        flex-wrap: wrap !important;
        justify-content: center;
        white-space: normal;
        padding: 0.2rem 0.5rem !important;
        font-size: 0.92rem !important;
    }

    /* Footer menus stack */
    .footer-menu-container {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 1rem 1.25rem !important;
    }

    .footer-menu-column { padding: 0.5rem 0 !important; }

    .footer-farm-menus { padding: 0 !important; }

    .footer-farm-bottom-inner {
        padding: 1.5rem 1rem !important;
        gap: 1rem !important;
    }
}

/* ----------------------------------------------------------------
   BREAKPOINT ≤ 640px  — small phones
   ---------------------------------------------------------------- */
@media (max-width: 640px) {

    /* Container padding */
    .container-farm {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Hero section */
    .site-home-hero { min-height: 42vh; }

    .site-home-hero-inner {
        padding: 1.5rem 0.75rem 1.75rem !important;
    }

    .site-home-title {
        font-size: clamp(1.35rem, 7vw, 2rem) !important;
        margin-bottom: 0.75rem;
    }

    /* Hero search: single column */
    .site-home-search {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    .site-home-search-input {
        font-size: 1rem !important;
        padding: 0.9rem 1rem 0.9rem 2.7rem !important;
        border-radius: 12px !important;
    }

    .site-home-search-icon {
        font-size: 1.4rem !important;
        left: 0.75rem !important;
    }

    .site-home-search-btn {
        min-height: 48px !important;
        font-size: 0.92rem !important;
        padding: 0.7rem 1.5rem !important;
        border-radius: 12px !important;
    }

    /* Products grid: 1 column on very small */
    .products-grid {
        grid-template-columns: 1fr !important;
    }

    /* Category cards: 1 column */
    .category-view div[style*="minmax(200px"] {
        grid-template-columns: 1fr !important;
    }

    /* Product detail */
    .product-view {
        padding: 0.75rem !important;
    }

    /* Toolbar search on products page */
    .farm-toolbar-search {
        padding: 0.65rem 0.75rem !important;
    }

    .header-farm-brand-row {
        min-height: 76px;
    }

    .logo.logo-farm .logo-farm-img {
        max-height: 50px !important;
        max-width: 126px !important;
    }

    /* WhatsApp FAB position */
    .farm-whatsapp-fab {
        width: 50px !important;
        height: 50px !important;
        bottom: 1rem !important;
        right: 1rem !important;
    }
}

/* ----------------------------------------------------------------
   Fix: category view sidebar accordion already has its own CSS
   but the outer container grid needs mobile override
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
    /* The inline style grid in category/view.php */
    .category-view .products-section > div {
        grid-template-columns: 1fr !important;
    }
}

/* ----------------------------------------------------------------
   Ensure search suggestions always float above everything
   (applies to all search instances site-wide)
   ---------------------------------------------------------------- */
#header-search-suggestions,
#portada-search-suggestions,
#catalog-search-suggestions,
.header-search-suggestions,
.farm-toolbar-suggestions {
    z-index: 99999 !important;
}

.site-home-intro {
    margin: 1.25rem auto 0;
    max-width: 40rem;
    color: #fff;
    font-size: 1rem;
    line-height: 1.55;
    text-align: center;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.footer-farm-nap {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-style: normal;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.footer-farm-nap strong {
    display: block;
}

.catalog-tour-replay {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1a2b4b;
    border-radius: 999px;
    padding: 0.28rem 0.75rem 0.28rem 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.catalog-tour-replay .material-icons {
    font-size: 18px;
    color: var(--md-sys-color-primary);
}

.catalog-tour-replay:hover {
    border-color: var(--md-sys-color-primary);
    background: #fff7ed;
}

.catalog-tour[hidden] {
    display: none !important;
}

.catalog-tour {
    position: fixed;
    inset: 0;
    z-index: 100050;
    pointer-events: auto;
}

.catalog-tour-target {
    position: relative;
    z-index: 1;
}

.catalog-tour-overlay {
    display: none;
}

.catalog-tour-spotlight {
    position: fixed;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72);
    outline: 3px solid #f46717;
    outline-offset: 0;
    pointer-events: none;
    transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}

.catalog-tour-pointer {
    position: fixed;
    z-index: 100051;
    font-size: 36px;
    color: #f46717;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
    animation: catalog-tour-bounce 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes catalog-tour-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

.catalog-tour-card {
    position: fixed;
    z-index: 100052;
    width: min(340px, calc(100vw - 24px));
    background: #fff;
    color: #1c1917;
    border-radius: 14px;
    padding: 1.05rem 1.15rem 1.1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
}

.catalog-tour-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ea580c;
}

.catalog-tour-title {
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a2b4b;
}

.catalog-tour-text {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #334155;
}

.catalog-tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.catalog-tour-skip,
.catalog-tour-next {
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.catalog-tour-skip {
    border: 0;
    background: transparent;
    color: #64748b;
}

.catalog-tour-next {
    border: 0;
    background: var(--md-sys-color-primary);
    color: #fff;
}
