<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pit Lane Lemonade | Order Ahead</title>
<style>
:root {
--red:#ec2638;
--black:#101115;
--card:#1e2027;
--text:#ffffff;
--gray:#b4b7c2;
}
* {box-sizing:border-box}
body {
margin:0;
background:var(--black);
color:var(--text);
font-family:Arial,Helvetica,sans-serif;
}
header {
padding:18px 5%;
background:#191a20;
border-bottom:3px solid var(--red);
display:flex;
align-items:center;
justify-content:space-between;
gap:10px;
}
.logo {
font-size:23px;
font-weight:900;
font-style:italic;
}
.logo span {color:var(--red)}
button {
border:0;
border-radius:8px;
cursor:pointer;
font-weight:bold;
}
.red-btn {
background:var(--red);
color:white;
padding:13px 19px;
}
.hero {
padding:70px 20px;
text-align:center;
background:linear-gradient(130deg,#282a33,#101115);
}
.eyebrow {
color:#ff7380;
font-weight:bold;
letter-spacing:3px;
}
.hero h1 {
font-size:clamp(38px,8vw,75px);
font-style:italic;
margin:18px 0;
}
.hero h1 span {color:var(--red)}
.hero p {color:#d2d4d9}
.pickup-box {
display:inline-block;
padding:17px 25px;
border:1px solid #555;
border-radius:12px;
background:#ffffff12;
line-height:1.9;
}
main {
max-width:1100px;
margin:auto;
padding:40px 20px;
}
.section-title {
border-left:5px solid var(--red);
padding-left:15px;
font-size:28px;
}
.tabs {
display:flex;
flex-wrap:wrap;
gap:10px;
margin-bottom:25px;
}
.tab {
background:#292b35;
color:white;
padding:12px 18px;
}
.tab.active {background:var(--red)}
.products {
display:grid;
grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
gap:20px;
}
.product {
padding:25px;
background:var(--card);
border:1px solid #383a45;
border-radius:15px;
display:flex;
flex-direction:column;
}
.product small {
color:#ff7380;
font-weight:bold;
letter-spacing:1px;
}
.product h3 {
font-size:23px;
margin:14px 0;
}
.product p {
color:var(--gray);
line-height:1.5;
flex:1;
}
.bottom {
display:flex;
justify-content:space-between;
align-items:center;
gap:8px;
}
.price {
font-size:24px;
font-weight:900;
}
.add {
padding:12px 15px;
background:white;
color:#101115;
}
.overlay {
position:fixed;
inset:0;
background:#000b;
z-index:5;
display:none;
}
.overlay.open {display:block}
.drawer {
position:fixed;
right:0;
top:0;
height:100%;
width:min(440px,100%);
z-index:6;
background:#1b1d24;
padding:25px;
overflow-y:auto;
transform:translateX(110%);
transition:transform .25s;
}
.drawer.open {transform:translateX(0)}
.drawer-head {
display:flex;
align-items:center;
justify-content:space-between;
}
.close {
background:transparent;
color:white;
font-size:30px;
}
.cart-item {
border-bottom:1px solid #444;
padding:16px 0;
display:flex;
justify-content:space-between;
gap:12px;
}
.cart-item small {
display:block;
color:var(--gray);
margin-top:7px;
}
.qty {
display:flex;
align-items:center;
gap:10px;
}
.qty button {
padding:8px 12px;
background:#383b46;
color:white;
}
.total {
display:flex;
justify-content:space-between;
margin:20px 0;
font-size:21px;
font-weight:bold;
}
.tip-box {
padding:16px;
display:flex;
align-items:center;
gap:12px;
background:#30323a;
border-radius:10px;
}
.tip-box input {
width:20px;
height:20px;
accent-color:var(--red);
}
.field {
display:block;
margin:15px 0;
font-weight:bold;
}
.field input,.field select,.field textarea {
display:block;
width:100%;
margin-top:8px;
padding:13px;
background:#30323a;
border:1px solid #555;
border-radius:8px;
color:white;
font:inherit;
}
.full {width:100%}
.notice {
font-size:13px;
line-height:1.6;
color:#bfc1ca;
}
.error {color:#ff9199}
footer {
text-align:center;
padding:30px;
color:#aaa;
border-top:1px solid #333;
}
@media(max-width:500px){
header {padding:14px}
.logo {font-size:18px}
.hero {padding:48px 16px}
}
</style>
</head>
<body>
<header>
<div class="logo">
PIT LANE <span>LEMONADE</span>
</div>
<button class="red-btn" onclick="openCart()">
CART (<span id="cartCount">0</span>)
</button>
</header>
<section class="hero">
<div class="eyebrow">
RACING-INSPIRED REFRESHMENTS
</div>
<h1>YOUR NEXT<br><span>PIT STOP.</span></h1>
<p>Fresh lemonades. Specialty drinks. Order ahead.</p>
<div class="pickup-box">
🏁 PICKUP WEDNESDAY & FRIDAY<br>
🕒 3:05 PM<br>
📍 Valley View & Cedar Road<br>
<small>No holiday pickups</small>
</div>
</section>
<main>
<h2 class="section-title">DRINK MENU</h2>
<div class="tabs" id="tabs"></div>
<div class="products" id="products"></div>
</main>
<footer>
PIT LANE LEMONADE<br><br>
MADE FOR THE GRID 🏁
</footer>
<div class="overlay" id="overlay"
onclick="closeCart()"></div>
<aside class="drawer" id="drawer">
<div class="drawer-head">
<h2>YOUR CART</h2>
<button class="close" onclick="closeCart()">×</button>
</div>
<div id="cartItems"></div>
<div class="total">
<span>Subtotal</span>
<span id="subtotal">$0.00</span>
</div>
<label class="tip-box">
<input id="roundup" type="checkbox"
onchange="renderCart()">
<span>
<strong>Round up for gratuity</strong>
<br>
<small id="tipText">Optional</small>
</span>
</label>
<div class="total">
<span>TOTAL</span>
<span id="grandTotal">$0.00</span>
</div>
<form id="orderForm"
method="POST"
action="https://formsubmit.co/roccopan16@gmail.com">
<h3>PICKUP DETAILS</h3>
<label class="field">
Customer name
<input id="name" name="customer_name"
required maxlength="60">
</label>
<label class="field">
Contact email
<input id="email" name="email"
type="email" required>
</label>
<label class="field">
Pickup date
<select id="pickupDate" name="pickup_date"
required></select>
</label>
<label class="field">
Notes (optional)
<textarea id="notes" name="notes"
rows="3" maxlength="300"></textarea>
</label>
<input type="hidden" name="_subject"
value="NEW PIT LANE LEMONADE ORDER">
<input type="hidden" name="_captcha" value="true">
<input type="hidden" name="order_id" id="orderId">
<input type="hidden" name="order_items" id="orderItems">
<input type="hidden" name="subtotal" id="orderSubtotal">
<input type="hidden" name="gratuity" id="orderTip">
<input type="hidden" name="total" id="orderTotal">
<input type="hidden" name="pickup_time" value="3:05 PM">
<input type="hidden" name="pickup_location"
value="Valley View & Cedar Road intersection">
<input type="hidden" name="payment_status"
value="Not paid - order request only">
<p class="notice">
Orders must be confirmed by email before pickup.
Payment is arranged separately.
Submitting this request does not charge you.
</p>
<p class="error" id="error"></p>
<button class="red-btn full" type="submit"
id="checkoutButton">
SUBMIT ORDER REQUEST
</button>
</form>
<p class="notice">
Checkout uses FormSubmit. Its confirmation page
opens after submitting. Email delivery requires
the business inbox to activate FormSubmit first.
</p>
</aside>
<script>
// PRODUCTS
const products = [
{
id:1,
name:"Pole Position Lemonade",
category:"Lemonades",
price:5.50,
description:"Our signature classic lemonade."
},
{
id:2,
name:"Strawberry Speed",
category:"Lemonades",
price:6.00,
description:"Refreshing strawberry lemonade."
},
{
id:3,
name:"Blue Circuit",
category:"Lemonades",
price:6.25,
description:"Blue raspberry lemonade."
},
{
id:4,
name:"Mango Apex",
category:"Lemonades",
price:6.00,
description:"Tropical mango lemonade."
},
{
id:5,
name:"Peach Grand Prix",
category:"Lemonades",
price:6.00,
description:"Sweet peach lemonade."
},
{
id:6,
name:"Pit Stop Refresher",
category:"Specialty Drinks",
price:6.50,
description:"Raspberry lemonade with Sprite."
},
{
id:7,
name:"Apex Berry Fizz",
category:"Specialty Drinks",
price:6.50,
description:"Mixed berry sparkling lemonade."
},
{
id:8,
name:"Turbo Tropic",
category:"Specialty Drinks",
price:6.50,
description:"Mango and pineapple lemonade."
},
{
id:9,
name:"Trackside Cooler",
category:"Specialty Drinks",
price:6.50,
description:"Blue raspberry lemonade with Sprite."
}
];
const $ = id => document.getElementById(id);
const money = n => "$" + n.toFixed(2);
let cart = {};
let category = "All";
function showProducts() {
$("tabs").innerHTML = "";
$("products").innerHTML = "";
["All","Lemonades","Specialty Drinks"].forEach(c => {
let b = document.createElement("button");
b.className = "tab" + (c === category ? " active":"");
b.textContent = c;
b.onclick = () => {
category = c;
showProducts();
};
$("tabs").appendChild(b);
});
products.filter(p =>
category === "All" || p.category === category
).forEach(p => {
const card = document.createElement("div");
card.className = "product";
const type = document.createElement("small");
type.textContent = p.category.toUpperCase();
const title = document.createElement("h3");
title.textContent = p.name;
const desc = document.createElement("p");
desc.textContent = p.description;
const bottom = document.createElement("div");
bottom.className = "bottom";
const price = document.createElement("span");
price.className = "price";
price.textContent = money(p.price);
const add = document.createElement("button");
add.className = "add";
add.textContent = "+ ADD";
add.onclick = () => addItem(p.id);
bottom.append(price,add);
card.append(type,title,desc,bottom);
$("products").appendChild(card);
});
}
function addItem(id) {
cart[id] = (cart[id] || 0) + 1;
renderCart();
}
function changeQty(id, delta) {
cart[id] = (cart[id] || 0) + delta;
if (cart[id] <= 0) delete cart[id];
renderCart();
}
function items() {
return Object.entries(cart).map(([id,qty]) => ({
...products.find(p => p.id == id),
qty
}));
}
function totals() {
const cents = items().reduce(
(sum,p) => sum + Math.round(p.price * 100) * p.qty,
0
);
const possibleTip = (100 - cents % 100) % 100;
const tip = $("roundup").checked ? possibleTip : 0;
return {
subtotal:cents / 100,
tip:tip / 100,
possibleTip:possibleTip / 100,
total:(cents + tip) / 100
};
}
function renderCart() {
$("cartItems").innerHTML = "";
let count = 0;
for (const p of items()) {
count += p.qty;
const row = document.createElement("div");
row.className = "cart-item";
const info = document.createElement("div");
const title = document.createElement("strong");
title.textContent = p.name;
const sub = document.createElement("small");
sub.textContent = money(p.price) + " each";
info.append(title,sub);
const qty = document.createElement("div");
qty.className = "qty";
const minus = document.createElement("button");
minus.textContent = "−";
minus.onclick = () => changeQty(p.id,-1);
const amount = document.createElement("span");
amount.textContent = p.qty;
const plus = document.createElement("button");
plus.textContent = "+";
plus.onclick = () => changeQty(p.id,1);
qty.append(minus,amount,plus);
row.append(info,qty);
$("cartItems").appendChild(row);
}
if (!count) {
$("cartItems").textContent = "Your cart is empty.";
}
const t = totals();
$("cartCount").textContent = count;
$("subtotal").textContent = money(t.subtotal);
$("grandTotal").textContent = money(t.total);
$("tipText").textContent =
"Optional gratuity: +" + money(t.possibleTip);
$("checkoutButton").disabled = count === 0;
}
function openCart() {
$("drawer").classList.add("open");
$("overlay").classList.add("open");
}
function closeCart() {
$("drawer").classList.remove("open");
$("overlay").classList.remove("open");
}
// DATE HELPERS
function dateKey(d) {
return d.getFullYear() + "-" +
String(d.getMonth()+1).padStart(2,"0") + "-" +
String(d.getDate()).padStart(2,"0");
}
function makeDate(year,month,day) {
return new Date(year,month-1,day,12);
}
function nthWeekday(year,month,weekday,n) {
const d = makeDate(year,month,1);
const offset = (weekday-d.getDay()+7)%7;
d.setDate(1+offset+7*(n-1));
return d;
}
function lastWeekday(year,month,weekday) {
const d = new Date(year,month,0,12);
d.setDate(
d.getDate()-(d.getDay()-weekday+7)%7
);
return d;
}
function observed(year,month,day) {
const d = makeDate(year,month,day);
if (d.getDay() === 6) d.setDate(d.getDate()-1);
if (d.getDay() === 0) d.setDate(d.getDate()+1);
return d;
}
// U.S. FEDERAL HOLIDAYS
function holidaysForYear(year) {
const dates = [
observed(year,1,1),
nthWeekday(year,1,1,3), // MLK Day
nthWeekday(year,2,1,3), // Washington's Birthday
lastWeekday(year,5,1), // Memorial Day
observed(year,6,19), // Juneteenth
observed(year,7,4), // Independence Day
nthWeekday(year,9,1,1), // Labor Day
nthWeekday(year,10,1,2), // Columbus Day
observed(year,11,11), // Veterans Day
nthWeekday(year,11,4,4), // Thanksgiving
observed(year,12,25),
observed(year+1,1,1) // Next New Year's observed
];
// Also exclude the Friday after Thanksgiving.
const blackFriday = nthWeekday(year,11,4,4);
blackFriday.setDate(blackFriday.getDate()+1);
dates.push(blackFriday);
return dates.map(dateKey);
}
// Add any extra school-closure dates here.
const EXTRA_CLOSED_DATES = [
// "2026-12-23",
// "2026-12-25"
];
function isPickupDate(d) {
const weekday = d.getDay();
if (weekday !== 3 && weekday !== 5) return false;
const key = dateKey(d);
const blocked = [
...holidaysForYear(d.getFullYear()-1),
...holidaysForYear(d.getFullYear()),
...holidaysForYear(d.getFullYear()+1),
...EXTRA_CLOSED_DATES
];
return !blocked.includes(key);
}
function fillPickupDates() {
const select = $("pickupDate");
select.innerHTML = "";
let today = new Date();
today.setHours(12,0,0,0);
let choices = 0;
// Offer upcoming eligible dates.
for (let i=0;i<90;i++) {
const d = new Date(today);
d.setDate(today.getDate()+i);
if (!isPickupDate(d)) continue;
const option = document.createElement("option");
option.value = dateKey(d);
option.textContent = d.toLocaleDateString("en-US",{
weekday:"long",
month:"long",
day:"numeric",
year:"numeric"
});
select.appendChild(option);
choices++;
}
if (!choices) {
const option = document.createElement("option");
option.textContent = "No pickup dates available";
option.value = "";
select.appendChild(option);
}
}
// PREPARE EMAIL ORDER
$("orderForm").addEventListener("submit", function(e) {
$("error").textContent = "";
const orderItems = items();
if (!orderItems.length) {
e.preventDefault();
$("error").textContent = "Your cart is empty.";
return;
}
const selected = $("pickupDate").value;
const parsed = new Date(selected+"T12:00:00");
const now = new Date();
now.setHours(0,0,0,0);
if (!selected ||
isNaN(parsed.getTime()) ||
parsed < now ||
!isPickupDate(parsed)) {
e.preventDefault();
$("error").textContent =
"Please choose a valid Wednesday or Friday pickup.";
return;
}
const totalQuantity =
orderItems.reduce((sum,p) => sum+p.qty,0);
if (totalQuantity > 60) {
e.preventDefault();
$("error").textContent =
"For orders over 60 drinks, contact us first.";
return;
}
const t = totals();
const id = "PLC-" +
Date.now().toString(36).toUpperCase() +
"-" + Math.random().toString(36).slice(2,8).toUpperCase();
$("orderId").value = id;
$("orderItems").value = orderItems.map(p =>
p.qty + " x " + p.name +
" = " + money(p.qty*p.price)
).join(" | ");
$("orderSubtotal").value = money(t.subtotal);
$("orderTip").value = money(t.tip);
$("orderTotal").value = money(t.total);
});
// INITIALIZE
showProducts();
fillPickupDates();
renderCart();
</script>
</body>
</html>