:root{
  --bg:#f7f9fb;
  --card:#fff;
  --muted:#6b7280;
  --accent:#3b82f6; /* Blue */
  --accent2:#10b981; /* Green */
  --radius:16px;
  --max:1000px;
  --shadow:0 8px 32px rgba(15,23,42,0.13);
  --shadow-sm:0 4px 14px rgba(15,23,42,0.09);
  --text:#181a1b;
}

*{box-sizing:border-box}
body{
  font-family:Inter,system-ui,Arial;
  background:var(--bg);
  color:var(--text);
  margin:0;padding:24px;display:flex;justify-content:center;min-height:100vh;
  transition:background 0.8s;
}
.wrap{width:100%;max-width:var(--max);}

/* Header card */
.header-card{
  background: var(--card);
  border-radius:18px;
  padding:28px 24px 24px 24px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  gap:20px;
  margin-bottom:24px;
  align-items:center;
  color: var(--text);
}
.header-top{
  display:flex;
  gap:28px;
  align-items:center;
  justify-content:center;
  flex-wrap: wrap;
  width: 100%;
}

.logo{
  width:160px;
  height:160px;
  border-radius:18px;
  object-fit:cover;
  background:#e5e7eb;
  box-shadow:var(--shadow-sm);
  border:4px solid #e6eefb;
  display:block;
  flex-shrink: 0;
}

.shop-meta{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  min-width: 280px;
}

.shop-name{
  font-family:'Playfair Display',serif;
  font-weight:700;
  font-size:34px;
  margin:0;
  color:var(--text);
  letter-spacing:0.4px;
  text-align: center;
  line-height: 1.2;
}

.meta{
  color:var(--muted);
  font-size:15px;
  margin:0;
  font-weight:400;
  text-align: center;
  line-height: 1.4;
}

.meta.small{
  font-size:14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

#openStatus{
  font-size:13px;
  font-weight:700;
  padding:4px 12px;
  border-radius:8px;
  background:#10b981;
  color:#fff;
  display: inline-block;
}

/* Action buttons */
.actions{
  display:flex;
  gap:12px;
  margin-top:16px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.btn{
  background:#3b82f6;
  color:#fff;
  padding:12px 24px;
  border-radius:12px;
  text-decoration:none;
  font-weight:600;
  font-size:16px;
  box-shadow:0 2px 8px rgba(59,130,246,0.08);
  border:none;
  transition:background 0.2s,box-shadow 0.2s;
  cursor:pointer;
  outline:none;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width: 140px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:hover{
  background:#2563eb;
}

.btn.ghost{
  background:transparent;
  border:2px solid #e6eefb;
  color:var(--accent);
  display:flex;
  align-items:center;
  justify-content:center;
  min-width: 140px;
  white-space: nowrap;
}

.btn.ghost:hover{
  background:#e6eefb;
  color:#2563eb;
}

/* Dark mode toggle */
.darkmode-btn {
  margin: 8px auto 0 auto;
  display: block;
  background: #f3f6fa;
  color: var(--accent);
  border: 1.5px solid #e6eefb;
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(59,130,246,0.08);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  min-width: 44px;
  min-height: 40px;
  outline: none;
}

.darkmode-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,0.13);
}

/* Search bar */
.search-bar{
  display:flex;
  gap:10px;
  max-width:500px;
  width:100%;
  margin-top: 8px;
}

.search-input{
  flex:1;
  padding:12px 16px;
  border-radius:12px;
  border:1.5px solid #e6eefb;
  font-size:15px;
  background:#f8fafc;
  transition:border 0.2s;
  min-width: 0;
}

.search-input:focus{
  border-color:var(--accent);
  outline:none;
}

.search-btn{
  padding:12px 20px;
  border-radius:12px;
  background:var(--accent2);
  color:#fff;
  font-weight:600;
  border:none;
  cursor:pointer;
  white-space: nowrap;
}

.search-btn:hover{
  background:#059669;
}

/* Menu card */
.card{
  background:var(--card);
  border-radius:18px;
  padding:28px;
  box-shadow:0 8px 32px rgba(15,23,42,0.10);
  margin-bottom:28px;
}

/* Sorting and filtering controls */
.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
  gap: 15px;
}

.category-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}

.category-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.category-btn:hover {
  background: #e5e7eb;
}

.sort-select {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid #e6eefb;
  font-size: 15px;
  background: #fff;
  min-width: 180px;
}

/* Items grid */
.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
  margin-top: 0;
}

@media(min-width:820px){ 
  .grid{
    grid-template-columns:repeat(3,1fr);
  }
}

.item{
  background:#fff;
  border-radius:12px;
  padding:16px;
  box-shadow:0 4px 12px rgba(15,23,42,0.04);
  display:flex;
  flex-direction:column;
  gap:12px;
  position:relative;
  overflow:hidden;
  transition:box-shadow 0.3s, transform 0.3s, opacity 0.4s;
  opacity:1;
  height: auto;
  min-height: 340px;
}

.item.hide{
  opacity:0;
  pointer-events:none;
  position: absolute;
  transform: scale(0);
}

.item:hover{
  box-shadow:0 8px 24px rgba(15,23,42,0.12);
  transform:translateY(-4px);
}

/* Image container */
.image-container {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #f3f4f6;
  border: 1px solid #eef6ff;
}

.thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.item:hover .thumb {
  transform: scale(1.05);
}

.name{
  font-weight:700;
  font-size:17px;
  margin:0;
  color:#0f172a;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.desc{
  font-size:14px;
  color:var(--muted);
  margin:0;
  line-height: 1.4;
  min-height: 36px;
}

.price-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:auto;
  gap:8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.price{
  font-weight: 800;
  color: #fff;
  font-size: 1.15rem;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 999px;
  padding: 8px 20px;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(59,130,246,0.13);
  border: 2px solid #eaf1ff;
  font-family: 'Inter', Arial, sans-serif;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.2s, background 0.2s;
}

/* Contact/Inquire button */
.order-btn{
  background: linear-gradient(90deg, #10b981 0%, #22c55e 100%);
  color: #fff;
  padding: 8px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(16,185,129,0.13);
  transition: background 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  margin-left: 0;
  opacity: 0.97;
  border: 2px solid #d1fae5;
  cursor: pointer;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 0.3px;
  border: none;
}

.order-btn:hover:not(:disabled){
  background: #059669;
  box-shadow: 0 4px 12px rgba(5,150,105,0.18);
}

.order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badges */
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  background: var(--accent);
  z-index: 2;
}

.badge.popular {
  background: #f59e0b;
}

.badge.new {
  background: #8b5cf6;
}

.footer-note{
  font-size:14px;
  color:var(--muted);
  margin-top:20px;
  font-weight:500;
  text-align: center;
  display: none;
}

.footer-bar{
  background:linear-gradient(90deg,#e0eafc 0%, #cfdef3 100%);
  border-radius:16px;
  box-shadow:0 4px 18px rgba(15,23,42,0.10);
  padding:28px 0 18px 0;
  margin-top:32px;
  text-align:center;
  border-top:3px solid #10b981;
}

.footer-links{
  display:flex;
  justify-content:center;
  gap:18px;
  margin-top:8px;
  flex-wrap: wrap;
}

.footer-link{
  color:var(--accent2);
  font-weight:600;
  text-decoration:none;
  font-size:15px;
}

.footer-link:hover{
  color:var(--accent);
}

.small-right{
  font-size:13px;
  color:var(--muted);
  text-align:right;
}

/* Dark mode variables */
:root[data-theme='dark'] {
  --bg: #181a1b;
  --card: #23272b;
  --muted: #b0b6c3;
  --accent: #60a5fa;
  --accent2: #22c55e;
  --text: #f3f6fa;
  --shadow: 0 8px 32px rgba(0,0,0,0.25);
  --shadow-sm: 0 4px 14px rgba(0,0,0,0.18);
}

:root[data-theme='dark'] .darkmode-btn {
  background: #23272b;
  color: #60a5fa;
  border: 1.5px solid #60a5fa;
}

:root[data-theme='dark'] .darkmode-btn:hover {
  background: #60a5fa;
  color: #fff;
}

:root[data-theme='dark'] .name {
  color: #f3f6fa;
}

:root[data-theme='dark'] .item {
  background: #2d3238;
}

:root[data-theme='dark'] .image-container {
  background: #3a4047;
  border-color: #4a5568;
}

:root[data-theme='dark'] .footer-bar {
  background: linear-gradient(90deg, #2d3748 0%, #4a5568 100%);
}

:root[data-theme='dark'] .category-btn {
  background: #3a4047;
  border-color: #4a5568;
  color: #b0b6c3;
}

:root[data-theme='dark'] .category-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

:root[data-theme='dark'] .category-btn:hover {
  background: #4a5568;
}

/* Back to Top button */
#backToTopBtn {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(59,130,246,0.13);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#backToTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

/* PRINT STYLES */
@media print {
  body {
    background: white !important;
    color: black !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 12pt !important;
  }
  
  .wrap {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  
  .header-card, .card, .footer-bar {
    display: block !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
    margin-bottom: 15px !important;
  }
  
  .darkmode-btn, .search-bar, #backToTopBtn, 
  .category-btns, .footer-links, .controls-row,
  .order-btn, .btn.ghost, .search-btn,
  .actions, .rating, .small-right {
    display: none !important;
  }
  
  .btn {
    display: inline-block !important;
    background: white !important;
    color: black !important;
    border: 1px solid black !important;
    box-shadow: none !important;
    padding: 5px 10px !important;
    min-width: auto !important;
    text-decoration: none !important;
  }
  
  .item {
    box-shadow: none !important;
    border: 1px solid #eee !important;
    page-break-inside: avoid;
    min-height: auto !important;
    padding: 10px !important;
  }
  
  .grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
  
  .logo {
    width: 140px !important;
    height: 140px !important;
    border: 2px solid #000 !important;
  }
  
  .price-row {
    justify-content: center !important;
  }
  
  .price {
    color: black !important;
    background: #f0f0f0 !important;
    border: 1px solid #000 !important;
    padding: 5px 15px !important;
  }
  
  .print-qr-section {
    display: block !important;
    text-align: center;
    margin-top: 30px;
    page-break-before: always;
    border-top: 2px solid #000;
    padding-top: 20px;
  }
  
  .footer-bar {
    background: white !important;
    border: 1px solid #ddd !important;
    margin-top: 20px !important;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }
  
  .header-card {
    padding: 20px 16px;
    gap: 16px;
    margin-bottom: 20px;
  }
  
  .header-top {
    flex-direction: column;
    gap: 20px;
  }
  
  .logo {
    width: 140px;
    height: 140px;
  }
  
  .shop-name {
    font-size: 28px;
  }
  
  .shop-meta {
    min-width: 100%;
  }
  
  .actions {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .btn, .btn.ghost {
    min-width: 45%;
    flex: 1 1 45%;
    font-size: 15px;
    padding: 12px 8px;
    margin: 2px;
    max-width: 48%;
    box-sizing: border-box;
  }
  
  .search-bar {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-input, .search-btn {
    width: 100%;
    text-align: center;
  }
  
  .card {
    padding: 20px 16px;
  }
  
  .controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .category-btns {
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .category-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .sort-select {
    width: 100%;
    text-align: center;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .item {
    padding: 16px;
    min-height: auto;
  }
  
  .image-container {
    height: 180px;
  }
  
  .name {
    font-size: 16px;
    min-height: auto;
  }
  
  .desc {
    font-size: 14px;
    min-height: auto;
  }
  
  .order-btn {
    font-size: 14px;
    padding: 8px 16px;
    min-height: 42px;
    flex: 1;
    max-width: 120px;
  }
  
  .price {
    font-size: 1.1rem;
    padding: 8px 16px;
    flex: 1;
    max-width: 120px;
  }
  
  .price-row {
    gap: 8px;
    justify-content: space-between;
  }
  
  .footer-bar {
    padding: 24px 16px 16px 16px;
    margin-top: 24px;
  }
  
  .footer-links {
    gap: 12px;
    flex-wrap: wrap;
  }
  
  #backToTopBtn {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    right: 12px;
    bottom: 12px;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .btn, .btn.ghost {
    min-width: 100%;
    flex: 1 1 100%;
    max-width: 100%;
    margin: 4px 0;
  }
  
  .actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .category-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .price, .order-btn {
    max-width: 100%;
    width: 100%;
    justify-content: center;
  }
  
  .price-row {
    flex-direction: column;
    gap: 8px;
  }
}

img, .thumb {
  max-width: 100%;
  height: auto;
  display: block;
}

.item, .card, .header-card, .footer-bar {
  word-break: break-word;
  -webkit-tap-highlight-color: rgba(59,130,246,0.08);
}

.btn, .order-btn {
  min-height: 44px;
  min-width: 44px;
}