:host {
    display: flex;
    color: var(--text, #2A2A2A);
    font-family: 'Inter', sans-serif;
    height: 100%;
    max-height: 100%;
}

:host {
    display: block;
}


.storefront {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.main-view {
    flex: 1;
    overflow-y: auto;
    padding: var(--padding-value);
    padding-top: 0 !important;
}

.search-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: var(--background-lightgray, #f4f4f4);
    padding: 10px;
    border-radius: 999px;
}

.search-icon {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
    margin-left: 4px;
}

    .search-icon path {
        fill: var(--text, #2A2A2A);
    }

.search-input {
    box-sizing: border-box;
    border: none;
    width: 100%;
    background: transparent;
    color: inherit;
    font: inherit;
    outline: none;
    font-size: 0.875rem;
}

    .search-input::placeholder {
        color: #888;
    }


.section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .section[hidden] {
        display: none !important;
    }

.section-header {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.see-more {
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text, #888);
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.see-more-icon {
    width: 12px;
    height: 12px;
    display: block;
    flex-shrink: 0;
    transform: rotate(-90deg);
}

.see-more:hover {
    text-decoration: underline;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.product-card,
.category-card {
    box-sizing: border-box;
    background: var(--background-lightgray);
    border-radius: var(--card-border-radius, 26px);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    height: 100%;
}

    .category-card > button {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0;
    }

    .product-card:hover, .category-card:hover {
        cursor: pointer;
    }

.product-thumb,
.category-thumb {
    min-height: 0;
    aspect-ratio: 1;
    width: 100%;
    border-radius: 18px;
    object-fit: contain;
    background-color: #ffffff;
}

.product-name,
.category-name {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.home-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-height: 100%;
}

.main-view[hidden],
.storefront[hidden] {
    display: none !important;
}

.favorites-full-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .favorites-full-view[hidden] {
        display: none !important;
    }

.favorites-full-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
}

.favorites-back {
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text, #888);
    padding: 8px 10px 8px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.favorites-back-icon {
    width: 12px;
    height: 12px;
    display: block;
    flex-shrink: 0;
    transform: rotate(90deg);
}

.favorites-back:hover {
    text-decoration: underline;
}

.favorites-full-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    max-width: 60%;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.favorites-full-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.categories-back {
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text, #888);
    padding: 8px 10px 8px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

    .categories-back:hover {
        text-decoration: underline;
    }

.categories-full-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .categories-full-view[hidden] {
        display: none !important;
    }

.categories-full-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

a {
    text-decoration: none;
    color: #2A2A2A;
}

@media (min-width: 560px) {
    .favorites-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .favorites-full-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-full-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Skeleton Loading Animation */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

.skeleton-text {
    width: 100%;
    height: 12px;
    border-radius: 4px;
    margin: 4px auto 0;
}

@keyframes skeleton-loading {
    0% {
        background-color: hsl(0, 0%, 85%);
    }

    100% {
        background-color: hsl(0, 0%, 96%);
    }
}





.header-wrapper {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: var(--company-space-4, 12px);
    min-width: 0;
    padding: var(--padding-value);
}

.profile-img {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #efefef;
    margin-top: 2px;
    transition: width 0.22s ease, height 0.22s ease;
}

.header-wrapper.is-contact-expanded .profile-img {
    width: 78px;
    height: 78px;
}

.content_fab {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.company-name {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

    .company-name h1 {
        margin: 0;
        font-size: 1.25rem;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        transition: font-size 0.22s ease;
        font-weight: bold;
    }

.header-wrapper.is-contact-expanded .company-name h1 {
    font-size: 1.0625rem;
}

.contact-details {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.mail-link {
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--highlight-blue, #0A7AFB);
    word-break: break-all;
}

    .mail-link:hover {
        text-decoration: underline;
    }

.social-media {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-link-img {
    width: 22px;
    height: 22px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text, #2A2A2A);
    text-decoration: none;
}

    .social-link:hover {
        color: var(--highlight-blue, #0A7AFB);
    }

    .social-link svg {
        display: block;
        width: 22px;
        height: 22px;
    }

.btn-primary {
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    background: var(--background-lightgray);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.header-wrapper.is-contact-expanded .btn-primary {
    padding: 6px 8px;
}

.contact-btn-label {
    display: inline;
}

.header-wrapper.is-contact-expanded .contact-btn-label {
    display: none;
}

.contact-arrow {
    width: 12px;
    height: 12px;
    display: block;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.header-wrapper.is-contact-expanded .contact-arrow {
    transform: rotate(180deg);
}

.header-wrapper.is-contact-expanded #contact-details-panel {
    display: flex;
}

/* Base shimmer */
.skeleton {
    background: linear-gradient(90deg, #eee, #f5f5f5, #eee);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 6px;
}

#btn_contact_info {
    flex-shrink: 0;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    border-radius: 999px;
    background: var(--background-lightgray);
    color: var(--text);
    cursor: pointer;
    font-style: inherit;
    font-variant: inherit;
    font-stretch: inherit;
    line-height: inherit;
    font-family: inherit;
    font-optical-sizing: inherit;
    font-size-adjust: inherit;
    font-kerning: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-language-override: inherit;
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Layout mantiene tu estructura */
.skeleton-header {
    pointer-events: none;
}

/* Imagen */
.skeleton-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

/* Nombre empresa */
.skeleton-title {
    height: 18px;
    width: 60%;
}

/* Bot�n */
.skeleton-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
}

.skeleton-btn-text {
    width: 50px;
    height: 10px;
}

.skeleton-icon {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Contacto */
.skeleton-text {
    width: 70%;
    height: 12px;
}

/* Redes */
.skeleton-social {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.hidden {
    display: none;
}


@media (max-width: 560px) {
    #btn_contact_info {
        padding: 6px 8px;
    }
}
