/* FloralsOC mobile responsive layer — CSS only. Desktop behavior and JavaScript stay unchanged. */

/* Keep form controls readable in iOS/Safari and prevent dark password fields. */
input, select, textarea, button { max-width: 100%; }
input[type="password"], input[type="email"], input[type="text"], input[type="tel"], input[type="number"], input[type="date"],
.search, .field, textarea, select {
  color: #1d1d1b;
  -webkit-text-fill-color: #1d1d1b;
}
input[type="password"] { background:#fff !important; color:#1d1d1b !important; -webkit-text-fill-color:#1d1d1b !important; }

@media (max-width: 900px) {
  html, body { width:100%; overflow-x:hidden; }
  body { -webkit-text-size-adjust:100%; }

  /* Shared page spacing */
  .section, .admin-section { width:100%; padding-left:18px !important; padding-right:18px !important; }
  .flow-shell, .flow-shell.wide, .flow-shell.medium, .flow-shell.narrow { width:calc(100% - 32px) !important; max-width:none !important; }
  .flow-title.small { font-size:clamp(34px,9vw,50px); line-height:1; }

  /* Header: compact first row + horizontally scrollable navigation. */
  .muse-header { position:sticky; top:0; }
  .muse-nav { min-height:0; padding:10px 14px 0 !important; gap:8px 10px !important; flex-wrap:wrap; align-items:center; }
  .muse-wordmark { flex:1 1 auto; min-width:0; }
  .muse-wordmark span { font-size:19px; }
  .muse-actions { margin-left:auto; flex:0 0 auto; gap:6px; }
  .muse-actions #cartBtn { min-height:40px; padding:9px 12px; white-space:nowrap; }
  .muse-navlinks { order:3; flex:1 0 100%; width:100%; display:flex !important; gap:22px !important; justify-content:flex-start !important; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:none; border-top:1px solid #e7e7e2; }
  .muse-navlinks::-webkit-scrollbar { display:none; }
  .muse-navlinks button { flex:0 0 auto; padding:10px 0 11px !important; font-size:12px; white-space:nowrap; }

  /* Hero / homepage */
  .muse-hero { display:block !important; padding:42px 18px 48px !important; }
  .muse-hero-copy { padding:4px 0 30px !important; }
  .muse-hero h1 { font-size:clamp(50px,13vw,72px) !important; line-height:.92; max-width:11ch; }
  .muse-hero-copy>p { margin-top:22px; font-size:16px; }
  .muse-hero-actions, .muse-account-actions { display:grid; grid-template-columns:1fr; gap:8px; }
  .muse-hero-actions .btn, .muse-account-actions .btn { width:100%; min-height:48px; }
  .muse-inline-action { line-height:1.45; }
  .muse-facts { gap:10px 16px; margin-top:26px; }
  .approved-hero-grid { border-radius:16px; }
  .muse-service-strip { padding:18px; gap:12px 18px; }
  .muse-service-strip .label { flex:1 0 100%; }
  .muse-section { padding:64px 18px !important; }
  .muse-section-head { margin-bottom:28px; }
  .muse-section-head h2, .muse-dark h2, .muse-account-band h2, .muse-request h2 { font-size:clamp(42px,11vw,60px) !important; }
  .muse-dark-inner, .muse-account-inner { padding-left:18px !important; padding-right:18px !important; gap:36px !important; }
  .muse-step { grid-template-columns:42px 1fr; gap:12px; }
  .muse-request { padding-left:18px !important; padding-right:18px !important; }
  .muse-request .btn { width:100%; min-height:48px; }

  /* Catalog */
  .section-head { align-items:flex-start; flex-direction:column; gap:10px; }
  .shop-layout { display:block; }
  .filters { position:static !important; margin-bottom:14px; border-radius:12px; padding:14px; }
  .filter-section { padding:7px 0; }
  #categoryChecks { display:flex; flex-wrap:wrap; gap:6px 14px; }
  #categoryChecks .check { margin:5px 0; }
  .shop-tools { grid-template-columns:1fr; gap:8px; }
  .search, select, .field { min-height:46px; border-radius:10px; }
  .statusline-account { align-items:flex-start; }
  .status-actions { width:100%; display:grid; grid-template-columns:1fr 1fr; }
  .status-actions .btn { width:100%; min-height:42px; }
  #shop .products, .products, .muse-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
  .card { min-width:0; }
  .card-body { padding:10px 2px 4px !important; }
  .card h3 { font-size:16px !important; line-height:1.16; overflow-wrap:anywhere; }
  .card .meta { font-size:9px; }
  .card-actions { display:grid; grid-template-columns:minmax(0,1fr) 36px; gap:6px; }
  .card-actions .btn { width:100%; min-width:0; padding:8px 7px !important; font-size:9px !important; white-space:normal; line-height:1.2; }
  .quickadd { width:36px !important; height:36px; }
  .badge { max-width:calc(100% - 54px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

  /* Product detail */
  .product-page-grid { grid-template-columns:1fr !important; gap:22px !important; }
  .product-page-media { min-height:0 !important; position:static !important; }
  .product-page-media img, .product-page-media video { min-height:0 !important; max-height:none !important; aspect-ratio:4/5; object-fit:cover; }
  .product-page-content { padding-top:0 !important; }
  .media-thumbs { padding-bottom:4px; }
  .detailtabs { overflow-x:auto; gap:18px; scrollbar-width:none; }
  .detailtabs::-webkit-scrollbar { display:none; }
  .detailtabs button { flex:0 0 auto; white-space:nowrap; }
  .qtyrow { align-items:stretch; }
  .qtyrow input { width:76px; min-height:46px; }

  /* Weekly / how-it-works / informational pages */
  .info-grid, .steps, .trustgrid { grid-template-columns:1fr !important; }
  .info-card, .step { border-radius:14px; }
  .info-card .btn { width:100%; }

  /* Account, forms, cart, checkout, custom request, quick order */
  .formrow { grid-template-columns:1fr !important; gap:9px; }
  .formrow input, .formrow select, .formrow textarea, .field, .search { width:100%; font-size:16px; }
  #accountPanel .search, #accountPanel .field, #accountPanel .formrow input,
  .modern-checkout-shell input, .modern-checkout-shell select, .modern-checkout-shell textarea { font-size:16px !important; }
  #accountPanel .account-tabs { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-radius:12px; }
  #accountPanel .account-tabs .btn { width:100%; white-space:nowrap; padding:10px 8px !important; }
  #accountPanel .account-tabs #dashboardTab:not(.hidden) { grid-column:1/-1; }
  #accountPanel .dashboard-card { padding:16px !important; }
  .account-card-head { display:block; }
  .account-card-head .btn { margin-top:10px; width:100%; }
  .personal-referral-stats { grid-template-columns:1fr 1fr; }
  #cartPanel .cart-item { padding:14px !important; }
  .cart-total { display:flex; justify-content:space-between; gap:14px; }
  .order-actions, .admin-card-actions { align-items:stretch; }
  .order-actions .btn { flex:1 1 140px; }
  .checkout-submit-row { grid-template-columns:1fr !important; }
  .checkout-submit-row .flow-primary { width:100%; }
  #customModal .flow-primary, #quickModal .flow-primary, #profileModal .flow-primary { width:100%; min-height:50px; }
  #quickText { min-height:180px !important; }

  /* Admin / Back Office */
  .admin-titlebar { align-items:flex-start !important; flex-direction:column; }
  .admin-head-actions { width:100%; }
  .admin-head-actions .btn { flex:1 1 140px; }
  .admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px !important; }
  .admin-metric { min-width:0; padding:14px !important; border-radius:12px !important; }
  .admin-metric strong { font-size:clamp(23px,7vw,30px) !important; overflow-wrap:anywhere; }
  .admin-tabs { display:flex; overflow-x:auto; flex-wrap:nowrap !important; padding-bottom:5px; scrollbar-width:none; }
  .admin-tabs::-webkit-scrollbar { display:none; }
  .admin-tabs .btn { flex:0 0 auto; white-space:nowrap; }
  .admin-toolbar { grid-template-columns:1fr !important; }
  .admin-toolbar-actions { width:100%; display:grid; grid-template-columns:1fr; }
  .admin-toolbar-actions .btn, .admin-toolbar-actions select { width:100%; }
  .admin-card { grid-template-columns:1fr !important; padding:14px !important; border-radius:14px !important; }
  .admin-card-title { display:block !important; }
  .admin-card-title .status-pill { display:inline-block; margin-top:7px; }
  .admin-details { grid-template-columns:1fr !important; }
  .admin-details .wide { grid-column:auto; }
  .admin-card-actions { justify-content:flex-start !important; }
  .admin-card-actions .btn, .admin-card-actions select { flex:1 1 130px; min-height:40px; }
  .admin-product-row { grid-template-columns:64px minmax(0,1fr) !important; align-items:start !important; }
  .admin-product-row img { width:64px; height:64px; }
  .admin-product-row>.admin-card-actions { grid-column:1/-1; }
  .admin-main-photo-row { grid-template-columns:1fr !important; }
  .admin-main-photo-preview { width:100% !important; height:auto !important; aspect-ratio:16/10; }
  .admin-media-controls, .admin-media-controls .btn, .admin-media-heading .btn { width:100%; }
  .admin-media-gallery { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .homepage-photo-grid { grid-template-columns:1fr !important; }
  .homepage-manager-head { flex-direction:column; }
  .referral-builder { padding:16px; border-radius:14px; }
  .referral-actions { display:grid; grid-template-columns:1fr; }
  .admin-subsection-head { flex-direction:column; align-items:flex-start !important; }
  .admin-credit-row { flex-direction:column; align-items:stretch !important; }

  /* Invoice */
  .invoice-top-actions { align-items:stretch; }
  .invoice-top-actions .btn, .invoice-top-actions .page-back { flex:1; }
  .invoice-doc { padding:20px 14px !important; border-radius:10px !important; }
  .invoice-brand-row, .invoice-heading { display:block !important; }
  .invoice-status { align-items:flex-start !important; margin-top:16px; }
  .invoice-customer { margin-top:20px; }
  .invoice-meta-grid { grid-template-columns:1fr !important; }
  .invoice-meta-grid>div.wide { grid-column:auto !important; }
  .invoice-table { min-width:560px; }

  /* Assistant */
  .help-pill { right:12px !important; bottom:12px !important; max-width:calc(100vw - 24px); }
  .help-page .page-thread { height:min(48vh,420px) !important; }
  .help-compose.page-compose { grid-template-columns:1fr !important; }
  .help-compose .help-send { width:100%; min-height:44px; }

  /* Footer */
  .muse-footer-inner, .footer { grid-template-columns:1fr 1fr !important; gap:24px 18px; }
  .muse-footer-inner>div:first-child, .footer>div:first-child { grid-column:1/-1; }
}

@media (max-width: 560px) {
  .announcement { padding:7px 10px; font-size:8px; line-height:1.4; letter-spacing:.09em; }
  .muse-nav { padding-left:12px !important; padding-right:12px !important; }
  .muse-wordmark small { display:none; }
  .muse-actions #backOfficeBtn { max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .muse-hero { padding-left:14px !important; padding-right:14px !important; }
  .muse-hero h1 { font-size:clamp(46px,14vw,60px) !important; }
  .approved-hero-grid { padding:10px !important; gap:10px !important; grid-template-rows:220px 220px auto 235px !important; }
  .approved-hero-a, .approved-hero-b { min-height:220px !important; }
  .approved-hero-c { min-height:235px !important; }
  .muse-section, .muse-dark-inner, .muse-account-inner, .muse-request { padding-left:14px !important; padding-right:14px !important; }
  .muse-section-head h2, .muse-dark h2, .muse-account-band h2, .muse-request h2 { font-size:clamp(39px,12vw,52px) !important; }
  .muse-account-card { padding:15px; }
  .muse-account-card>div { gap:10px; align-items:flex-start; }
  .muse-account-card strong { max-width:55%; }

  .section, .admin-section { padding-left:14px !important; padding-right:14px !important; }
  .flow-shell, .flow-shell.wide, .flow-shell.medium, .flow-shell.narrow { width:calc(100% - 28px) !important; }
  .status-actions { grid-template-columns:1fr; }
  #shop .products, .products, .muse-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .card-img img, .card img { aspect-ratio:4/5; }
  .card h3 { font-size:15px !important; }
  .card-actions { grid-template-columns:1fr; }
  .quickadd { width:100% !important; }

  .personal-referral-stats { grid-template-columns:1fr; }
  .personal-referral-stats>div.wide { grid-column:auto; }
  .admin-metrics { grid-template-columns:1fr 1fr !important; }
  .admin-media-gallery { grid-template-columns:1fr 1fr !important; }
  .muse-footer-inner, .footer { grid-template-columns:1fr !important; }
  .muse-footer-inner>div:first-child, .footer>div:first-child { grid-column:auto; }

  /* Make tap targets comfortable without changing the desktop design. */
  button, .btn, .iconbtn, select { touch-action:manipulation; }
  .btn { min-height:42px; }
}

@media (max-width: 360px) {
  #shop .products, .products, .muse-product-grid { grid-template-columns:1fr !important; }
  .admin-metrics, .admin-media-gallery { grid-template-columns:1fr !important; }
}


/* Policy pages and checkout terms — shared desktop/mobile layer. */
.policy-shell{padding-top:42px;padding-bottom:72px}.policy-updated{margin:8px 0 28px;color:#77736b;font-size:13px}.policy-card{max-width:920px;padding:24px 0;border-top:1px solid #dedbd2}.policy-card h2{margin:0 0 10px;font-size:20px;line-height:1.2}.policy-card p{margin:8px 0;color:#4d4b45;line-height:1.7}.policy-card a{color:inherit;text-decoration:underline;text-underline-offset:3px}.policy-highlight{padding:22px;border:1px solid #d6d2c7;border-radius:14px;background:#faf8f2;margin:10px 0}.checkout-terms-box{margin:16px 0 18px;padding:15px 16px;border:1px solid #ddd9ce;border-radius:12px;background:#faf9f5}.checkout-terms-check{display:flex;gap:10px;align-items:flex-start;line-height:1.45;font-size:13px;color:#45433e}.checkout-terms-check input{width:18px;height:18px;flex:0 0 18px;margin-top:1px;accent-color:#1d1d1b}.checkout-policy-links{display:flex;gap:7px;align-items:center;margin:9px 0 0 28px;font-size:12px}.policy-link{border:0;background:transparent;padding:0;color:#1d1d1b;text-decoration:underline;text-underline-offset:3px;cursor:pointer;font:inherit}.policy-link:hover{opacity:.68}
@media(max-width:900px){.policy-shell{padding-top:28px;padding-bottom:54px}.policy-card{padding:20px 0}.policy-highlight{padding:18px}.checkout-policy-links{flex-wrap:wrap}}

.product-final-sale{margin:14px 0 4px;padding:12px 14px;border-radius:10px;background:#f5f2e9;color:#4b4943;font-size:12px;line-height:1.55}.product-final-sale a{color:inherit;text-decoration:underline;text-underline-offset:3px}.product-final-sale .policy-link{font-size:inherit}
