﻿* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    overflow-y: scroll;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    min-height: 100%;
    overflow-y: auto;
}

/* ── Hero ────────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #000 0%, #16213e 60%, #0f3460 100%);
    padding: 48px 24px;
    text-align: center;
    color: #fff;
}

.hero-inner { max-width: 700px; margin: 0 auto; }

.hero-title {
    font-size: 40px;
    font-weight: 800;
    font-family: 'Eras Bold ITC', 'ITC Eras Bold', 'Eras Bold', sans-serif;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.hero-title span { color: #FD9A37; }

.hero-subtitle {
    font-size: 16px;
    color: #aab4d4;
    margin-bottom: 32px;
}

.hero-search-row {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    align-items: center;
}

.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #000;
    background: transparent;
    min-width: 0;
}

.hero-search-btn {
    background: #FD9A37;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.hero-search-btn:hover { background: #e07c1a; }

.btn-geo {
    background: #000;
    color: #aab4d4;
    border: none;
    border-radius: 40px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.btn-geo:hover { background: #0f3460; color: #fff; }

.geo-status {
    margin-top: 12px;
    font-size: 13px;
    color: #aab4d4;
}

/* ── Barra de filtros ────────────────────────────────── */
.filters-strip {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 24px;
    position: sticky;
    top: 80px;
    z-index: 85;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.filter-select:focus { border-color: #FD9A37; }

.btn-limpiar {
    font-size: 13px;
    color: #999;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px 14px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
}

.btn-limpiar:hover { color: #e07c1a; border-color: #FD9A37; text-decoration: none; }

/* ── Chips de rubros ─────────────────────────────────── */
.rubros-strip {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rubro-chip {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.rubro-chip:hover {
    border-color: #FD9A37;
    color: #FD9A37;
    text-decoration: none;
}

.rubro-chip.active {
    background: #FD9A37;
    border-color: #FD9A37;
    color: #fff;
}

/* ── Sección de resultados ───────────────────────────── */
.results-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 40px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.results-count {
    font-size: 14px;
    color: #888;
    font-weight: 600;
}

.geo-info-label {
    font-size: 13px;
    color: #FD9A37;
    font-weight: 600;
}

/* Badge de distancia en tarjeta de tienda */
.dist-badge {
    background: #fff3cd;
    color: #856404;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
    background-color: #000;
    color: #fff;
    padding: 10px 24px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

.site-header .brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #FD9A37;
    text-decoration: none;
}

.site-header .brand span { color: #fff; }

/* ── Page wrapper ────────────────────────────────────── */
.page-content {
    padding: 32px 24px 40px;
    max-width: 1280px;
    margin: 0 auto;
}

/* Default.aspx: hero ocupa ancho completo sin restricciones del contenedor */
.page-content.page-home {
    padding: 0;
    max-width: none;
}

/* ── Section title ───────────────────────────────────── */
.section-title {
    font-size: 26px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 28px;
}

/* ── Search bar ──────────────────────────────────────── */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    max-width: 400px;
}

.search-bar input:focus { border-color: #FD9A37; }

/* ── Store grid ──────────────────────────────────────── */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ── Store card ──────────────────────────────────────── */
.store-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.store-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
}

.store-card-header {
    background: linear-gradient(135deg, #000 0%, #16213e 100%);
    color: #FD9A37;
    padding: 16px 20px 14px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.store-card-nombre {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.store-card-rubro-badge {
    align-self: flex-end;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
    background: #FD9A37;
    border-radius: 4px;
    padding: 2px 8px;
}

.store-card-body {
    padding: 14px 20px 18px;
}

.store-card-body .detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.store-card-body .detail-icon {
    color: #FD9A37;
    font-size: 15px;
    margin-top: 1px;
    min-width: 18px;
    text-align: center;
}

.store-card-footer {
    padding: 10px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rubro-badge {
    background: #fff3e0;
    color: #e65c00;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ver-tienda-btn {
    display: inline-block;
    font-size: 12px;
    background: #FD9A37;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
}
.ver-tienda-btn:hover { background: #e8890a; color: #000; }

/* ── Back link ───────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #FD9A37;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
}

.back-link:hover { text-decoration: underline; }

/* ── Store detail header ─────────────────────────────── */
.store-detail-header {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 24px 28px;
    margin-bottom: 28px;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.store-detail-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
}

.store-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    flex: 1;
}

.info-item {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.info-item strong {
    color: #111;
    font-weight: 800;
    white-space: nowrap;
    min-width: 130px;
    flex-shrink: 0;
}

.store-resenha {
    font-size: 16px;
    font-weight: 500;
    color: #444;
    margin-top: 12px;
    font-style: italic;
    border-left: 3px solid #FD9A37;
    padding-left: 12px;
}

/* ── Products section ────────────────────────────────── */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.products-toolbar h2 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-bar select, .filter-bar input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.filter-bar select:focus, .filter-bar input:focus { border-color: #FD9A37; }

/* ── Products grid ───────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

/* ── Product card ────────────────────────────────────── */
.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0,0,0,0.12);
}

.product-card-body {
    padding: 16px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-categoria {
    font-size: 11px;
    font-weight: 600;
    color: #e65c00;
    background: #fff3e0;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-desc {
    font-size: 12px;
    color: #777;
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-card-footer {
    padding: 10px 16px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #FD9A37;
}
.price-symbol {
    font-size: 13px;
    font-weight: 600;
    vertical-align: middle;
    margin-right: 2px;
}
.product-price-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.product-cart-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.product-price-null {
    font-size: 13px;
    color: #bbb;
    font-style: italic;
}

/* ── Empty state ─────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* ── Error panel ─────────────────────────────────────── */
.error-panel {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px 20px;
    color: #856404;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── Presentación de tienda (Tienda.aspx) ────────────── */
.tienda-presentacion {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.tienda-portada-wrap {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    background: #f0f0f0;
}

.tienda-portada {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.tienda-pres-header {
    background: linear-gradient(135deg, #000, #0f3460);
    padding: 36px 40px 28px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.tienda-pres-nombre {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    flex: 1;
    min-width: 200px;
}

.tienda-pres-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 32px 40px;
}

.tienda-info-col { display: flex; flex-direction: column; gap: 12px; }

.tienda-resenha-col {
    border-left: 1px solid #f0f0f0;
    padding-left: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.tienda-logo-wrap { text-align: center; }

.tienda-logo {
    max-width: 200px;
    max-height: 160px;
    object-fit: contain;
    border-radius: 8px;
}

.tienda-pres-cta {
    padding: 24px 40px 32px;
    display: flex;
    justify-content: center;
    border-top: 1px solid #f0f0f0;
}

.btn-buscar-productos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FD9A37;
    color: #000;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 48px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(253,154,55,0.4);
    transition: all 0.15s;
}

.btn-emoji-black {
    display: inline-block;
    filter: grayscale(1) brightness(0);
}
.btn-buscar-productos:hover {
    background: #e07c1a;
    color: #000;
    box-shadow: 0 6px 20px rgba(253,154,55,0.5);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

@media (max-width: 700px) {
    .tienda-pres-header  { padding: 24px 20px; }
    .tienda-pres-body    { grid-template-columns: 1fr; padding: 20px; }
    .tienda-resenha-col  { border-left: none; border-top: 1px solid #f0f0f0; padding: 16px 0 0; }
    .tienda-pres-cta     { padding: 20px; }
    .tienda-pres-nombre  { font-size: 24px; }
    .btn-buscar-productos { font-size: 16px; padding: 14px 32px; }
}

/* ── Barra nav de productos ──────────────────────────── */
.products-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

/* ── Lista simple (tipodisplay=1) ────────────────────── */
.product-list-simple {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.plist-header {
    display: grid;
    grid-template-columns: 1fr 170px 90px 110px 44px;
    gap: 12px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plist-row {
    display: grid;
    grid-template-columns: 1fr 170px 90px 110px 44px;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f4f4f4;
    transition: background 0.1s;
}

.plist-row:last-child { border-bottom: none; }
.plist-item:last-child .plist-row { border-bottom: none; }
.plist-row:hover      { background: #fafbff; }

.plist-nombre  { font-size: 17px; font-weight: 700; color: #000; }
.plist-nombre .product-categoria { font-size: 13px; }
.plist-precio  { font-size: 14px; font-weight: 700; color: #333; }
.plist-fotos   { display: flex; align-items: center; justify-content: center; }
.plist-qty     { display: flex; justify-content: center; }

.qty-input-inline {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px 6px;
    font-size: 14px;
}

/* ── Botón y panel de fotos ──────────────────────────── */
.btn-ver-fotos {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: #FD9A37;
    font-size: 22px;
    padding: 0 4px;
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
    opacity: 0.85;
    transition: opacity 0.15s, transform 0.15s;
}
.btn-ver-fotos:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* ── Modal flotante de fotos ─────────────────────────── */
.fotos-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fotos-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
    position: relative;
    max-width: 820px;
    width: 100%;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}
.fotos-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}
.fotos-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}
.fotos-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.fotos-main-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    background: #f4f6f8;
}
.fotos-thumb-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.fotos-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.7;
}
.fotos-thumb:hover  { opacity: 1; }
.fotos-thumb-active { border-color: #FD9A37; opacity: 1; }

/* ── Miniatura en tarjeta (tipodisplay=2) ────────────── */
.product-card-thumb {
    width: 100%;
    height: 160px;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f4f6f8;
    border-radius: 10px 10px 0 0;
    padding: 6px;
}

/* ── Lista simple wrapper ────────────────────────────── */
.plist-item {
    border-bottom: 1px solid #f4f4f4;
}
.plist-item:last-child {
    border-bottom: none;
}
.plist-item .plist-row {
    border-bottom: none;
}

@media (max-width: 600px) {
    .fotos-modal-body { flex-direction: column; }
    .fotos-panel-left .fotos-panel-img { max-height: 240px; }
}

.product-cart-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qty-input {
    width: 56px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
    font-size: 14px;
}

/* ── Banner pedidos pendientes ───────────────────────── */
.pending-banner {
    background: #fff7e6;
    border-bottom: 2px solid #FD9A37;
    padding: 10px 24px;
}

.pending-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.pending-icon { font-size: 20px; flex-shrink: 0; }

.pending-text { font-size: 14px; color: #333; }

.pending-text strong { color: #b35900; }

.pending-link {
    display: inline-block;
    margin-left: 8px;
    color: #b35900;
    font-size: 16px;
    font-weight: 800;
    text-decoration: underline;
}

.pending-link:hover { color: #FD9A37; }

/* ── Remember me row (login) ─────────────────────────── */
.remember-row { margin: -4px 0 12px; }

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    font-weight: normal;
}

/* ── Badges genéricos ────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-success   { background: #d4edda; color: #155724; }
.badge-warning   { background: #fff3cd; color: #856404; }
.badge-info      { background: #d1ecf1; color: #0c5460; }
.badge-danger    { background: #f8d7da; color: #721c24; }
.badge-secondary { background: #e2e3e5; color: #383d41; }
.badge-secondary { background: #e2e3e5; color: #383d41; }
.badge-dark      { background: #d6d8db; color: #1b1e21; }

/* ── Tarjetas de pedido (MisPedidos) ─────────────────── */
.order-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 14px;
    overflow: hidden;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.order-tienda { font-size: 16px; font-weight: 700; color: #000; }

.order-fecha { font-size: 13px; color: #999; }

.order-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    font-size: 14px;
    color: #555;
}

.order-total { font-weight: 700; color: #000; }

.order-card-footer {
    padding: 10px 18px 14px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.order-btn-detalle {
    font-size: 13px;
    color: #FD9A37;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.order-btn-detalle:hover { text-decoration: underline; }

.order-btn-continuar {
    font-size: 13px;
    color: #fff;
    background: #FD9A37;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    text-decoration: none;
}

.order-btn-continuar:hover { background: #e07c1a; text-decoration: none; }

.order-detail-panel {
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    padding: 12px 18px;
}

.order-detail-row {
    display: grid;
    grid-template-columns: 1fr 60px 80px 80px;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
    color: #444;
}

.order-detail-row:last-child { border-bottom: none; }

/* Estado TVR (SOLICITADO / CONFIRMADO / RECHAZADO / CERRADO) */
.order-tvr-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}
.tvr-0 { background: #e2e3e5; color: #41464b; }
.tvr-1 { background: #fff3cd; color: #856404; }
.tvr-2 { background: #d1e7dd; color: #0f5132; }
.tvr-3 { background: #f8d7da; color: #842029; }
.tvr-4 { background: #d6d8db; color: #1b1e21; }

.order-tvr-row {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    display: flex;
    gap: 6px;
}
.order-tvr-rechazo { color: #842029; }

/* Estado pedido en Carrito.aspx */
.order-status-panel {
    background: #fff;
    border-radius: 10px;
    padding: 32px 28px;
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.order-status-tienda {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}
.order-status-badge-wrap { margin-bottom: 8px; }

/* Estado en banner */
.pending-estado {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 4px;
}
.tvr-pend { background: #e8e8e8; color: #555; }

/* Paginación */
.paginacion-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 0 8px;
}

.pag-btn {
    background: #27ae60;
    color: #fff;
    border: 1px solid #27ae60;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pag-btn:hover { background: #1e8449; border-color: #1e8449; color: #fff; text-decoration: none; }
.pag-btn[disabled], .pag-btn.aspNetDisabled {
    color: #bbb;
    border-color: #eee;
    cursor: default;
    pointer-events: none;
}

.pag-info {
    font-size: 14px;
    color: #666;
    min-width: 110px;
    text-align: center;
}

/* Botón vaciar carrito */
.btn-vaciar {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.btn-vaciar:hover { border-color: #e74c3c; color: #e74c3c; }

.checkout-heading {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* Panel delivery en Carrito */
.form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #aaa;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
    background: #fff;
}

/* ── Header usuario ──────────────────────────────────── */
.header-user { display: flex; align-items: center; gap: 12px; }
.header-user-info { display: flex; align-items: center; gap: 12px; }

.header-user-name { font-size: 13px; color: #ccc; }

.header-link {
    font-size: 13px;
    color: #ccc;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #444;
    transition: all 0.15s;
}

.header-link:hover { color: #fff; border-color: #888; text-decoration: none; }

.header-link-accent {
    background: #FD9A37;
    color: #000 !important;
    border-color: #FD9A37;
    font-weight: 700;
}

.header-link-accent:hover { background: #e07c1a; border-color: #e07c1a; }

.header-link-salir { background: #28a745; color: #fff !important; border-color: #28a745; }
.header-link-salir:hover { background: #1e7e34; border-color: #1e7e34; color: #fff !important; }

.header-link-yellow { background: #FFC107; color: #000 !important; border-color: #FFC107; font-weight: 700; }
.header-link-yellow:hover { background: #e0a800; border-color: #e0a800; color: #000 !important; }

.header-link-pedidos {
    background: #e8650a;
    color: #fff !important;
    border-color: #e8650a;
    position: relative;
}
.header-link-pedidos:hover { background: #c9540a; border-color: #c9540a; color: #fff !important; }

.header-pedidos-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fff;
    color: #e8650a;
    border: 2px solid #e8650a;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    padding: 0 3px;
    display: inline-block;
}

/* ── "Buscar Tiendas" en el header, debajo de Mis pedidos/Salir ─ */
.header-actions-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.header-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-buscar-tiendas {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: #FFC107;
    color: #000;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-buscar-tiendas:hover {
    background: #e0a800;
    color: #000;
    text-decoration: none;
}

/* ── Auth box ─────────────────────────────────────────── */
.auth-box {
    max-width: 440px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px 36px;
}

.auth-box-wide { max-width: 700px; }

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 6px;
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin-bottom: 28px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: #777;
    margin-top: 20px;
}

.auth-link {
    color: #FD9A37;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

/* ── User info card (checkout) ───────────────────────── */
.user-info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px 16px;
    border-left: 3px solid #FD9A37;
}

.user-info-row { display: flex; gap: 12px; align-items: flex-start; }

.user-info-icon { font-size: 24px; }

.user-info-name { font-size: 15px; font-weight: 700; color: #000; }

.user-info-detail { font-size: 13px; color: #777; margin-top: 3px; }

/* ── Botón agregar al carrito ─────────────────────────── */
.btn-add-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #FD9A37;
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    padding: 0 4px;
    transition: color 0.15s;
}

.btn-add-cart:hover { color: #e07c1a; text-decoration: none; }

/* ── Carrito flotante (FAB) ───────────────────────────── */
.cart-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #000;
    color: #FD9A37;
    border-radius: 50px;
    padding: 12px 20px 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 200;
    transition: background 0.15s;
}

.cart-fab:hover { background: #FD9A37; color: #000; text-decoration: none; }

.cart-fab-count {
    background: #FD9A37;
    color: #000;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.cart-fab:hover .cart-fab-count { background: #000; color: #FD9A37; }

.cart-fab-label { font-size: 14px; font-weight: 700; }

/* ── Carrito layout ───────────────────────────────────── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

/* ── Cart item row ────────────────────────────────────── */
.cart-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-info { flex: 1; }

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    line-height: 1;
}

.qty-btn:hover { background: #FD9A37; color: #fff; text-decoration: none; }

.qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    min-width: 80px;
    text-align: right;
}

.cart-remove-btn {
    color: #ccc;
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
    padding: 4px;
}

.cart-remove-btn:hover { color: #e53935; text-decoration: none; }

.cart-item-qty-price {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
}

.cart-item-subtotal {
    font-size: 18px;
    font-weight: 700;
    color: #FD9A37;
    min-width: 90px;
    text-align: right;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.cart-total-value {
    font-size: 26px;
    font-weight: 800;
    color: #FD9A37;
}

/* ── Checkout form ────────────────────────────────────── */
.checkout-col {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 24px;
    position: sticky;
    top: 76px;
}

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.form-input:focus { border-color: #FD9A37; }

.form-error {
    color: #e53935;
    font-size: 12px;
    margin-top: 3px;
    display: block;
}

.radio-group label { margin-right: 20px; font-size: 14px; cursor: pointer; }

.btn-confirm {
    display: block;
    width: 100%;
    padding: 13px;
    background: #FD9A37;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.15s;
}

.btn-confirm:hover { background: #e07c1a; color: #fff; text-decoration: none; }

/* ── Confirmación ─────────────────────────────────────── */
.confirm-box {
    max-width: 540px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 48px 40px;
    text-align: center;
}

.confirm-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #43a047;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 700;
}

.confirm-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.confirm-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 28px;
}

.confirm-code-box {
    background: #f8f9fa;
    border: 2px dashed #FD9A37;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 24px;
}

.confirm-code-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.confirm-code {
    font-size: 26px;
    font-weight: 700;
    color: #FD9A37;
    letter-spacing: 2px;
}

.confirm-note {
    font-size: 14px;
    color: #777;
    margin-bottom: 28px;
    line-height: 1.6;
}

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

@media (max-width: 900px) {
    .cart-layout { grid-template-columns: 1fr; }
    .checkout-col { position: static; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 28px; }
    .hero-search-row { flex-wrap: wrap; border-radius: 12px; padding: 10px; }
    .hero-search-input { width: 100%; }
    .hero-search-btn, .btn-geo { width: 100%; border-radius: 8px; }
    .filters-inner { gap: 8px; }
    .filter-group { min-width: calc(50% - 4px); }
}

@media (max-width: 600px) {
    .store-info-grid { grid-template-columns: 1fr; }
    .products-toolbar { flex-direction: column; align-items: flex-start; }
    .filter-bar { flex-wrap: wrap; }
    .cart-fab-label { display: none; }
    .confirm-box { padding: 32px 20px; }
    .filter-group { min-width: 100%; }
    .hero-section { padding: 32px 16px; }

    /* Tarjetas de producto (tipodisplay=2): el nombre ya ocupa todo el ancho de la
       tarjeta arriba; el pie pasa a una línea de 3 columnas (precio, cantidad, agregar),
       más una cuarta columna si el producto tiene fotos */
    .product-card-footer {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        align-items: center;
        gap: 8px;
    }
    .product-price,
    .product-price-null { order: 1; }
    .product-cart-col   { display: contents; }
    .product-cart-row   { display: contents; margin-top: 0; }
    .qty-input  { order: 2; justify-self: center; }
    .btn-add-cart { order: 3; justify-self: center; }
    .btn-ver-fotos {
        order: 4;
        justify-self: center;
    }

    /* Lista simple de productos (tipodisplay=1): nombre arriba abarcando todo el ancho,
       luego una línea con precio, cantidad y botón agregar, más fotos si el producto tiene */
    .plist-header { display: none; }
    .plist-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        row-gap: 8px;
        column-gap: 8px;
        padding: 14px 16px;
    }
    .plist-nombre { flex: 1 0 100%; }
    .plist-precio { flex: 1 1 0; text-align: center; }
    .plist-qty    { flex: 1 1 0; }
    .plist-add    { flex: 1 1 0; display: flex; justify-content: center; }
    .plist-fotos  { flex: 1 1 0; }

    /* Header apilado en móvil */
    .site-header {
        height: auto;
        flex-direction: column;
        align-items: center;
        padding: 10px 16px;
        gap: 8px;
    }
    .header-user {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .header-user-info {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .btn-buscar-tiendas {
        width: 100%;
        box-sizing: border-box;
    }
    .header-user-name {
        width: 100%;
        font-size: 12px;
    }
    .header-link, .header-link-salir, .header-link-accent, .header-link-pedidos {
        font-size: 12px;
        padding: 6px 10px;
        flex: 1 1 auto;
        text-align: center;
    }
    .header-actions-col { width: 100%; }

    /* Registro.aspx: todos los campos en una sola columna */
    .auth-grid { grid-template-columns: 1fr; }

    /* Carrito (Carrito.aspx): nombre a la izquierda ocupando el 50%, y en la otra
       mitad la cantidad en una línea y el precio en la otra */
    .cart-item-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        row-gap: 6px;
        column-gap: 12px;
    }
    .cart-item-info {
        grid-column: 1;
        grid-row: 1 / span 2;
    }
    .cart-item-controls {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
    }
    .cart-item-remove {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
    .cart-item-subtotal {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }
}

/* ── Dirección de tienda (recojo) ────────────────────────── */
.store-addr-panel {
    margin-bottom: 16px;
}
.store-field {
    margin-bottom: 12px;
}
.store-addr-value {
    font-size: 14px;
    font-family: inherit;
    color: #333;
    margin-bottom: 10px;
}
.btn-maps {
    display: inline-block;
    background: #4285F4;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
}
.btn-maps:hover { background: #3367d6; color: #fff; }
.btn-maps-card {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    margin-right: 8px;
}
.btn-maps-card:hover { background: #1e8449; color: #fff; }
