Featured Products
Highest Testing Flower
Top-shelf flower ranked by THC potency.
Top Edibles
Gummies, chocolates, and more.
Favorite Pre-Rolls
Ready to smoke, rolled to perfection.
Shop by Category
Browse our full selection.
Most Popular Vapes
Premium cartridges and disposables.
NYC’s Favorite Legacy Cannabis Dispensary
Silk Road NYC is a licensed cannabis dispensary located in the heart of Queens, New York. We’ve been a cornerstone of the NYC cannabis community, offering top-quality flower, edibles, concentrates, and more from the best brands in the state.
Our knowledgeable staff is here to help you find exactly what you need, whether you’re a seasoned connoisseur or a first-time visitor. We believe in quality, transparency, and making cannabis accessible to everyone.
Visit us in-store or order online for pickup. We’re open 7 days a week and committed to providing the best dispensary experience in New York City.
Frequently Asked Questions
Everything you need to know about shopping with us.
// Inject CSS dynamically (function() { var style = document.createElement('style'); style.id = 'sr-injected-css'; style.textContent = ` /* ============================================================ SILK ROAD NYC - DISPENSARY HOMEPAGE STYLES Prefix: sr- to avoid WordPress/Astra conflicts ============================================================ */
/* --- Reset & Base --- */ .sr-root * { box-sizing: border-box; margin: 0; padding: 0; } .sr-root { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; color: #1a1a1a; background: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; } .sr-root a { text-decoration: none; color: inherit; } .sr-root img { max-width: 100%; height: auto; display: block; } .sr-root button { cursor: pointer; border: none; font-family: inherit; } .sr-root ul { list-style: none; }
/* --- Utility --- */ .sr-container { max-width: 1320px; margin: 0 auto; padding: 0 20px; } .sr-section { padding: 48px 0; } .sr-section-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: #1a1a1a; } .sr-section-subtitle { font-size: 15px; color: #666; margin-bottom: 24px; } .sr-btn-green { display: inline-flex; align-items: center; gap: 8px; background: #2E6416; color: #fff; padding: 12px 28px; border-radius: 50px; font-size: 15px; font-weight: 600; transition: background .2s, transform .15s; } .sr-btn-green:hover { background: #3a7a1c; transform: translateY(-1px); } .sr-btn-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #2E6416; padding: 12px 28px; border: 2px solid #2E6416; border-radius: 50px; font-size: 15px; font-weight: 600; transition: all .2s; } .sr-btn-outline:hover { background: #2E6416; color: #fff; }
/* --- 1. Announcement Bar --- */ .sr-announce { background: #7ed957; color: #fff; padding: 10px 0; font-size: 13px; font-weight: 600; letter-spacing: .5px; overflow: hidden; white-space: nowrap; position: relative; z-index: 100; } .sr-announce-inner { display: inline-block; animation: sr-scroll 30s linear infinite; padding-left: 100%; } @keyframes sr-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
/* --- 2. Header / Nav --- */ .sr-header { position: sticky; top: 0; z-index: 90; background: #fff; border-bottom: 1px solid #eee; padding: 0 20px; } .sr-header-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 16px; height: 68px; } .sr-logo-text { font-family: 'Pacifico', cursive; font-size: 26px; color: #1a1a1a; white-space: nowrap; } .sr-logo-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } .sr-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; } .sr-nav a { padding: 8px 14px; font-size: 14px; font-weight: 500; color: #333; border-radius: 8px; transition: background .15s; white-space: nowrap; } .sr-nav a:hover { background: #f5f5f5; } .sr-search-bar { display: flex; align-items: center; background: #f5f5f5; border-radius: 50px; overflow: hidden; margin-left: 12px; flex-shrink: 0; } .sr-search-bar input { border: none; background: transparent; padding: 10px 16px; font-size: 14px; width: 180px; outline: none; } .sr-search-bar button { background: #7ed957; color: #fff; border: none; padding: 10px 16px; font-size: 14px; font-weight: 600; border-radius: 0 50px 50px 0; } .sr-cart-btn { background: none; border: none; position: relative; padding: 8px; font-size: 22px; color: #333; } .sr-cart-badge { position: absolute; top: 0; right: 0; background: #7ed957; color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .sr-mobile-toggle { display: none; background: none; border: none; font-size: 26px; color: #333; }
/* --- 3. Category Pills --- */ .sr-pills-bar { background: #fff; border-bottom: 1px solid #eee; padding: 12px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .sr-pills-bar::-webkit-scrollbar { display: none; } .sr-pills-inner { display: flex; gap: 10px; padding: 0 20px; max-width: 1320px; margin: 0 auto; white-space: nowrap; } .sr-pill { display: inline-flex; align-items: center; padding: 8px 20px; background: #7ed957; color: #fff; border-radius: 50px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; transition: background .2s, transform .15s; flex-shrink: 0; cursor: pointer; border: none; } .sr-pill:hover { background: #2E6416; transform: translateY(-1px); }
/* --- 4. Store Info Bar --- */ .sr-store-bar { background: #f9f9f9; padding: 12px 0; font-size: 14px; border-bottom: 1px solid #eee; } .sr-store-bar-inner { max-width: 1320px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .sr-store-bar .sr-open-badge { background: #7ed957; color: #fff; padding: 3px 12px; border-radius: 50px; font-size: 12px; font-weight: 700; }
/* --- 5. Hero Section --- */ .sr-hero { display: grid; grid-template-columns: 1fr 1.5fr; min-height: 480px; gap: 0; } .sr-hero-left { background: linear-gradient(135deg, rgba(0,0,0,.85), rgba(0,0,0,.7)), url('https://silkroaddispensary.com/wp-content/uploads/2026/04/best-WEED-IN-NY-1024x576-1.png') center/cover; display: flex; flex-direction: column; justify-content: center; padding: 48px 40px; color: #fff; } .sr-hero-tag { color: #7ed957; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; } .sr-hero-title { font-size: 36px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; } .sr-hero-right { background: #f5f5f5; padding: 32px; display: flex; flex-direction: column; justify-content: center; } .sr-hero-right h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; } .sr-hero-carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; scrollbar-width: none; } .sr-hero-carousel::-webkit-scrollbar { display: none; }
/* --- 6. Product Card --- */ .sr-product-card { background: #2a2a2a; border-radius: 16px; overflow: hidden; min-width: 220px; max-width: 240px; flex-shrink: 0; display: flex; flex-direction: column; scroll-snap-align: start; transition: transform .2s, box-shadow .2s; cursor: pointer; } .sr-product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.25); } .sr-product-img { width: 100%; height: 180px; object-fit: contain; background: #3a3a3a; padding: 12px; } .sr-product-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; } .sr-product-brand { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; } .sr-product-name { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; } .sr-product-price { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 4px; } .sr-product-weight { font-size: 12px; color: #aaa; margin-bottom: 10px; } .sr-product-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } .sr-badge-strain { padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; text-transform: uppercase; } .sr-badge-hybrid { background: #7ed957; color: #fff; } .sr-badge-sativa { background: #f5a623; color: #fff; } .sr-badge-indica { background: #8b5cf6; color: #fff; } .sr-badge-cbd, .sr-badge-thc { background: rgba(255,255,255,.12); color: #ccc; padding: 3px 8px; border-radius: 50px; font-size: 10px; font-weight: 600; } .sr-product-stock { font-size: 11px; color: #ff4d4f; font-weight: 600; margin-bottom: 8px; } .sr-product-cart { margin-top: auto; width: 100%; padding: 10px; background: #7ed957; color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; transition: background .2s; } .sr-product-cart:hover { background: #6bc948; }
/* --- Carousel Wrapper --- */ .sr-carousel-wrap { position: relative; } .sr-carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; padding: 8px 0 16px; scrollbar-width: none; } .sr-carousel::-webkit-scrollbar { display: none; } .sr-carousel .sr-product-card { scroll-snap-align: start; } .sr-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid #ddd; font-size: 18px; display: flex; align-items: center; justify-content: center; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: background .2s; cursor: pointer; color: #333; } .sr-carousel-arrow:hover { background: #f5f5f5; } .sr-carousel-arrow.sr-left { left: -16px; } .sr-carousel-arrow.sr-right { right: -16px; }
/* --- 7. Specials Section --- */ .sr-specials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; } .sr-special-card { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid #eee; transition: transform .2s, box-shadow .2s; } .sr-special-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); } .sr-special-img { width: 100%; height: 200px; object-fit: cover; background: #f5f5f5; } .sr-special-body { padding: 20px; } .sr-special-body h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; } .sr-special-body p { font-size: 14px; color: #666; margin-bottom: 12px; } .sr-special-link { color: #2E6416; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
/* --- 9. Moods Section --- */ .sr-moods-grid { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; } .sr-moods-grid::-webkit-scrollbar { display: none; } .sr-mood-card { min-width: 260px; height: 300px; border-radius: 16px; overflow: hidden; position: relative; flex-shrink: 0; scroll-snap-align: start; cursor: pointer; transition: transform .2s; } .sr-mood-card:hover { transform: scale(1.02); } .sr-mood-card img { width: 100%; height: 100%; object-fit: cover; } .sr-mood-label { position: absolute; bottom: 16px; left: 16px; background: #7ed957; color: #fff; padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 700; }
/* --- 12. Shop by Category --- */ .sr-categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; } .sr-category-card { border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 1; cursor: pointer; transition: transform .2s; } .sr-category-card:hover { transform: scale(1.03); } .sr-category-card img { width: 100%; height: 100%; object-fit: cover; } .sr-category-card .sr-cat-label { position: absolute; bottom: 16px; left: 16px; background: #7ed957; color: #fff; padding: 8px 20px; border-radius: 50px; font-size: 13px; font-weight: 700; text-transform: uppercase; }
/* --- 14. Newsletter Section --- */ .sr-newsletter { background: #f0f9e8; padding: 64px 0; text-align: center; } .sr-newsletter h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; } .sr-newsletter h3 { font-size: 18px; font-weight: 600; color: #2E6416; margin-bottom: 12px; } .sr-newsletter p { font-size: 15px; color: #555; max-width: 520px; margin: 0 auto 24px; } .sr-newsletter-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
/* --- 15. About Section --- */ .sr-about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } .sr-about-img { border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(135deg, #2E6416 0%, #7ed957 100%); display: flex; align-items: center; justify-content: center; } .sr-about-img img { width: 60%; } .sr-about-text h2 { font-size: 28px; font-weight: 800; margin-bottom: 16px; } .sr-about-text p { font-size: 15px; color: #555; margin-bottom: 12px; line-height: 1.7; }
/* --- 16. FAQ Section --- */ .sr-faq { background: #fafafa; } .sr-faq-list { max-width: 800px; margin: 0 auto; } .sr-faq-item { border-bottom: 1px solid #e5e5e5; padding: 0; } .sr-faq-q { width: 100%; background: none; border: none; text-align: left; padding: 20px 0; font-size: 16px; font-weight: 600; color: #1a1a1a; display: flex; justify-content: space-between; align-items: center; cursor: pointer; } .sr-faq-q span { transition: transform .2s; } .sr-faq-q.sr-open span { transform: rotate(45deg); } .sr-faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; font-size: 14px; color: #666; line-height: 1.7; } .sr-faq-a.sr-show { max-height: 300px; padding-bottom: 20px; }
/* --- 17. Footer --- */ .sr-footer { background: #2E6416; color: #fff; padding: 56px 0 0; } .sr-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.5fr; gap: 40px; max-width: 1320px; margin: 0 auto; padding: 0 20px; } .sr-footer-brand img { width: 80px; margin-bottom: 16px; border-radius: 50%; } .sr-footer-brand p { font-size: 14px; opacity: .8; line-height: 1.6; } .sr-footer h4 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; opacity: .6; } .sr-footer ul li { margin-bottom: 10px; } .sr-footer ul li a { font-size: 14px; opacity: .85; transition: opacity .2s; } .sr-footer ul li a:hover { opacity: 1; } .sr-footer-hours td { padding: 4px 16px 4px 0; font-size: 13px; opacity: .85; } .sr-footer-contact p { font-size: 14px; opacity: .85; margin-bottom: 8px; } .sr-footer-contact a { opacity: .85; } .sr-footer-contact a:hover { opacity: 1; } .sr-footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding: 20px; text-align: center; font-size: 12px; opacity: .6; max-width: 1320px; margin-left: auto; margin-right: auto; } .sr-footer-socials { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; } .sr-footer-socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 16px; transition: background .2s; } .sr-footer-socials a:hover { background: rgba(255,255,255,.3); }
/* --- Floating Cart --- */ .sr-float-cart { position: fixed; bottom: 24px; right: 24px; z-index: 999; width: 56px; height: 56px; border-radius: 50%; background: #7ed957; color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.2); transition: transform .2s, box-shadow .2s; cursor: pointer; border: none; } .sr-float-cart:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(0,0,0,.3); } .sr-float-cart .sr-fc-badge { position: absolute; top: -2px; right: -2px; background: #ff4d4f; color: #fff; font-size: 11px; font-weight: 700; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
/* --- Loading Skeleton --- */ .sr-skeleton { background: linear-gradient(90deg, #3a3a3a 25%, #444 50%, #3a3a3a 75%); background-size: 200% 100%; animation: sr-shimmer 1.5s infinite; border-radius: 8px; } @keyframes sr-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } .sr-skel-card { min-width: 220px; max-width: 240px; height: 340px; border-radius: 16px; flex-shrink: 0; }
/* --- Responsive --- */ @media (max-width: 1024px) { .sr-hero { grid-template-columns: 1fr; } .sr-hero-left { min-height: 320px; } .sr-footer-grid { grid-template-columns: 1fr 1fr; } .sr-about { grid-template-columns: 1fr; } .sr-categories-grid { grid-template-columns: repeat(3, 1fr); } .sr-specials-grid { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 768px) { .sr-nav { display: none; } .sr-mobile-toggle { display: block; } .sr-search-bar input { width: 120px; } .sr-hero-title { font-size: 26px; } .sr-hero-left { padding: 32px 24px; } .sr-section-title { font-size: 22px; } .sr-categories-grid { grid-template-columns: repeat(2, 1fr); } .sr-specials-grid { grid-template-columns: 1fr; } .sr-footer-grid { grid-template-columns: 1fr; } .sr-product-card { min-width: 180px; max-width: 200px; } .sr-about { gap: 24px; } .sr-newsletter h2 { font-size: 24px; } .sr-carousel-arrow { display: none; } } @media (max-width: 480px) { .sr-hero-left { padding: 24px 16px; min-height: 260px; } .sr-hero-title { font-size: 22px; } .sr-hero-right { padding: 20px 16px; } .sr-product-card { min-width: 160px; } .sr-section { padding: 32px 0; } .sr-logo-text { font-size: 22px; } .sr-categories-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
/* --- Mobile Nav Overlay --- */ .sr-mobile-nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #fff; z-index: 200; padding: 80px 24px 24px; flex-direction: column; gap: 8px; } .sr-mobile-nav.sr-active { display: flex; } .sr-mobile-nav a { font-size: 18px; font-weight: 600; padding: 14px 0; border-bottom: 1px solid #eee; } .sr-mobile-nav-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 28px; color: #333; } `; document.head.appendChild(style);
// Load Pacifico font var link = document.createElement('link'); link.href = 'https://fonts.googleapis.com/css2?family=Pacifico&display=swap'; link.rel = 'stylesheet'; document.head.appendChild(link); })();
(function() { 'use strict';
// --- Config --- const API_URL = 'https://plus.dutchie.com/plus/2021-07/graphql'; const API_TOKEN = 'public-eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJBUEktQ0xJRU5UIiwiZXhwIjozMzI4MDQxMTQ4NywiaWF0IjoxNzIzNTAyNjg3LCJpc3MiOiJodHRwczovL2R1dGNoaWUuY29tIiwianRpIjoiNTk2ODRhN2EtZDkzZC00NGU0LTllYTItN2UzMDgxZDhiZTAxIiwiZW50ZXJwcmlzZV9pZCI6IjU2YThhNWY1LWUzZGEtNDc4Ny1hMjI2LWQ2YWM0Zjg4MDU0NCIsInV1aWQiOiI0NjkwMjMzMC0xMDczLTQ5ZmQtYjQ0OS0xNzBjMjRlMDAwYWQifQ.t2uAb6v3Zg3hkNyzAn8rDJqOwEibQ2GfXzsbbkIl_Ao'; const RETAILER_ID = 'bb93d3ec-f997-41ff-9ebe-44a1171f0556'; const MENU_URL = '/queens-ny-cannabis-dispensary-menu/';
// --- Dutchie GraphQL Fetch --- async function dutchieQuery(query, variables) { try { const res = await fetch(API_URL, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + API_TOKEN }, body: JSON.stringify({ query, variables }) }); if (!res.ok) throw new Error('API ' + res.status); const json = await res.json(); if (json.errors) { console.warn('Dutchie API errors:', json.errors); } return json.data; } catch (err) { console.error('Dutchie fetch error:', err); return null; } }
// --- Product Card HTML Builder --- function buildProductCard(p) { const brand = p.brand ? p.brand.name : ''; const name = p.name || 'Product'; const image = p.image || 'https://silkroaddispensary.com/wp-content/uploads/2026/04/SR-Logo-Transparent-150x150-1.webp'; const strainType = (p.strainType || '').toUpperCase(); const thc = p.potencyThc ? p.potencyThc.formatted : ''; const cbd = p.potencyCbd ? p.potencyCbd.formatted : '';
// Price from first variant let price = ''; let weight = ''; if (p.variants && p.variants.length > 0) { const v = p.variants[0]; const pr = v.specialPriceRec || v.priceRec; price = pr ? '$' + parseFloat(pr).toFixed(2) : ''; weight = v.option || ''; }
// Strain badge class let strainClass = 'sr-badge-hybrid'; let strainLabel = strainType || 'HYBRID'; if (strainType === 'SATIVA') strainClass = 'sr-badge-sativa'; else if (strainType === 'INDICA') strainClass = 'sr-badge-indica'; if (!strainType) strainLabel = '';
return '
' : '') + '
' + (price ? '
' : '') + (weight ? '
' : '') + '
' + '' + '
' + '
'; }
// --- Render Products into Container --- function renderProducts(containerId, products) { var el = document.getElementById(containerId); if (!el) return; if (!products || products.length === 0) { el.innerHTML = '
No products available at this time.
'; return; } el.innerHTML = products.map(buildProductCard).join(''); }
// --- Fetch Products by Category --- async function fetchProducts(category, limit, sortKey, sortDir) { limit = limit || 10; sortKey = sortKey || 'POTENCY'; sortDir = sortDir || 'DESC';
var filterStr = category ? ', filter: {category: ' + category + '}' : ''; var query = '{ menu(retailerId: "' + RETAILER_ID + '", pagination: {offset: 0, limit: ' + limit + '}, sort: {direction: ' + sortDir + ', key: ' + sortKey + '}' + filterStr + ') { products { id name brand { name } category strainType potencyThc { formatted } potencyCbd { formatted } variants { option priceRec specialPriceRec } image } } }';
var data = await dutchieQuery(query); return data && data.menu ? data.menu.products : []; }
// --- Fetch Specials --- async function fetchSpecials() { var query = '{ specials(retailerId: "' + RETAILER_ID + '") { id name type menuDisplayConfiguration { name description image } } }'; var data = await dutchieQuery(query); return data ? data.specials : []; }
// --- Render Specials --- function renderSpecials(specials) { var el = document.getElementById('sr-specials'); if (!el) return; if (!specials || specials.length === 0) { el.innerHTML = '
No active specials at this time. Check back soon!
'; return; }
var html = specials.slice(0, 6).map(function(s) { var cfg = s.menuDisplayConfiguration || {}; var name = cfg.name || s.name || 'Special'; var desc = cfg.description || ''; var img = cfg.image || 'https://silkroaddispensary.com/wp-content/uploads/2026/04/SR-Ctgry-Flower-768x768-1.webp';
return '
' + name + '
' + (desc ? '
' + desc.substring(0, 120) + (desc.length > 120 ? '...' : '') + '
' : '') + 'Order Now →' + '
' + '
'; }).join('');
el.innerHTML = html; }
// --- Cart Logic (localStorage) --- var CART_KEY = 'sr_cart_items';
function getCart() { try { return JSON.parse(localStorage.getItem(CART_KEY)) || []; } catch(e) { return []; } }
function saveCart(cart) { localStorage.setItem(CART_KEY, JSON.stringify(cart)); updateCartBadges(); }
function updateCartBadges() { var cart = getCart(); var count = cart.length; var badges = document.querySelectorAll('#sr-cart-count, #sr-fc-count'); badges.forEach(function(b) { if (count > 0) { b.textContent = count; b.style.display = 'flex'; } else { b.style.display = 'none'; } }); }
window.srAddToCart = function(productId, event) { if (event) { event.stopPropagation(); event.preventDefault(); } if (!productId) return;
var cart = getCart(); // Check for duplicate var exists = cart.find(function(item) { return item.id === productId; }); if (exists) { exists.qty = (exists.qty || 1) + 1; } else { cart.push({ id: productId, qty: 1 }); } saveCart(cart);
// Button feedback if (event && event.target) { var btn = event.target; var originalText = btn.textContent; btn.textContent = 'Added!'; btn.style.background = '#2E6416'; setTimeout(function() { btn.textContent = originalText; btn.style.background = '#7ed957'; }, 1200); } };
// Click cart buttons -> go to Dutchie embed or menu function handleCartClick() { window.location.href = MENU_URL + '?cart=true'; }
// --- Carousel Arrows --- function initCarouselArrows() { document.querySelectorAll('.sr-carousel-arrow').forEach(function(arrow) { arrow.addEventListener('click', function() { var targetId = this.getAttribute('data-target'); var carousel = document.getElementById(targetId); if (!carousel) return; var scrollAmount = 260; if (this.classList.contains('sr-left')) { carousel.scrollBy({ left: -scrollAmount, behavior: 'smooth' }); } else { carousel.scrollBy({ left: scrollAmount, behavior: 'smooth' }); } }); }); }
// --- FAQ Accordion --- function initFAQ() { document.querySelectorAll('.sr-faq-q').forEach(function(btn) { btn.addEventListener('click', function() { var answer = this.nextElementSibling; var isOpen = answer.classList.contains('sr-show');
// Close all document.querySelectorAll('.sr-faq-a').forEach(function(a) { a.classList.remove('sr-show'); }); document.querySelectorAll('.sr-faq-q').forEach(function(q) { q.classList.remove('sr-open'); });
if (!isOpen) { answer.classList.add('sr-show'); this.classList.add('sr-open'); } }); }); }
// --- Mobile Menu --- function initMobileMenu() { var openBtn = document.getElementById('sr-menu-open'); var closeBtn = document.getElementById('sr-menu-close'); var nav = document.getElementById('sr-mobile-nav');
if (openBtn && nav) { openBtn.addEventListener('click', function() { nav.classList.add('sr-active'); }); } if (closeBtn && nav) { closeBtn.addEventListener('click', function() { nav.classList.remove('sr-active'); }); } // Close on link click if (nav) { nav.querySelectorAll('a').forEach(function(a) { a.addEventListener('click', function() { nav.classList.remove('sr-active'); }); }); } }
// --- Search --- function initSearch() { var input = document.getElementById('sr-search-input'); var btn = document.getElementById('sr-search-btn');
function doSearch() { var term = input ? input.value.trim() : ''; if (term) { window.location.href = MENU_URL + '?search=' + encodeURIComponent(term); } }
if (btn) btn.addEventListener('click', doSearch); if (input) input.addEventListener('keydown', function(e) { if (e.key === 'Enter') doSearch(); }); }
// --- Open Status (check time) --- function checkOpenStatus() { var badge = document.getElementById('sr-open-status'); if (!badge) return; var now = new Date(); var hour = now.getHours(); var day = now.getDay(); // 0=Sun var openHour = day === 0 ? 11 : 10; var closeHour = day === 0 ? 19 : 21;
if (hour >= openHour && hour < closeHour) { badge.textContent = 'Open'; badge.style.background = '#7ed957'; } else { badge.textContent = 'Closed'; badge.style.background = '#ff4d4f'; } } // --- Product Card Click -> Menu --- function initProductLinks() { document.addEventListener('click', function(e) { var card = e.target.closest('.sr-product-card'); if (!card) return; // Don't navigate if they clicked "Add to cart" if (e.target.closest('.sr-product-cart')) return; var pid = card.getAttribute('data-pid'); if (pid) { window.location.href = MENU_URL + '?product=' + pid; } }); }
// --- INIT --- async function init() { // UI setup initCarouselArrows(); initFAQ(); initMobileMenu(); initSearch(); checkOpenStatus(); updateCartBadges(); initProductLinks();
// Cart buttons var headerCart = document.getElementById('sr-header-cart'); var floatCart = document.getElementById('sr-floating-cart'); if (headerCart) headerCart.addEventListener('click', handleCartClick); if (floatCart) floatCart.addEventListener('click', handleCartClick);
// Fetch all data concurrently var [featured, flower, edibles, prerolls, vapes, specials] = await Promise.all([ fetchProducts(null, 8, 'POTENCY', 'DESC'), fetchProducts('FLOWER', 10, 'POTENCY', 'DESC'), fetchProducts('EDIBLES', 10, 'POTENCY', 'DESC'), fetchProducts('PRE_ROLLS', 10, 'POTENCY', 'DESC'), fetchProducts('VAPORIZERS', 10, 'POTENCY', 'DESC'), fetchSpecials() ]);
// Render renderProducts('sr-hero-products', featured); renderProducts('sr-flower-carousel', flower); renderProducts('sr-edibles-carousel', edibles); renderProducts('sr-prerolls-carousel', prerolls); renderProducts('sr-vapes-carousel', vapes); renderSpecials(specials); }
// Run on DOM ready if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); }
})();













