body {
  --ps-hero-accent: #ff7a00;
  --ps-hero-accent-text: #ffffff;
  --ps-hero-fallback: #273244;
  --ps-hero-border: rgba(255, 255, 255, 0.48);
  --ps-hero-shadow: 0 24px 65px rgba(15, 23, 42, 0.18);
  --ps-meta-bg: rgba(255, 255, 255, 0.9);
  --ps-meta-panel: #f8fafc;
  --ps-meta-border: #e2e8f0;
  --ps-meta-text: #172033;
  --ps-meta-muted: #64748b;
  --ps-meta-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

body.theme-brasa { --ps-hero-accent: #e8412f; --ps-hero-fallback: #7d2c21; --ps-hero-shadow: 0 24px 65px rgba(232, 65, 47, 0.18); }
body.theme-grafito { --ps-hero-accent: #475569; --ps-hero-fallback: #273244; --ps-hero-shadow: 0 24px 65px rgba(71, 85, 105, 0.18); }
body.theme-violeta { --ps-hero-accent: #7c3aed; --ps-hero-fallback: #4c277d; --ps-hero-shadow: 0 24px 65px rgba(124, 58, 237, 0.2); }
body.theme-dark { --ps-hero-accent: #fff46e; --ps-hero-accent-text: #151515; --ps-hero-fallback: #111111; --ps-hero-border: rgba(255, 244, 110, 0.38); --ps-hero-shadow: 0 26px 70px rgba(0, 0, 0, 0.52); }
body.theme-medianoche { --ps-hero-accent: #f5b942; --ps-hero-accent-text: #1a2233; --ps-hero-fallback: #15223a; --ps-hero-border: rgba(245, 185, 66, 0.36); --ps-hero-shadow: 0 26px 70px rgba(0, 0, 0, 0.42); }
body.theme-purple { --ps-hero-accent: #c084fc; --ps-hero-accent-text: #240038; --ps-hero-fallback: #31004e; --ps-hero-border: rgba(192, 132, 252, 0.38); --ps-hero-shadow: 0 26px 70px rgba(20, 0, 33, 0.5); }
body.theme-red { --ps-hero-accent: #ff4d4d; --ps-hero-fallback: #5d1414; --ps-hero-border: rgba(255, 77, 77, 0.38); --ps-hero-shadow: 0 26px 70px rgba(26, 0, 0, 0.5); }
body.theme-yellow { --ps-hero-accent: #fff176; --ps-hero-accent-text: #292900; --ps-hero-fallback: #4c4a12; --ps-hero-border: rgba(255, 241, 118, 0.4); --ps-hero-shadow: 0 26px 70px rgba(26, 26, 0, 0.48); }

body.theme-dark { --ps-meta-bg: rgba(18, 18, 18, .94); --ps-meta-panel: #1b1b1b; --ps-meta-border: #333; --ps-meta-text: #f8fafc; --ps-meta-muted: #b6bcc7; --ps-meta-shadow: 0 18px 48px rgba(0, 0, 0, .38); }
body.theme-medianoche { --ps-meta-bg: rgba(21, 34, 58, .95); --ps-meta-panel: #1c2c49; --ps-meta-border: #304565; --ps-meta-text: #f1f5f9; --ps-meta-muted: #b5c0d1; --ps-meta-shadow: 0 18px 48px rgba(0, 0, 0, .32); }
body.theme-purple { --ps-meta-bg: rgba(31, 0, 51, .95); --ps-meta-panel: #2b0a41; --ps-meta-border: #5b2479; --ps-meta-text: #fbf5ff; --ps-meta-muted: #d8b8eb; --ps-meta-shadow: 0 18px 48px rgba(20, 0, 33, .4); }
body.theme-red { --ps-meta-bg: rgba(38, 0, 0, .95); --ps-meta-panel: #470d0d; --ps-meta-border: #702222; --ps-meta-text: #fff5f5; --ps-meta-muted: #efb8b8; --ps-meta-shadow: 0 18px 48px rgba(26, 0, 0, .4); }
body.theme-yellow { --ps-meta-bg: rgba(41, 41, 0, .95); --ps-meta-panel: #393900; --ps-meta-border: #676713; --ps-meta-text: #fffde7; --ps-meta-muted: #e8e5a7; --ps-meta-shadow: 0 18px 48px rgba(26, 26, 0, .38); }

.storefront-hero {
  isolation: isolate;
  z-index: 2;
  width: min(calc(100% - 24px), 760px) !important;
  min-height: 270px;
  margin: 18px auto 28px !important;
  padding: 58px clamp(20px, 5vw, 42px) 38px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  position: relative;
  overflow: visible !important;
  border: 1px solid var(--ps-hero-border);
  border-radius: 28px !important;
  background-color: var(--ps-hero-fallback);
  background-size: cover !important;
  background-position: center !important;
  box-shadow: var(--ps-hero-shadow);
}

.storefront-hero.branches-open {
  z-index: 1040;
}

.storefront-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(10, 18, 30, 0.86) 0%, rgba(10, 18, 30, 0.58) 48%, rgba(10, 18, 30, 0.3) 100%);
  pointer-events: none;
}

.storefront-hero::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: 27px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.storefront-hero-main { position: relative; z-index: 2; width: 100%; display: flex; align-items: flex-end; gap: clamp(16px, 4vw, 26px); }
.storefront-hero-logo-frame { width: clamp(88px, 15vw, 116px); height: clamp(88px, 15vw, 116px); flex: 0 0 auto; padding: 6px; box-sizing: border-box; border: 2px solid rgba(255, 255, 255, 0.86); border-radius: 30px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28); transform: translateY(8px); }
.storefront-hero-logo { width: 100%; height: 100%; display: block; border-radius: 23px; object-fit: cover; }
.storefront-hero-copy { min-width: 0; flex: 1 1 auto; padding-bottom: 2px; color: #fff; text-align: left; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34); }
.storefront-hero-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; color: #fff; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(8px); font-size: 10px; font-weight: 800; letter-spacing: 0.035em; text-shadow: none; text-transform: uppercase; }
.storefront-hero-kicker i { color: var(--ps-hero-accent); }
.storefront-hero-title { margin: 0; overflow: hidden; color: #fff !important; font-size: clamp(28px, 6vw, 44px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; text-overflow: ellipsis; }
.storefront-hero-address { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin: 11px 0 0; padding: 7px 11px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; color: rgba(255, 255, 255, 0.92) !important; background: rgba(15, 23, 42, 0.34); backdrop-filter: blur(8px); font-size: clamp(12px, 2.5vw, 14px); line-height: 1.25; text-shadow: none; }
.storefront-hero-address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.storefront-hero .verification-bar { top: 14px !important; right: 14px !important; left: auto !important; z-index: 4 !important; margin: 0 !important; padding: 6px 10px !important; border: 1px solid rgba(255, 255, 255, 0.34); border-radius: 999px !important; color: #fff !important; background: rgba(15, 23, 42, 0.5) !important; backdrop-filter: blur(8px); font-size: 11px !important; font-weight: 750; line-height: 1.2; }
.storefront-hero .verification-bar.verified i { color: #64e89a; }
.storefront-hero .verification-bar.not-verified i { color: #ffd166; }
.storefront-branch-wrap { position: relative; z-index: 3; width: min(100%, 520px); margin: 20px 0 0; }
.storefront-branch-select { width: 100%; min-height: 42px; border: 1px solid rgba(255, 255, 255, 0.38) !important; border-radius: 13px !important; color: #162033 !important; background: rgba(255, 255, 255, 0.93) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); }
.storefront-branch-trigger { width: 100%; min-height: 48px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(255, 255, 255, 0.34); border-radius: 15px; color: #fff; background: rgba(8, 14, 24, 0.74); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22); backdrop-filter: blur(9px); font-size: 14px; font-weight: 750; cursor: pointer; }
.storefront-branch-trigger span { display: inline-flex; align-items: center; gap: 8px; }
.storefront-branch-chevron { transition: transform 0.2s ease; }
.storefront-branch-wrap.is-open .storefront-branch-chevron { transform: rotate(180deg); }
.storefront-branch-grid { position: absolute; top: calc(100% + 10px); left: 0; z-index: 20; width: 100%; max-height: 310px; padding: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; overflow-y: auto; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 18px; background: rgba(255, 255, 255, 0.97); box-shadow: 0 22px 55px rgba(15, 23, 42, 0.28); backdrop-filter: blur(12px); }
.storefront-branch-grid[hidden] { display: none !important; }
.storefront-branch-card { min-width: 0; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1px solid #e7eaf0; border-radius: 14px; color: #202938 !important; background: #fff; text-decoration: none !important; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.storefront-branch-card:hover { border-color: var(--ps-hero-accent); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1); transform: translateY(-2px); }
.storefront-branch-card img { width: 58px; height: 58px; display: block; border: 1px solid #edf0f4; border-radius: 16px; object-fit: cover; background: #fff; }
.storefront-branch-card span { min-height: 2.5em; overflow: hidden; color: #202938 !important; font-size: 12px; font-weight: 800; line-height: 1.25; text-align: center; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.storefront-contact-toggle { border: 1px solid rgba(15, 23, 42, 0.1) !important; color: #162033 !important; background: rgba(255, 255, 255, 0.98) !important; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2) !important; }
.storefront-contact-panel { width: min(100%, 760px) !important; margin: 0 auto; }
.storefront-hero-menu { min-height: 250px; margin-bottom: 22px !important; }

.storefront-meta-card {
  width: min(calc(100% - 24px), 760px) !important;
  margin: 8px auto 12px !important;
  padding: 6px !important;
  border: 1px solid var(--ps-meta-border);
  border-radius: 22px !important;
  color: var(--ps-meta-text) !important;
  background: var(--ps-meta-bg) !important;
  box-shadow: var(--ps-meta-shadow) !important;
  backdrop-filter: blur(10px);
}

.storefront-meta-inner {
  padding: 10px 12px !important;
  border: 0 !important;
  border-radius: 17px !important;
  color: var(--ps-meta-text) !important;
  background: transparent !important;
}

.storefront-meta-main { gap: 10px; }
.storefront-open-state,
.storefront-hours-action { min-width: 0; }

.storefront-meta-card .estado-tienda {
  min-height: 40px;
  padding: 8px 16px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid currentColor !important;
  border-radius: 13px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

.storefront-meta-card .estado-tienda::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.storefront-hours-trigger {
  min-height: 40px;
  padding: 8px 13px !important;
  border: 1px solid var(--ps-meta-border) !important;
  border-radius: 13px !important;
  color: var(--ps-meta-text) !important;
  background: var(--ps-meta-panel) !important;
  font-size: 13px !important;
  font-weight: 750;
  list-style: none;
  transition: border-color .18s ease, transform .18s ease !important;
}

.storefront-hours-trigger::-webkit-details-marker { display: none; }
.storefront-hours-trigger::after { content: "›"; margin-left: 3px; font-size: 18px; line-height: 1; transform: rotate(90deg); transition: transform .18s ease; }
#horariosDetalle[open] .storefront-hours-trigger::after { transform: rotate(-90deg); }
.storefront-hours-trigger:hover { border-color: var(--ps-hero-accent) !important; transform: translateY(-1px); }

.storefront-hours-content {
  margin-top: 12px !important;
  padding: 8px 10px 4px;
  border-top: 1px solid var(--ps-meta-border);
}

.storefront-hours-table {
  width: min(100%, 460px);
  color: var(--ps-meta-text);
  border-collapse: separate;
  border-spacing: 0 4px;
}

.storefront-hours-table th { color: var(--ps-meta-muted) !important; border: 0 !important; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.storefront-hours-table td { padding: 7px 12px !important; background: var(--ps-meta-panel); font-size: 12px; }
.storefront-hours-table td:first-child { border-radius: 10px 0 0 10px; font-weight: 800; }
.storefront-hours-table td:last-child { border-radius: 0 10px 10px 0; text-align: right; color: var(--ps-meta-muted); }

.storefront-reputation-row {
  width: min(calc(100% - 24px), 760px) !important;
  margin: 0 auto 16px !important;
}

.storefront-reputation-card {
  width: 100% !important;
  max-width: none !important;
  min-height: 72px;
  padding: 14px 16px !important;
  display: grid !important;
  grid-template-columns: auto auto auto;
  justify-content: center !important;
  gap: 10px 14px !important;
  border: 1px solid var(--ps-meta-border) !important;
  border-radius: 19px !important;
  color: var(--ps-meta-text) !important;
  background: var(--ps-meta-bg) !important;
  box-shadow: var(--ps-meta-shadow);
  backdrop-filter: blur(10px);
}

.storefront-reputation-label,
.storefront-rating-count,
.storefront-distance-inner,
.storefront-distance-inner #distance,
.storefront-distance-inner #time {
  color: var(--ps-meta-text) !important;
}

.storefront-reputation-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px !important; }
.storefront-reputation-label i { width: 27px; height: 27px; display: inline-grid; place-items: center; border-radius: 9px; color: #22c55e !important; background: rgba(34, 197, 94, .12); }
.storefront-rating-stars { display: flex; align-items: center; gap: 1px; color: #f7c600 !important; }
.storefront-rating-count { font-size: 12px !important; color: var(--ps-meta-muted) !important; }

.storefront-distance-card {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--ps-meta-border);
}

#locationPrompt {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 !important;
  padding-top: 9px;
  border-top: 1px solid var(--ps-meta-border);
  color: var(--ps-meta-muted);
  font-size: 12px;
}

#locationPrompt > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 7px;
  margin: 0 !important;
}

#locationPrompt svg { flex: 0 0 auto; }
#retryLocation { padding: 3px 5px !important; font-size: 12px; }

.storefront-distance-inner { justify-content: center; flex-wrap: wrap; gap: 9px 14px !important; font-size: 12px; }

.ps-option-rule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0 0 9px !important;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.ps-option-rule.is-required {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a4d00;
}

.ps-option-rule i { font-size: 10px; }

.purchase-controls {
  display: grid !important;
  grid-template-columns: auto minmax(150px, auto);
  justify-content: space-between !important;
  align-items: start !important;
  column-gap: 14px;
}

.purchase-controls > .card-title { grid-column: 1; grid-row: 1 / span 2; }
.purchase-controls > .btn-add-to-cart,
.purchase-controls > .card-text { grid-column: 2; grid-row: 1; justify-self: end; }

.ps-modal-amount {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
  .purchase-controls { grid-template-columns: auto minmax(128px, 1fr); column-gap: 9px; }
}

@media (max-width: 560px) {
  .storefront-meta-card,
  .storefront-reputation-row { width: calc(100% - 20px) !important; }
  .storefront-meta-inner { padding: 8px !important; }
  .storefront-meta-main { gap: 8px; }
  .storefront-meta-card .estado-tienda,
  .storefront-hours-trigger { width: 100%; min-height: 42px; padding: 8px 9px !important; font-size: 12px !important; }
  .storefront-reputation-card { grid-template-columns: auto 1fr; justify-items: start; padding: 13px !important; gap: 8px 10px !important; }
  .storefront-rating-stars { justify-self: end; }
  .storefront-rating-count { grid-column: 1 / -1; }
  .storefront-distance-inner { justify-content: flex-start; }
  #locationPrompt { text-align: left !important; }
  #locationPrompt > span { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .storefront-hero { width: calc(100% - 24px) !important; min-height: 270px; margin: 10px auto 26px !important; padding: 56px 16px 30px !important; border-radius: 20px !important; background-position: center !important; }
  .storefront-hero::before { background: linear-gradient(180deg, rgba(10, 18, 30, 0.42) 0%, rgba(10, 18, 30, 0.84) 78%, rgba(10, 18, 30, 0.94) 100%); }
  .storefront-hero::after { border-radius: 19px; }
  .storefront-hero-main { flex-direction: column; align-items: center; gap: 15px; }
  .storefront-hero-logo-frame { width: 84px; height: 84px; border-radius: 23px; transform: none; }
  .storefront-hero-logo { border-radius: 19px; }
  .storefront-hero-copy { width: 100%; text-align: center; }
  .storefront-hero-title { font-size: clamp(25px, 8vw, 33px); }
  .storefront-hero-address { max-width: min(100%, 330px); margin-top: 10px; }
  .storefront-branch-wrap { margin: 18px auto 0; }
  .storefront-branch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 285px; }
  .storefront-hero .verification-bar { top: 12px !important; right: 12px !important; }
}
