/* ============================================================================
   ENCARNAYORK - COMERCIO BASE CSS (CORREGIDO)
   RUTA PUBLICA: /assets/css/x/c1.css (via manifest)
   PREFIJO: c
   CORRECCION v2.0: Reemplazado :root por scope de clase .ey-commerce-theme
   ============================================================================ */

/* Scope de clase en lugar de :root (Maestro v2.1 [02.27]) */
.ey-commerce-theme,
.ey-commerce-page {
    --ey-bg: #f5f7fb;
    --ey-surface: #ffffff;
    --ey-text: #172033;
    --ey-muted: #5f6b85;
    --ey-border: #e3e8f2;
    --ey-primary: #315efb;
    --ey-primary-strong: #2448cf;
    --ey-success: #16a34a;
    --ey-shadow: 0 14px 36px rgba(28, 41, 72, 0.12);
    --ey-radius-lg: 22px;
    --ey-radius-md: 16px;
    --ey-radius-sm: 12px;
    --ey-shell: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ey-bg);
    color: var(--ey-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.ey-commerce-page {
    padding: 0 0 48px;
}

.ey-commerce-shell {
    width: min(calc(100% - 32px), var(--ey-shell));
    margin: 0 auto;
}

.ey-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 32px 32px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #315efb 0%, #4728a5 100%);
    color: #ffffff;
}

.ey-hero__content {
    width: min(calc(100% - 32px), var(--ey-shell));
    margin: 0 auto;
    padding: 54px 0 50px;
}

.ey-hero__brand {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ey-hero__logo {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.ey-hero__logo--fallback {
    display: grid;
    place-items: center;
    background: #d92d20;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
}

.ey-hero h1 {
    margin: 10px 0 8px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.04;
}

.ey-hero p {
    max-width: 760px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.92);
}

.ey-hero__meta {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
}

.ey-section {
    background: var(--ey-surface);
    border: 1px solid var(--ey-border);
    border-radius: var(--ey-radius-lg);
    box-shadow: var(--ey-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.ey-section__header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.ey-section__header h2,
.ey-store-hero h1,
.ey-contact-hero h1,
.ey-reviews-hero h1 {
    margin: 0;
    line-height: 1.1;
}

.ey-section__header p,
.ey-store-hero p,
.ey-contact-hero p,
.ey-reviews-hero p {
    margin: 8px 0 0;
    color: var(--ey-muted);
}

.ey-card {
    background: #f9fbff;
    border: 1px solid var(--ey-border);
    border-radius: var(--ey-radius-md);
    padding: 18px;
}

.ey-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(49, 94, 251, 0.12);
    color: var(--ey-primary-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.ey-pill--light {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.ey-pill--soft {
    background: #eef3ff;
    color: var(--ey-primary-strong);
}

.ey-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ey-actions--compact {
    margin-bottom: 24px;
}

.ey-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
    box-shadow: 0 8px 18px rgba(42, 68, 154, 0.08);
}

.ey-btn:hover {
    transform: translateY(-1px);
}

.ey-btn--primary {
    background: var(--ey-primary);
    color: #ffffff;
}

.ey-btn--ghost {
    background: #ffffff;
    color: var(--ey-text);
    border-color: var(--ey-border);
}

.ey-btn--success {
    background: var(--ey-success);
    color: #ffffff;
}

.ey-link {
    color: var(--ey-primary-strong);
    font-weight: 700;
    text-decoration: none;
}

.ey-alert {
    margin-bottom: 24px;
    padding: 14px 16px;
    background: #eef5ff;
    color: var(--ey-primary-strong);
    border: 1px solid #dbe8ff;
    border-radius: 14px;
}

.ey-map-info__grid,
.ey-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px;
}

.ey-map-placeholder,
.ey-map-embed {
    min-height: 320px;
    border-radius: var(--ey-radius-md);
    overflow: hidden;
    background: #eef2f7;
    border: 1px solid var(--ey-border);
}

.ey-map-embed iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
}

.ey-contact-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
    color: var(--ey-muted);
}

.ey-store-grid,
.ey-gallery-grid,
.ey-team-grid,
.ey-reviews-grid {
    display: grid;
    gap: 20px;
}

.ey-store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ey-store-grid--preview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ey-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ey-team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ey-reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ey-product-card,
.ey-review-card,
.ey-team-card,
.ey-service-card {
    background: var(--ey-surface);
    border: 1px solid var(--ey-border);
    border-radius: var(--ey-radius-md);
    box-shadow: 0 10px 28px rgba(27, 41, 75, 0.08);
    overflow: hidden;
}

.ey-product-card__media {
    display: block;
    aspect-ratio: 4 / 3;
    background: #eef2f7;
    overflow: hidden;
}

.ey-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ey-product-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--ey-muted);
    font-weight: 700;
}

.ey-product-card__body {
    padding: 16px;
}

.ey-product-card__title,
.ey-review-card h2,
.ey-team-card h3,
.ey-service-card h2 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    line-height: 1.25;
}

.ey-product-card__title a,
.ey-service-card h2 a {
    text-decoration: none;
}

.ey-product-card__summary,
.ey-review-card p,
.ey-service-card p {
    margin: 0 0 14px;
    color: var(--ey-muted);
}

.ey-product-card__meta,
.ey-service-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.ey-product-card__price {
    font-size: 1.08rem;
    color: var(--ey-primary-strong);
}

.ey-product-card__stock {
    color: var(--ey-muted);
    font-size: 0.92rem;
}

.ey-product-card__actions {
    margin-top: 16px;
}

.ey-rating-summary {
    display: grid;
    gap: 4px;
    min-width: 160px;
    text-align: right;
}

.ey-rating-summary strong {
    font-size: 2rem;
    line-height: 1;
}

.ey-rating-summary span {
    font-size: 1.1rem;
    color: #f59e0b;
}

.ey-review-card {
    padding: 18px;
}

.ey-review-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ey-review-card__header h2,
.ey-review-card__header h3 {
    margin: 0;
}

.ey-review-card__rating {
    text-align: right;
    color: #f59e0b;
}

.ey-cta-card {
    background: linear-gradient(135deg, #1f4bff 0%, #4527a6 100%);
    color: #ffffff;
    border-radius: 24px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 18px 40px rgba(36, 57, 131, 0.22);
}

.ey-cta-card h2,
.ey-cta-card p {
    margin: 0;
}

.ey-cta-card p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.ey-empty-state {
    text-align: center;
}

.ey-faq-list {
    display: grid;
    gap: 12px;
}

.ey-faq-item {
    border: 1px solid var(--ey-border);
    border-radius: 14px;
    background: #fcfdff;
    padding: 14px 16px;
}

.ey-faq-item summary {
    cursor: pointer;
    font-weight: 700;
}

.ey-rubros-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ey-gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #eef2f7;
    aspect-ratio: 4 / 3;
}

.ey-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ey-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.ey-service-card__body {
    padding: 18px;
}

.ey-store-hero,
.ey-contact-hero,
.ey-reviews-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 980px) {
    .ey-store-grid,
    .ey-store-grid--preview,
    .ey-gallery-grid,
    .ey-team-grid,
    .ey-reviews-grid,
    .ey-service-grid,
    .ey-map-info__grid,
    .ey-contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ey-store-hero,
    .ey-contact-hero,
    .ey-reviews-hero,
    .ey-cta-card {
        flex-direction: column;
        align-items: stretch;
    }

    .ey-rating-summary {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .ey-commerce-shell {
        width: min(calc(100% - 20px), var(--ey-shell));
    }

    .ey-hero__content {
        width: min(calc(100% - 20px), var(--ey-shell));
        padding: 38px 0 34px;
    }

    .ey-hero__brand {
        flex-direction: column;
    }

    .ey-store-grid,
    .ey-store-grid--preview,
    .ey-gallery-grid,
    .ey-team-grid,
    .ey-reviews-grid,
    .ey-service-grid,
    .ey-map-info__grid,
    .ey-contact-grid {
        grid-template-columns: 1fr;
    }

    .ey-section {
        padding: 18px;
    }
}