/* =========================================================
   COFFEE TIME — MOBILE RESPONSIVE FIX
   Additive only: does not alter payment/business logic.
   ========================================================= */

html, body { max-width: 100%; overflow-x: hidden; }
body { -webkit-text-size-adjust: 100%; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

/* Better wrapping defaults */
.brand, .brand > span:last-child, .product-info, .product-price, .panel,
.admin-main, .section-head > div, .story-copy, .product-detail-copy { min-width: 0; }
.product-info h3, .product-detail-copy h2, .admin-top h1, .panel h3,
.story-copy h2, .section-head h2 { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .page-shell { margin-top: 24px; }

  .section-head {
    gap: 10px;
  }

  .section-head h2 {
    line-height: 1.2;
  }

  .product-detail-copy h2 {
    font-size: 34px;
  }

  .admin-shell {
    min-width: 0;
  }

  .admin-main {
    overflow: hidden;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .table-wrap {
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 720px) {
  .topbar {
    width: calc(100% - 16px);
    margin: 8px auto 0;
    padding: 8px 9px;
    gap: 8px;
    border-radius: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand {
    gap: 8px;
    overflow: hidden;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 12px;
    flex: 0 0 auto;
  }

  .brand b {
    font-size: 11px;
    letter-spacing: .11em;
    white-space: nowrap;
  }

  .brand small {
    display: none;
  }

  .nav-actions {
    gap: 4px;
    flex: 0 0 auto;
  }

  .nav-actions .icon-btn,
  .mobile-menu-btn {
    width: 35px;
    height: 35px;
    border-radius: 11px;
    flex: 0 0 auto;
  }

  .nav-actions .icon-btn svg {
    width: 16px;
    height: 16px;
  }

  #cart-count {
    top: 2px;
    left: 2px;
    min-width: 14px;
    height: 14px;
    font-size: 8px;
  }

  .page-shell,
  .site-footer {
    width: calc(100% - 16px);
  }

  .page-shell {
    margin-top: 18px;
    margin-bottom: 54px;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-copy {
    padding: 34px 20px 28px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: .11em;
  }

  .eyebrow::before {
    width: 24px;
  }

  .hero h1 {
    font-size: clamp(36px, 10vw, 47px);
    line-height: 1.08;
    margin: 16px 0 14px;
  }

  .hero p {
    font-size: 13px;
    line-height: 1.95;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 20px;
  }

  .hero-actions .btn,
  .btn {
    width: 100%;
    min-height: 46px;
  }

  .hero-visual {
    min-height: 275px;
    height: 275px;
  }

  .hero-badge {
    right: 14px;
    bottom: 14px;
    padding: 11px 13px;
    border-radius: 14px;
  }

  .hero-badge strong {
    font-size: 15px;
  }

  .section-head {
    margin: 46px 0 16px;
    align-items: flex-start;
  }

  .section-head p {
    font-size: 11px;
    line-height: 1.8;
  }

  .shop-toolbar {
    padding: 11px;
    gap: 10px;
    border-radius: 18px;
    align-items: stretch;
  }

  .searchbox {
    min-width: 0;
    width: 100%;
  }

  .searchbox input,
  .field input,
  .field textarea,
  .field select {
    min-width: 0;
    font-size: 16px;
  }

  .filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 5px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 12px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card {
    border-radius: 18px;
  }

  .product-image {
    aspect-ratio: .9;
  }

  .product-pill {
    top: 8px;
    right: 8px;
    padding: 5px 7px;
    font-size: 8px;
  }

  .product-save {
    top: 8px;
    left: 8px;
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
  }

  .product-info {
    padding: 11px;
  }

  .product-info h3 {
    font-size: 13px;
    line-height: 1.55;
  }

  .product-meta {
    font-size: 8px;
    margin: 5px 0 9px;
    gap: 4px;
  }

  .product-price {
    display: grid;
    gap: 9px;
    align-items: stretch;
  }

  .price strong {
    display: inline-block;
    font-size: 14px;
  }

  .price small {
    font-size: 8px;
  }

  .product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .product-actions .btn {
    min-height: 36px;
    padding: 0 7px;
    border-radius: 10px;
    gap: 4px;
    font-size: 9px;
    white-space: nowrap;
  }

  .product-actions .btn svg {
    width: 13px;
    height: 13px;
  }

  .stats-band {
    margin-top: 46px;
  }

  .stat {
    padding: 20px 12px;
  }

  .stat strong {
    font-size: 24px;
  }

  .stat span {
    font-size: 9px;
  }

  .story-card {
    margin-top: 46px;
    border-radius: 22px;
  }

  .story-card img {
    min-height: 250px;
    max-height: 320px;
  }

  .story-copy {
    padding: 26px 20px;
  }

  .story-copy h2 {
    font-size: 31px;
  }

  .story-copy p {
    font-size: 12px;
    line-height: 1.95;
  }

  .drawer-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .drawer-head,
  .drawer-foot {
    padding: 16px;
  }

  .drawer-items {
    padding: 12px 16px;
  }

  .cart-item {
    grid-template-columns: 56px minmax(0, 1fr) 34px;
    gap: 9px;
  }

  .cart-item img {
    width: 56px;
    height: 64px;
    border-radius: 11px;
  }

  .cart-item h4 {
    font-size: 11px;
    line-height: 1.5;
  }

  .cart-item p {
    font-size: 9px;
  }

  .cart-item > .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .stepper {
    gap: 5px;
  }

  .stepper button {
    width: 26px;
    height: 26px;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: center;
  }

  .modal {
    width: 100%;
    max-width: none;
    max-height: calc(100svh - 20px);
    border-radius: 20px;
  }

  .modal-head {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .field.full {
    grid-column: auto;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .product-detail-image {
    min-height: 270px;
    max-height: 400px;
  }

  .product-detail-copy h2 {
    font-size: 30px;
  }

  .detail-price {
    font-size: 24px;
  }

  .detail-list {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .detail-chip {
    padding: 10px;
  }

  .admin-top {
    align-items: stretch;
    gap: 12px;
  }

  .admin-top h1 {
    font-size: 32px;
  }

  .admin-top p {
    font-size: 11px;
    line-height: 1.8;
  }

  .admin-top > div:last-child {
    width: 100%;
  }

  .admin-top > div:last-child .btn {
    flex: 1 1 auto;
  }

  .admin-side {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .admin-side::-webkit-scrollbar {
    display: none;
  }

  .admin-side button {
    flex: 0 0 auto;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    padding: 10px 12px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .kpi {
    padding: 14px;
  }

  .kpi strong {
    font-size: 23px;
  }

  .panel {
    padding: 14px;
    border-radius: 17px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .role-actions {
    min-width: 0;
  }

  table {
    min-width: 620px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 14px;
  }

  .footer-bottom {
    gap: 7px;
    line-height: 1.8;
  }

  .toast-root {
    inset-inline-start: 10px;
    inset-inline-end: 10px;
    bottom: 10px;
  }

  .toast {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .topbar {
    gap: 6px;
  }

  .brand b {
    font-size: 10px;
  }

  .nav-actions {
    gap: 3px;
  }

  .nav-actions .icon-btn,
  .mobile-menu-btn {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }

  .hero-copy {
    padding-inline: 17px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-visual {
    min-height: 235px;
    height: 235px;
  }

  .product-grid {
    gap: 8px;
  }

  .product-info {
    padding: 9px;
  }

  .product-info h3 {
    font-size: 12px;
  }

  .product-meta {
    font-size: 7px;
  }

  .product-actions .btn {
    font-size: 8px;
    padding-inline: 5px;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 370px) {
  .brand > span:last-child {
    display: none;
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .nav-actions {
    justify-content: flex-end;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-image {
    aspect-ratio: 1.05;
  }

  .product-info h3 {
    font-size: 14px;
  }

  .product-meta {
    font-size: 9px;
  }

  .product-actions .btn {
    font-size: 9px;
    min-height: 38px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   COFFEE TIME — FIXED FLOATING NAVIGATION (2026-10-09)
   Keep the top navigation visible while scrolling on desktop/tablet/mobile.
   ========================================================= */
.topbar {
  position: fixed !important;
  top: 12px !important;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 !important;
  width: min(1380px, calc(100% - 36px));
  z-index: 1000;
  isolation: isolate;
}
body { padding-top: 88px; }

@media (max-width: 720px) {
  .topbar {
    top: 8px !important;
    width: calc(100% - 16px);
  }
  body { padding-top: 64px; }
}
