New Drop
OVERSIZED BULL
HOODIE — SS'25
HOODIE — SS'25
₹ 1,299
₹ 1,699
-23%
Trending
STREET CARGO
CO-ORD SET
CO-ORD SET
₹ 1,899
ALL STYLES — 12 ITEMS
View Full Collection
₹' + p.oldPrice + '-' + pct + '%';
}
var colorsHtml = p.colors.map(function(c, i) {
return '';
}).join('');
var dl = delays[idx % 8];
return '
' +
'' +
'';
body.appendChild(div);
});
}
function openCart() {
document.getElementById('cartPanel').classList.add('open');
document.getElementById('overlay').classList.add('show');
document.body.style.overflow = 'hidden';
}
function closeCart() {
document.getElementById('cartPanel').classList.remove('open');
document.getElementById('overlay').classList.remove('show');
document.body.style.overflow = '';
}
/* ── WISHLIST ── */
function toggleWish(e, btn) {
e.stopPropagation();
var liked = btn.classList.toggle('liked');
btn.innerHTML = liked ? '♥' : '♡';
showToast(liked ? 'Added to wishlist!' : 'Removed from wishlist');
}
/* ── TOAST ── */
var toastTimer;
function showToast(msg) {
var t = document.getElementById('toast');
t.textContent = msg; t.classList.add('show');
clearTimeout(toastTimer);
toastTimer = setTimeout(function(){ t.classList.remove('show'); }, 2600);
}
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') { closeSizeModalDirect(); closeCart(); }
});
' +
'
';
}
function renderGrid(list, gridId) {
var el = document.getElementById(gridId);
if (!el) return;
if (!list.length) {
el.innerHTML = '' +
'
' +
'' + badgeLabel[p.badge] + '' +
'' +
'' +
'
' +
'' +
'
' +
'' + p.cat + '
' +
'' + p.name + '
' +
'₹ ' + p.price + '' + offHtml + '
' +
'' + colorsHtml + '
' +
'No styles found for this category.
';
return;
}
el.innerHTML = list.map(function(p, i) { return buildCard(p, i); }).join('');
/* re-observe new cards */
el.querySelectorAll('.fu').forEach(function(el) { io.observe(el); });
}
/* Scroll reveal */
var io = new IntersectionObserver(function(entries) {
entries.forEach(function(e) {
if (e.isIntersecting) { e.target.classList.add('vis'); io.unobserve(e.target); }
});
}, { threshold: 0.07, rootMargin: '0px 0px -20px 0px' });
renderGrid(products, 'productsGrid');
renderGrid(products2, 'productsGrid2');
/* ── FILTER & SORT ── */
var currentCat = 'all';
var currentSort = 'default';
function applyFilter() {
var list = currentCat === 'all' ? products.slice() : products.filter(function(p) { return p.cat === currentCat; });
if (currentSort === 'priceasc') list.sort(function(a,b){ return a.price - b.price; });
if (currentSort === 'pricedesc') list.sort(function(a,b){ return b.price - a.price; });
if (currentSort === 'newest') list.sort(function(a,b){ return b.id - a.id; });
renderGrid(list, 'productsGrid');
var label = (currentCat === 'all' ? 'ALL STYLES' : currentCat.toUpperCase()) + ' — ' + list.length + ' ITEMS';
document.getElementById('gridLabel').innerHTML = label;
}
function filterBy(btn, cat) {
currentCat = cat;
document.querySelectorAll('.ftab').forEach(function(b) { b.classList.remove('active'); });
btn.classList.add('active');
applyFilter();
}
function filterByKey(cat) {
var tabs = document.querySelectorAll('.ftab');
tabs.forEach(function(b) {
if (b.textContent.trim().toLowerCase() === cat.toLowerCase()) { filterBy(b, cat); }
});
document.getElementById('productsGrid').scrollIntoView({behavior:'smooth'});
}
function sortProducts(val) { currentSort = val; applyFilter(); }
/* ── SIZE MODAL ── */
var modalProduct = null;
var selectedSize = null;
function findProduct(id) {
var all = products.concat(products2).concat(edProducts);
for (var i = 0; i < all.length; i++) { if (all[i].id === id) return all[i]; }
return null;
}
function openSizeModal(edIdx, e) { if (e) e.stopPropagation(); showModal(edProducts[edIdx]); }
function openSizeModal_byId(id, e) { if (e) e.stopPropagation(); var p = findProduct(id); if (p) showModal(p); }
function showModal(p) {
modalProduct = p; selectedSize = null;
document.getElementById('modalImg').src = p.img;
document.getElementById('modalName').textContent = p.name;
document.getElementById('modalPrice').innerHTML = '₹ ' + p.price;
var grid = document.getElementById('sizeGrid');
grid.innerHTML = p.sizes.map(function(s) {
var isOos = p.oos.indexOf(s) >= 0;
return '';
}).join('');
document.getElementById('sizeModal').classList.add('show');
document.body.style.overflow = 'hidden';
}
function selectSize(btn, size) {
document.querySelectorAll('.size-btn').forEach(function(b) { b.classList.remove('sel'); });
btn.classList.add('sel');
selectedSize = size;
}
function closeSizeModal(e) { if (e && e.target !== document.getElementById('sizeModal')) return; closeSizeModalDirect(); }
function closeSizeModalDirect() {
document.getElementById('sizeModal').classList.remove('show');
if (!document.getElementById('cartPanel').classList.contains('open')) { document.body.style.overflow = ''; }
}
function confirmAddToCart() {
if (!selectedSize) { showToast('Please select a size first!'); return; }
addToCart(modalProduct, selectedSize);
closeSizeModalDirect();
}
/* ── CART ── */
var cart = [];
function addToCart(p, size) {
var key = p.id + '_' + size;
var ex = null;
for (var i = 0; i < cart.length; i++) { if (cart[i].key === key) { ex = cart[i]; break; } }
if (ex) { ex.qty += 1; } else { cart.push({ key:key, id:p.id, name:p.name, price:p.price, img:p.img, size:size, qty:1 }); }
renderCart(); openCart(); showToast(p.name + ' (Size ' + size + ') added!');
}
function removeFromCart(key) {
cart = cart.filter(function(i) { return i.key !== key; });
renderCart();
if (!cart.length) { document.getElementById('cartFooter').style.display = 'none'; }
}
function changeQty(key, delta) {
for (var i = 0; i < cart.length; i++) {
if (cart[i].key === key) {
cart[i].qty += delta;
if (cart[i].qty <= 0) { removeFromCart(key); return; }
}
}
renderCart();
}
function renderCart() {
var body = document.getElementById('cartBody');
var empty = document.getElementById('cartEmpty');
var footer = document.getElementById('cartFooter');
var meta = document.getElementById('cartMeta');
var hint = document.getElementById('cartHint');
var totalQty = cart.reduce(function(s,i){ return s+i.qty; }, 0);
var totalPrice = cart.reduce(function(s,i){ return s+(i.price*i.qty); }, 0);
meta.textContent = totalQty + (totalQty === 1 ? ' item' : ' items');
body.querySelectorAll('.cart-item').forEach(function(el){ el.remove(); });
if (!cart.length) { empty.style.display='flex'; footer.style.display='none'; body.appendChild(empty); return; }
empty.style.display = 'none'; footer.style.display = 'block';
document.getElementById('cartTotal').innerHTML = '₹ ' + totalPrice.toLocaleString('en-IN');
var free = 999;
hint.innerHTML = totalPrice >= free ? 'You get FREE shipping on this order!' : 'Add ₹ ' + (free - totalPrice) + ' more for FREE shipping';
cart.forEach(function(item) {
var div = document.createElement('div');
div.className = 'cart-item';
div.innerHTML =
'' + item.name + '
Size: ' + item.size + '
' +
'₹ ' + (item.price * item.qty).toLocaleString('en-IN') + '' +
'
' +
'' + item.qty + '' +
'