:root {
  --primary: #FF6B35;
  --dark: #1a1a2e;
  --gray: #6c757d;
  --light: #f8f9fa;
  --white: #fff;
  --border: #dee2e6;
  --radius: 12px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--dark); background: var(--light); }

/* Store header */
.store-header { padding: 2rem; color: var(--white); text-align: center; }
.store-logo { width: 90px; height: 90px; border-radius: 16px; object-fit: cover;
  border: 3px solid rgba(255,255,255,.3); margin: 0 auto 1rem; display: block; background: rgba(255,255,255,.2); }
.store-name { font-size: 2rem; font-weight: 700; }
.store-logo-placeholder { width: 90px; height: 90px; border-radius: 16px; background: rgba(255,255,255,.2);
  margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; }

/* Branches */
.branches-bar { background: var(--white); padding: .75rem 1.5rem; display: flex; gap: .75rem;
  overflow-x: auto; border-bottom: 1px solid var(--border); }
.branch-btn { padding: .5rem 1.2rem; border-radius: 20px; border: 2px solid var(--border);
  background: var(--white); cursor: pointer; font-size: .9rem; font-weight: 600; white-space: nowrap; transition: all .2s; }
.branch-btn.active { border-color: var(--primary); color: var(--primary); background: #fff5f0; }

/* Products */
.products-section { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07); transition: transform .2s, box-shadow .2s; cursor: pointer; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.product-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--light); }
.product-img-placeholder { width: 100%; aspect-ratio: 1; background: var(--light); display: flex;
  align-items: center; justify-content: center; font-size: 2rem; color: var(--border); }
.product-info { padding: 1rem; }
.product-name { font-weight: 700; margin-bottom: .25rem; font-size: .95rem; }
.product-desc { font-size: .82rem; color: var(--gray); margin-bottom: .5rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-weight: 700; font-size: 1.1rem; }
.product-add { margin-top: .75rem; width: 100%; padding: .5rem; border: none; border-radius: 8px;
  font-weight: 600; cursor: pointer; font-size: .9rem; transition: opacity .2s; }
.product-add:hover { opacity: .85; }

/* Cart */
.cart-fab { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  width: 60px; height: 60px; border-radius: 50%; border: none; font-size: 1.5rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.cart-fab:hover { transform: scale(1.08); }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--dark); color: var(--white);
  width: 22px; height: 22px; border-radius: 50%; font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.cart-count.hidden { display: none; }

/* Cart drawer */
.cart-drawer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--white);
  border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.15); z-index: 200;
  transform: translateY(100%); transition: transform .35s ease; max-height: 80vh; overflow-y: auto; }
.cart-drawer.open { transform: translateY(0); }
.cart-drawer-header { display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white); }
.cart-drawer-header h3 { font-size: 1.1rem; }
.cart-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--gray); }
.cart-items { padding: 1rem 1.5rem; }
.cart-item { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: .95rem; }
.cart-item-price { color: var(--gray); font-size: .88rem; }
.qty-controls { display: flex; align-items: center; gap: .5rem; }
.qty-btn { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--white); cursor: pointer; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-value { min-width: 24px; text-align: center; font-weight: 600; }
.cart-footer { padding: 1.25rem 1.5rem; border-top: 2px solid var(--border); position: sticky; bottom: 0; background: var(--white); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.btn-whatsapp { width: 100%; padding: .9rem; background: #25d366; color: var(--white);
  border: none; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .6rem; transition: opacity .2s; }
.btn-whatsapp:hover { opacity: .9; }
.cart-empty { text-align: center; padding: 2rem; color: var(--gray); }

/* Loading & not found */
.loading-screen, .not-found { min-height: 60vh; display: flex; align-items: center;
  justify-content: center; flex-direction: column; gap: 1rem; color: var(--gray); }
.spinner { width: 36px; height: 36px; border: 4px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Branch info bar */
.branch-info-bar { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; padding: .75rem 1rem;
  background: #f8f9fa; border-bottom: 1px solid var(--border); font-size: .88rem; color: #444; }
.branch-info-item { display: flex; align-items: center; gap: .3rem; }

/* Pre-order modal */
.req { color: #dc3545; }
.preorder-err { background: #fee; color: #c00; border-radius: 8px; padding: .55rem .9rem;
  font-size: .88rem; margin-bottom: .75rem; }
.preorder-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center; z-index: 200; }
.preorder-overlay.hidden { display: none; }
.preorder-modal { background: var(--white); border-radius: 20px 20px 0 0; padding: 1.5rem;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.preorder-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; }
.form-group-s { margin-bottom: 1rem; }
.form-group-s label { display: block; font-size: .88rem; font-weight: 600;
  color: var(--dark); margin-bottom: .4rem; }
.form-group-s input, .form-group-s textarea { width: 100%; padding: .6rem .75rem;
  border: 1px solid var(--border); border-radius: 8px; font-size: .95rem;
  font-family: inherit; box-sizing: border-box; }
.form-group-s textarea { resize: none; }
.delivery-opts { display: flex; gap: .75rem; }
.delivery-opt { flex: 1; display: flex; align-items: center; gap: .5rem;
  padding: .65rem .9rem; border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: .9rem; transition: border-color .2s; }
.delivery-opt:has(input:checked) { border-color: var(--store-primary, #FF6B35); }
.delivery-opt input { accent-color: var(--store-primary, #FF6B35); }
.preorder-actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
.preorder-cancel { flex: 0 0 auto; padding: .75rem 1.2rem; background: none;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  font-size: .95rem; color: var(--gray); }
.preorder-send { flex: 1; padding: .75rem; background: #25d366; color: var(--white);
  border: none; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem; transition: opacity .2s; }
.preorder-send:hover { opacity: .9; }

/* Category filter bar */
.cat-filter-bar { display: flex; gap: .5rem; padding: .75rem 1.5rem; overflow-x: auto;
  background: var(--white); border-bottom: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.cat-filter-btn { padding: .45rem 1.1rem; border-radius: 20px; flex-shrink: 0;
  border: 2px solid var(--store-primary, #FF6B35); background: var(--white);
  color: var(--store-primary, #FF6B35); cursor: pointer; font-size: .9rem;
  font-weight: 600; white-space: nowrap; transition: all .2s; }
.cat-filter-btn:hover { opacity: .8; }
.cat-filter-btn.active { background: var(--store-primary, #FF6B35); color: #fff; }

/* Category sections */
.category-section { margin-bottom: 2.5rem; }
.category-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem;
  padding-bottom: .5rem; border-bottom: 3px solid var(--store-primary, #FF6B35); color: var(--dark); }
.category-highlight .category-title { color: var(--store-primary, #FF6B35); }

/* Branch selection landing */
.branch-selection { max-width: 480px; margin: 0 auto; padding: 1rem 0; }
.branch-selection-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--dark); }
.branch-select-card { display: block; background: var(--white); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,.07);
  text-decoration: none; color: var(--dark); border: 2px solid transparent;
  transition: border-color .2s, transform .2s, box-shadow .2s; position: relative; }
.branch-select-card:hover { border-color: var(--branch-primary, #FF6B35);
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.bsc-name { font-weight: 700; font-size: 1.05rem; margin-bottom: .4rem; }
.bsc-detail { font-size: .875rem; color: var(--gray); margin-top: .25rem; }
.bsc-arrow { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.25rem; font-weight: 700; }

/* Share button & product highlight */
.btn-share { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); cursor: pointer; font-size: 1rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: background .15s; }
.btn-share:hover { background: var(--border); }
.product-highlight { box-shadow: 0 0 0 3px var(--store-primary, #FF6B35);
  animation: pulse-border 1.5s ease-out; }
@keyframes pulse-border {
  0%   { box-shadow: 0 0 0 3px var(--store-primary, #FF6B35); }
  100% { box-shadow: 0 0 0 0px transparent; }
}
