body { font-family: Arial, sans-serif; margin: 0; background: #f7f7f8; color: #222; }
.container { max-width: 1000px; margin: 0 auto; padding: 20px; }
.card { background: #fff; border: 1px solid #ddd; padding: 16px; border-radius: 6px; }
/* Header publico: verde vivo (#A7CF2A familia), degradado marcado, borde inferior mas oscuro */
.home-header-wrap {
    background: linear-gradient(180deg, #bfe04a 0%, #A7CF2A 38%, #8fb81e 100%);
    border-bottom: 3px solid #4a6210;
    box-shadow: 0 5px 14px rgba(40, 70, 5, 0.22);
}
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
    min-height: 52px;
}
/* Logo horizontal: ~210x96 desktop (+~25px vs antes), proporcional en movil */
.home-header__brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(210px, 100%);
}
.home-header__brand--text {
    max-width: none;
    white-space: nowrap;
}
.home-header__brand--logo {
    flex-shrink: 0;
    max-width: min(210px, 44vw);
}
.home-header__logo-box {
    width: min(210px, 100%);
    max-width: 100%;
    height: 96px;
    max-height: 96px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 10px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
@media (max-width: 720px) {
    .home-header__brand--logo {
        max-width: min(160px, 48vw);
    }
    .home-header__logo-box {
        height: 72px;
        max-height: 72px;
    }
}
@media (max-width: 480px) {
    .home-header__brand--logo {
        max-width: min(132px, 54vw);
    }
    .home-header__logo-box {
        height: 58px;
        max-height: 58px;
    }
}
.home-header__search {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}
.home-header__search-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 520px;
    height: 42px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid rgba(30, 50, 20, 0.35);
    border-radius: 10px;
    background: #fff;
    font-size: 0.95rem;
    color: #222;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.home-header__search-input::placeholder {
    color: #5c6b62;
}
.home-header__search-input:hover {
    border-color: rgba(30, 50, 20, 0.5);
}
.home-header__search-input:focus {
    outline: none;
    border-color: #0b3d5c;
    box-shadow: 0 0 0 3px rgba(11, 61, 92, 0.14);
}
.home-header__search-btn {
    flex: 0 0 auto;
    height: 42px;
    box-sizing: border-box;
    padding: 0 20px;
    border: none;
    border-radius: 10px;
    background: #0b3d5c;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(11, 61, 92, 0.22);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.home-header__search-btn:hover {
    background: #082f47;
    box-shadow: 0 3px 8px rgba(11, 61, 92, 0.28);
}
.home-header__search-btn:active {
    background: #062436;
}
.home-header__login {
    min-width:170px;
    text-align:right;
    white-space:nowrap;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:6px 10px;
}
.home-header__login a {
    color: #061a26;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.home-header__login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.home-header__login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(10, 24, 35, 0.35);
    background: rgba(255, 255, 255, 0.9);
}
.home-header__login-icon svg {
    width: 18px;
    height: 18px;
    fill: #111;
    display: block;
}
.home-header__login-text {
    display: none;
}
.home-header__title-link {
    color: #061a26;
    text-decoration: none;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.home-header__title-link:hover { text-decoration: underline; }
.home-header__logo-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    line-height: 0;
}
.home-header__logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
    display: block;
}
.home-header__sep { color: rgba(20, 35, 10, 0.55); font-weight: 600; }
.home-header__logout-form { display:inline; margin:0; padding:0; }
.home-header__logout-btn {
    background:transparent;
    border:none;
    color:#061a26;
    font-weight:700;
    cursor:pointer;
    padding:0;
    font:inherit;
    text-decoration:underline;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.home-header__logout-btn:hover { color: #020d14; }

/* Home: layout + filtros laterales */
.home-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

.home-filters {
    background: #0c2340;
    color: #e8eef5;
    border-radius: 10px;
    padding: 16px 14px;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #06182a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.home-filters__title {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 8px;
}

.home-filters__item {
    margin: 0 0 8px 0;
}

.home-filters__link {
    color: #b8d4f0;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    padding: 4px 0;
}

.home-filters__link:hover {
    color: #fff;
    text-decoration: underline;
}

.home-filters__link--active {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.home-main { min-width: 0; }

.home-map-card {
    margin-bottom: 14px;
    padding: 14px;
}
.home-map-card__title {
    margin: 0 0 8px;
    font-size: 1.02rem;
}

/* Home: controles del mapa a la izquierda, mapa a la derecha (solo esta página) */
.home-map-panel {
    display: grid;
    grid-template-columns: minmax(200px, 42%) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.home-map-controls {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.home-map-controls .store-map__actions {
    margin-bottom: 0;
}
.home-map-controls .store-map__status {
    margin-top: 0;
}
.home-map-canvas {
    min-width: 0;
}
/* Mapa home más contenido que el genérico .store-map */
.home-map-canvas .store-map.home-store-map {
    width: 100%;
    min-height: 300px;
    height: 320px;
    max-height: 340px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .home-map-panel {
        grid-template-columns: 1fr;
    }
    .home-map-canvas .store-map.home-store-map {
        min-height: 240px;
        height: 260px;
        max-height: 280px;
    }
}

.home-map-card__filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}
.home-map-card__filter label {
    font-weight: 600;
    font-size: 0.9rem;
}
.home-map-card__filter-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 320px;
}
.home-map-card__filter-search {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    border: 1px solid #c7d0db;
    border-radius: 6px;
    background: #fff;
    font-size: 0.92rem;
}
.home-map-card__filter-select {
    min-width: 180px;
    max-width: 100%;
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #c7d0db;
    border-radius: 6px;
    background: #fff;
}
.store-map {
    width: 100%;
    min-height: 250px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}
.store-map--detail {
    min-height: 230px;
}
.store-map__status {
    margin: 8px 0 0;
    color: #4b5563;
    font-size: 0.92rem;
}
.store-map__actions {
    margin-bottom: 8px;
}
.store-map__geolocate-btn {
    border: 1px solid #1d4ed8;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 6px;
    padding: 6px 10px;
    font-weight: 600;
    cursor: pointer;
}
.store-map__geolocate-btn:hover {
    background: #dbeafe;
}

.home-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.home-store-grid > * {
    min-width: 0;
}

.home-store-card {
    padding: 10px 10px 11px;
    border: 2px solid #2a3a4a;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 100%;
}

.home-store-card__media {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #cfd6e0;
    margin-bottom: 6px;
    width: 100%;
    max-width: 100%;
    height: 80px;
    min-height: 0;
    background: #e8ecf2;
    position: relative;
    flex-shrink: 0;
}
@media (min-width: 600px) {
    .home-store-card__media {
        height: 88px;
    }
}

.home-store-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.home-store-card__title {
    margin: 5px 0 5px 0;
    font-size: 0.94rem;
    line-height: 1.25;
    color: #0c2340;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.home-store-card__meta {
    margin: 0 0 3px 0;
    font-size: 0.78rem;
    line-height: 1.25;
    color: #333;
}

.home-store-card__line {
    margin: 0 0 2px 0;
    font-size: 0.78rem;
    line-height: 1.25;
    color: #444;
}

.home-store-card__cta {
    margin-top: auto;
    padding: 6px 8px;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    color: #fff;
    background: #0b3d5c;
    border-radius: 5px;
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.2;
}

.home-store-card__cta:hover {
    background: #061a2b;
    color: #fff;
}

.home-empty-card {
    border: 2px solid #cfd6e0;
    margin: 0;
}

.home-pagination {
    margin-top: 18px;
    border: 2px solid #cfd6e0;
}

.home-pagination__inner {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.home-pagination__link {
    color: #0b3d5c;
    font-weight: 600;
    text-decoration: none;
}

.home-pagination__link:hover {
    text-decoration: underline;
}

.home-pagination__link--current {
    color: #000;
    text-decoration: underline;
}

/* Banner tienda publica (full bleed) */
.store-hero-bleed {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 18px;
    max-height: 280px;
    overflow: hidden;
    background: #0c2340;
    border-bottom: 3px solid #2a3a4a;
}

.store-hero-bleed__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.store-public-card {
    border: 2px solid #cfd6e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.store-public-card > h2 {
    margin: 2px 0 8px;
}
.store-public-card > h3 {
    margin: 18px 0 8px;
}
.store-public-card__description {
    margin: 0 0 12px;
    color: #374151;
    line-height: 1.45;
}
.store-public-card__meta {
    display: grid;
    gap: 5px;
    margin-bottom: 8px;
}
.store-public-card__meta p {
    margin: 0;
}

/* Ficha pública: info + mapa en dos columnas (desktop) */
.store-detail-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 4px;
}
.store-detail-info {
    min-width: 0;
}
.store-detail-info__title {
    margin: 2px 0 8px;
}
.store-detail-map-wrap {
    min-width: 0;
}
.store-detail-map__heading {
    margin: 0 0 8px;
    font-size: 1.05rem;
}
.store-detail-map-wrap .store-map--detail {
    min-height: 280px;
}
.store-detail-map__fallback {
    margin: 0;
    color: #4b5563;
    font-size: 0.94rem;
}

/* Catálogo público: filtros + cards (misma línea visual que home) */
.store-catalog {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.store-catalog__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
}
.store-catalog__empty {
    margin: 8px 0 0;
    color: #4b5563;
    font-size: 0.94rem;
}
.store-catalog-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}
.store-catalog-filters__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.store-catalog-filters__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}
.store-catalog-filters__select {
    padding: 7px 8px;
    border-radius: 6px;
    border: 1px solid #c7d0db;
    background: #fff;
    font-size: 0.92rem;
    max-width: 100%;
    box-sizing: border-box;
}
.store-catalog-filters__actions {
    margin: 0 0 8px;
}
.store-catalog-filters__reset {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
}
.store-catalog-filters__reset:hover {
    text-decoration: underline;
}

.store-catalog-filters__noscript {
    margin: 8px 0 0;
}
.store-catalog-filters__noscript-btn {
    border: 1px solid #0b3d5c;
    background: #0b3d5c;
    color: #fff;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.store-catalog-filters__noscript-btn:hover {
    background: #061a2b;
}


.store-catalog-filters--active .store-catalog-filters__select {
    border-color: #15803d;
    box-shadow: 0 0 0 1px rgba(21, 128, 61, 0.2);
}

.store-products-container {
    transition: opacity 0.15s ease;
}

.store-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.store-product-grid > * {
    min-width: 0;
}
.store-product-card {
    padding: 10px 10px 11px;
    border: 2px solid #2a3a4a;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 100%;
}
.store-product-card__name {
    margin-top: 4px;
}
.store-product-card__price {
    margin: 6px 0 0;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #15803d;
}

.store-vacation-banner {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.home-store-card__badge {
    margin: 0 0 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #b45309;
}

@media (max-width: 900px) {
    .store-detail-hero {
        grid-template-columns: 1fr;
    }
    .store-detail-map-wrap .store-map--detail {
        min-height: 220px;
    }
}

@media (max-width: 720px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    .home-filters {
        max-height: none;
    }
    .store-map {
        min-height: 210px;
    }
    .store-map--detail {
        min-height: 200px;
    }
}

/* Responsive hardening */
.auth-card {
    max-width: 520px;
    margin: 0 auto;
}
.auth-card input,
.auth-card textarea,
.auth-card select,
.auth-card button {
    width: 100%;
    box-sizing: border-box;
}
.auth-card button {
    min-height: 40px;
}
.card input[style*="min-width"] {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
}
.store-public-card img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 960px) {
    .container {
        padding: 14px;
    }
    .home-header {
        flex-wrap: wrap;
        row-gap: 10px;
    }
    .home-header__brand {
        order: 1;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .home-header__search {
        order: 2;
        flex: 1 1 100%;
    }
    .home-header__login {
        order: 3;
        flex: 1 1 100%;
        min-width: 0;
        justify-content: flex-start;
        text-align: left;
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .home-store-grid {
        grid-template-columns: 1fr;
    }
    .store-product-grid {
        grid-template-columns: 1fr;
    }
    .home-map-card {
        margin-bottom: 10px;
        padding: 12px;
    }
    .store-map {
        min-height: 200px;
    }
    .store-map--detail {
        min-height: 180px;
    }
    .store-map__geolocate-btn {
        width: 100%;
        min-height: 40px;
    }
    .store-hero-bleed {
        margin-bottom: 12px;
        max-height: 220px;
    }
    .store-hero-bleed__img {
        height: 170px;
    }
}

@media (max-width: 520px) {
    .container {
        padding: 10px;
    }
    .card {
        padding: 12px;
    }
    .home-header__search {
        flex-direction: column;
        align-items: stretch;
    }
    .home-header__search-btn {
        width: 100%;
    }
    .home-header {
        align-items: flex-start;
        row-gap: 8px;
        position: relative;
    }
    .home-header__brand {
        flex: 1 1 auto;
        max-width: calc(100% - 46px);
    }
    .home-header__brand--logo {
        max-width: calc(100% - 46px);
    }
    .home-header__logo-box {
        height: 46px;
        max-height: 46px;
        padding: 3px 6px;
    }
    .home-header__login {
        flex: 0 0 auto;
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
        align-self: flex-start;
        white-space: nowrap;
        order: 2;
        position: absolute;
        right: 0;
        top: 0;
    }
    .home-header__login-link {
        gap: 0;
    }
    .home-header__login-icon {
        width: 34px;
        height: 34px;
    }
    .home-header__login-icon svg {
        width: 20px;
        height: 20px;
    }
    .home-header__search {
        order: 3;
        flex: 1 1 100%;
        margin-top: 4px;
    }
    .home-map-card__filter {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .home-map-card__filter-select {
        width: 100%;
        min-width: 0;
    }
    .home-header__sep {
        display: none;
    }
    .home-header__login {
        gap: 8px;
    }
    .home-header__login a,
    .home-header__logout-btn {
        display: inline-block;
    }
    .home-filters {
        padding: 12px;
    }
    .home-map-card__title {
        font-size: 0.97rem;
    }
    .home-store-card__title {
        font-size: 0.9rem;
    }
    .home-store-card__meta,
    .home-store-card__line {
        font-size: 0.76rem;
    }
    .store-map__status {
        font-size: 0.88rem;
    }
}
