.frontend-area { background: #f7f7f8; }
.frontend-area .app-main { min-width: 0; padding-top: 24px; padding-bottom: 64px; }

.store-topbar { background: #101828; color: #cbd5e1; font-size: .78rem; }
.store-topbar .container-xl { min-height: 31px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.store-topbar strong { color: #fff; }
.store-topbar-badges { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.store-topbar-badges span { display: inline-flex; gap: 6px; align-items: center; }

.store-header { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 1030; box-shadow: 0 1px 0 rgba(15,23,42,.02); }
.store-header-row { min-height: 72px; display: flex; align-items: center; gap: 22px; }
.store-brand { display: inline-flex; align-items: center; gap: 10px; color: #111827; text-decoration: none; flex: 0 0 auto; }
.store-brand:hover { color: #111827; }
.store-brand-mark { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#2563eb,#1d4ed8 58%,#f59e0b 58%,#f59e0b); font-weight: 900; font-size: 1.05rem; box-shadow: 0 6px 16px rgba(37,99,235,.2); }
.store-brand-copy { line-height: 1.1; }
.store-brand-name { display: block; font-size: 1.16rem; font-weight: 900; letter-spacing: -.03em; }
.store-brand-tag { display: block; color: #94a3b8; font-size: .65rem; font-weight: 800; letter-spacing: .08em; margin-top: 3px; }

.store-search { flex: 1 1 560px; max-width: 680px; position: relative; }
.store-search .form-control { height: 46px; border: 2px solid #1f2937; border-radius: 12px; padding: 0 52px 0 16px; background: #fff; }
.store-search .form-control:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.store-search .btn { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border-radius: 9px; padding: 0; display: grid; place-items: center; }

.store-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.store-action-link { min-width: 56px; padding: 7px 9px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #334155; text-decoration: none; border-radius: 10px; font-size: .72rem; font-weight: 700; }
.store-action-link i { font-size: 1.17rem; }
.store-action-link:hover { background: #f1f5f9; color: #2563eb; }
.store-account-email { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; font-size: .78rem; }

.store-nav { background: #fff; border-bottom: 1px solid #e5e7eb; }
.store-nav-inner { min-height: 43px; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.store-nav-inner::-webkit-scrollbar { display: none; }
.store-nav-link { color: #475569; text-decoration: none; padding: 9px 13px; border-radius: 9px; font-size: .86rem; font-weight: 700; white-space: nowrap; }
.store-nav-link:hover, .store-nav-link.active { color: #1d4ed8; background: #eff6ff; }
.store-nav-link.emphasis { color: #b45309; background: #fff7ed; }

.store-mobile-toggle { border: 0; background: #f1f5f9; color: #334155; width: 42px; height: 42px; border-radius: 10px; font-size: 1.25rem; }
.store-mobile-menu { border-top: 1px solid #eef2f6; padding: 10px 0 14px; }
.store-mobile-menu a { display: flex; align-items: center; gap: 10px; padding: 11px 4px; color: #334155; text-decoration: none; font-weight: 700; }
.store-mobile-menu form { padding-top: 8px; }
.store-mobile-search { padding: 0 0 12px; position: relative; }
.store-mobile-search .form-control { padding-right: 48px; }
.store-mobile-search .btn { position: absolute; top: 3px; right: 3px; width: 38px; height: 38px; padding: 0; }

.store-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 260px;
  padding: clamp(28px, 5vw, 52px);
  background: linear-gradient(116deg, #0f172a 0%, #1e3a8a 62%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(15,23,42,.13);
}
.store-hero::before, .store-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.store-hero::before { width: 310px; height: 310px; right: -55px; top: -125px; }
.store-hero::after { width: 190px; height: 190px; right: 150px; bottom: -130px; }
.store-hero-content { position: relative; z-index: 1; max-width: 670px; }
.store-hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.09); font-size: .78rem; font-weight: 800; margin-bottom: 15px; }
.store-hero h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1.12; font-weight: 900; letter-spacing: -.04em; margin: 0 0 13px; }
.store-hero p { max-width: 570px; color: #dbeafe; font-size: clamp(.9rem,1.6vw,1.05rem); margin: 0 0 22px; }
.store-hero-points { display: flex; flex-wrap: wrap; gap: 10px; }
.store-hero-point { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font-size: .82rem; font-weight: 700; backdrop-filter: blur(4px); }

.store-filter-panel { margin-top: 18px; padding: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 15px; box-shadow: var(--vm-shadow-sm); }
.store-filter-row { display: grid; grid-template-columns: minmax(0,1fr) 220px auto; gap: 10px; align-items: center; }
.store-filter-row .btn { min-width: 92px; }

.category-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.category-strip::-webkit-scrollbar { display: none; }
.category-chip { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: #334155; background: #fff; border: 1px solid #e2e8f0; text-decoration: none; border-radius: 999px; padding: 8px 13px; font-size: .84rem; font-weight: 700; }
.category-chip:hover, .category-chip.active { color: #1d4ed8; border-color: #93b4f9; background: #eff6ff; }
.category-chip i { color: #f59e0b; }

.product-grid { --bs-gutter-x: 14px; --bs-gutter-y: 14px; }
.product-card { height: 100%; background: #fff; border: 1px solid #e5e7eb; border-radius: 15px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.product-card:hover { transform: translateY(-3px); border-color: #d6deea; box-shadow: 0 12px 24px rgba(15,23,42,.08); }
.product-media { position: relative; aspect-ratio: 1.12/1; overflow: hidden; background: #f1f5f9; }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product-card:hover .product-img { transform: scale(1.025); }
.product-placeholder { width: 100%; height: 100%; min-height: 170px; display: grid; place-items: center; color: #94a3b8; background: linear-gradient(135deg,#f8fafc,#e2e8f0); font-weight: 800; }
.product-placeholder.big { min-height: 420px; border-radius: 16px; }
.product-media-tag { position: absolute; left: 9px; top: 9px; background: rgba(15,23,42,.78); color: #fff; font-size: .68rem; font-weight: 800; padding: 5px 8px; border-radius: 7px; backdrop-filter: blur(5px); }
.product-card-body { padding: 13px 14px 14px; }
.product-card-category { color: #64748b; font-size: .72rem; font-weight: 700; margin-bottom: 5px; }
.product-card-title { color: #1f2937; font-size: .96rem; line-height: 1.4; font-weight: 700; min-height: 2.7em; margin: 0 0 8px; }
.product-card-title a { color: inherit; text-decoration: none; }
.product-card-price { color: #e11d48; font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; }
.product-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.product-card-delivery { color: #16a34a; font-size: .72rem; font-weight: 700; white-space: nowrap; }

.product-detail-gallery { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 16px; box-shadow: var(--vm-shadow-sm); }
.product-detail-image { width: 100%; aspect-ratio: 1.08/1; object-fit: contain; background: #f8fafc; border-radius: 13px; }
.product-detail-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: clamp(20px,4vw,30px); box-shadow: var(--vm-shadow-sm); }
.product-detail-title { font-weight: 800; font-size: clamp(1.35rem,2.5vw,2rem); line-height: 1.3; margin: 8px 0 16px; letter-spacing: -.02em; }
.product-detail-price { color: #e11d48; font-size: clamp(1.7rem,4vw,2.4rem); font-weight: 900; margin-bottom: 15px; }
.product-detail-actions { display: grid; grid-template-columns: 1fr 1.15fr; gap: 10px; margin-top: 20px; }
.product-detail-actions .btn { min-height: 48px; }
.product-trust-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 20px; }
.product-trust-item { border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 11px; padding: 10px; text-align: center; color: #475569; font-size: .76rem; font-weight: 700; }
.product-trust-item i { display: block; color: #2563eb; font-size: 1.05rem; margin-bottom: 5px; }
.product-description { margin-top: 18px; border-top: 1px solid #e5e7eb; padding-top: 18px; color: #475569; }

.cart-product { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.cart-thumb { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; background: #f1f5f9; flex: 0 0 auto; }
.cart-summary { display: flex; justify-content: flex-end; margin-top: 16px; }
.cart-summary-card { width: min(100%,420px); padding: 18px; border-radius: 14px; border: 1px solid #e2e8f0; background: #fff; box-shadow: var(--vm-shadow-sm); }
.cart-summary-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cart-summary-total strong { color: #e11d48; font-size: 1.45rem; }

.buyer-profile-card { background: linear-gradient(135deg,#ffffff,#f8fbff); }
.avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 1px #e2e8f0; }
.avatar-placeholder { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: #eff6ff; color: #2563eb; font-size: 1.5rem; }
.buyer-quick-link { display: flex; align-items: center; gap: 11px; padding: 13px; color: #334155; text-decoration: none; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; font-weight: 700; }
.buyer-quick-link i { color: #2563eb; font-size: 1.12rem; }
.buyer-quick-link:hover { border-color: #93b4f9; background: #f8fbff; }

.order-summary-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; background: #e2e8f0; }
.order-summary-item { padding: 14px; background: #fff; }
.order-summary-item span { display: block; color: #64748b; font-size: .78rem; margin-bottom: 5px; }
.order-summary-item strong { color: #1f2937; font-size: .94rem; }
.delivery-box { border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 14px; padding: 18px; }
.delivery-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px dashed #86efac; border-radius: 10px; padding: 11px 12px; margin-top: 10px; }
.delivery-code code { color: #166534; font-weight: 800; font-size: .95rem; overflow-wrap: anywhere; }

.store-footer { background: #fff; border-top: 1px solid #e5e7eb; padding: 28px 0; color: #64748b; }
.store-footer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.store-footer-item { display: flex; gap: 10px; align-items: flex-start; }
.store-footer-item i { color: #2563eb; font-size: 1.15rem; margin-top: 2px; }
.store-footer-item strong { display: block; color: #334155; margin-bottom: 2px; }
.store-footer-item span { font-size: .8rem; }

.mobile-tabbar { display: none; }

@media (max-width: 991.98px) {
  .store-topbar { display: none; }
  .store-header { position: relative; }
  .store-header-row { min-height: 62px; gap: 10px; }
  .store-search, .store-actions { display: none; }
  .store-brand { margin-right: auto; }
  .store-brand-mark { width: 35px; height: 35px; }
  .store-brand-tag { display: none; }
  .store-nav { display: none; }
  .frontend-area .app-main { padding-top: 16px; padding-bottom: 90px; }
  .mobile-tabbar { display: grid; position: fixed; z-index: 1035; left: 0; right: 0; bottom: 0; grid-template-columns: repeat(3,minmax(0,1fr)); background: rgba(255,255,255,.97); border-top: 1px solid #e5e7eb; box-shadow: 0 -6px 20px rgba(15,23,42,.06); padding: 5px max(8px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); backdrop-filter: blur(10px); }
  .mobile-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #64748b; text-decoration: none; font-size: .66rem; font-weight: 700; padding: 5px 4px; }
  .mobile-tabbar a i { font-size: 1.22rem; }
  .mobile-tabbar a.active { color: #2563eb; }
  .store-hero { min-height: 230px; border-radius: 17px; }
  .store-filter-row { grid-template-columns: 1fr 180px auto; }
}

@media (max-width: 767.98px) {
  .store-brand-name { font-size: 1.02rem; }
  .store-hero { min-height: 0; padding: 26px 21px; }
  .store-hero h1 { font-size: 1.85rem; }
  .store-hero-points { gap: 7px; }
  .store-hero-point { padding: 7px 9px; font-size: .74rem; }
  .store-filter-panel { padding: 11px; }
  .store-filter-row { grid-template-columns: 1fr; }
  .store-filter-row .btn { width: 100%; }
  .product-grid { --bs-gutter-x: 9px; --bs-gutter-y: 9px; }
  .product-card { border-radius: 12px; }
  .product-card-body { padding: 10px 10px 11px; }
  .product-card-title { font-size: .88rem; }
  .product-card-price { font-size: 1.03rem; }
  .product-card-delivery { font-size: .66rem; }
  .product-placeholder { min-height: 130px; }
  .product-placeholder.big { min-height: 270px; }
  .product-detail-gallery { padding: 10px; border-radius: 14px; }
  .product-detail-panel { border-radius: 14px; padding: 18px 15px; }
  .product-detail-actions { grid-template-columns: 1fr; }
  .product-trust-row { grid-template-columns: 1fr 1fr 1fr; }
  .order-summary-strip { grid-template-columns: 1fr 1fr; }
  .store-footer { display: none; }
}

@media (max-width: 430px) {
  .product-card-category { display: none; }
  .product-card-meta { align-items: flex-end; }
  .product-card-delivery { max-width: 70px; white-space: normal; text-align: right; line-height: 1.2; }
  .product-trust-item { padding: 8px 4px; font-size: .67rem; }
}

/* V0.4 configurable home banner */
.home-banner-shell { overflow: hidden; border-radius: 22px; background: #e5e7eb; box-shadow: 0 16px 38px rgba(15,23,42,.09); }
.home-banner-image { width: 100%; aspect-ratio: 16 / 5.6; object-fit: cover; background: #e5e7eb; }
@media (max-width: 767.98px) { .home-banner-shell { border-radius: 16px; } .home-banner-image { aspect-ratio: 16 / 7.5; } }

/* Buyer order history: the complete row is an accessible link to order details. */
.buyer-order-row[data-row-link] { cursor: pointer; }
.buyer-order-row[data-row-link]:hover > * { background-color: rgba(37, 99, 235, .035); }
.buyer-order-row[data-row-link]:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
