Understanding the turkey dress code before your trip helps you pack appropriately and show respect for local customs. Last updated: May 4, 2026
Quick Answer: Turkey has no nationwide legal dress code for tourists. You can wear Western-style clothing freely in most cities and coastal resorts. The only strict dress requirements apply at mosques and religious sites, where both men and women must cover shoulders and knees, and women must cover their hair [7]. Beyond that, dressing modestly in inland and conservative areas simply earns you more comfort and fewer stares.
Key Takeaways
- No legal clothing restrictions exist for tourists anywhere in Turkey — it’s about cultural respect, not law [7]
- Mosques require covered shoulders, knees, and hair (for women); shoes off in prayer areas [2]
- Coastal resorts (Bodrum, Antalya, Fethiye) are as relaxed as any Mediterranean beach town
- Inland areas (Cappadocia, eastern Turkey) benefit from more conservative choices
- Istanbul is a fashion capital — you’ll see everything from designer heels to headscarves on the same street
- Layering is your best strategy because you might visit a mosque, a bazaar, and a rooftop bar in a single day
- Leggings alone don’t count as appropriate mosque attire, even under a long tunic [6]
- Many large mosques provide loaner scarves and wraps at the entrance, but bringing your own is a pro move
- Summer temperatures regularly hit 35-40°C in southern regions — breathable fabrics aren’t optional, they’re survival
- Pack versatile pieces that transition between settings to keep your luggage light
Why Does Turkey Dress Code Actually Matter?
Here’s what nobody tells you about getting dressed for Turkey: it’s less about rules and more about range. Turkey stretches across two continents, multiple climate zones, and a cultural spectrum that runs from ultra-modern Istanbul nightclubs to 600-year-old mosques where the dress code hasn’t changed since the Ottoman era.
The reason your clothing choices matter isn’t because someone will arrest you (they won’t). It’s because the right outfit means you’ll feel comfortable — physically in the heat, socially in conservative towns, and practically when you’re climbing ancient ruins in Cappadocia at 7 AM and sipping cocktails in Bodrum by sunset.
Turkish people themselves dress incredibly diversely. Walk down Istanbul’s Istiklal Avenue and you’ll pass women in full hijab, teenagers in crop tops, businessmen in tailored suits, and grandmothers in floral şalvar (traditional baggy trousers) — all within the same block [4]. Turkey’s secular constitution means personal dress is exactly that: personal.
The cultural context: Turkey’s relationship with clothing is tied to its identity as a bridge between East and West. Showing respect through modest dress at religious sites isn’t just etiquette — it acknowledges centuries of sacred tradition. Meanwhile, at beach resorts, overdressing would actually seem more out of place than a bikini.

What Should Women Wear in Turkey? (The Honest Answer)
Direct answer: Women can wear virtually anything in Turkey’s major cities and coastal areas. For inland travel and religious sites, aim to cover shoulders and knees with loose-fitting clothing [2].
Here’s the magic of packing for Turkey as a woman: a few versatile pieces handle every situation you’ll encounter.
Everyday City Wear (Istanbul, Izmir, Ankara)
- Midi or maxi dresses — the single best item for Turkey (modest enough for mosques with a scarf added, stylish enough for restaurants)
- Wide-leg linen trousers with a t-shirt or blouse
- Jeans — absolutely fine year-round in cities
- Knee-length shorts — acceptable in tourist areas, though less common in conservative neighborhoods
What to Avoid (Context-Dependent)
Overly revealing outfits like very short shorts or tube tops aren’t illegal anywhere, but they may attract unwanted attention in conservative areas [4]. In tourist-heavy coastal zones? Wear whatever you’d wear to a Mediterranean beach in Greece or Spain.
Common mistake: Assuming all of Turkey requires conservative dress. Istanbul’s Karaköy neighborhood is as fashion-forward as Milan. Trust us on this — you won’t feel overdressed in your favorite sundress there.
What Is the Dress Code for Mosques in Turkey?
Direct answer: All visitors to active mosques must cover shoulders and knees. Women must also cover their hair. Shoes must be removed before entering carpeted prayer areas. This applies universally regardless of gender, nationality, or religion [1][2].
This is the one area where Turkey’s dress expectations are non-negotiable. Here’s your complete checklist:
Women’s Mosque Requirements
| Item | Required? | Notes |
|---|---|---|
| Head covering (scarf) | Yes | Must cover all hair |
| Shoulders covered | Yes | No sleeveless tops |
| Knees covered | Yes | Skirt/pants below knee |
| Loose-fitting clothes | Yes | No tight leggings [6] |
| Shoes removed | Yes | Carry a bag for them |
Men’s Mosque Requirements
| Item | Required? | Notes |
|---|---|---|
| Knees covered | Yes | No shorts above knee |
| Shoulders covered | Yes | No tank tops/sleeveless [1] |
| Shoes removed | Yes | Carry a bag for them |
Steal this tip: Major mosques like the Blue Mosque and Hagia Sophia provide free loaner scarves and skirts at the entrance. But here’s the thing — they’re often synthetic, shared among hundreds of daily visitors, and not always the freshest. Tucking a lightweight cotton scarf in your bag (doubles as a beach cover-up, airplane blanket, and picnic cloth) is a total game-changer.
Edge case: Some smaller neighborhood mosques may not have loaners available. If you’re exploring Turkey’s top religious sites beyond the tourist circuit, always carry your own coverage.
For more detailed guidance, check our complete guide to the do’s and don’ts when visiting religious sites in Turkey.
What to Wear in Turkey by Season: A Climate-Based Dress Code Guide
Turkey’s climate varies wildly by region and season. Here’s what to pack based on when you’re visiting.
Summer (June–August): Hot, Sometimes Brutal
Temperatures in southern and central Turkey regularly exceed 35°C. The Aegean and Mediterranean coasts add humidity to the mix.
- Fabrics: Linen, cotton, moisture-wicking blends (avoid polyester — you’ll melt)
- Women: Loose maxi dresses, wide-leg crops, breathable blouses, swimwear for coastal areas
- Men: Linen shorts (knee-length works everywhere except mosques), cotton shirts, breathable polos
- Everyone: Sunhat, quality sunglasses, comfortable walking sandals with ankle support
- Pro move: A lightweight long-sleeve shirt for sun protection that doubles as mosque coverage
Spring & Autumn (March–May, September–November)
The sweet spot for Turkey travel. Mild days, cool evenings, and the best shoulder-season crowds.
- Layering is everything — mornings in Cappadocia can be 8°C, afternoons hit 22°C
- A light jacket or cardigan for evening
- Closed-toe comfortable shoes for cobblestones and ruins
- A versatile scarf (seriously, this item earns its luggage space ten times over)
Check our best time to visit Turkey month-by-month guide for detailed climate data.
Winter (December–February)
Eastern Turkey gets genuine snow. Istanbul gets cold rain. The Mediterranean coast stays mild.
- Istanbul/Ankara: Warm coat, waterproof boots, layers, umbrella
- Eastern Turkey: Serious winter gear — think down jackets, thermal layers, wool
- Mediterranean coast: Light jacket, long pants, closed shoes — still pleasant for sightseeing
- Cappadocia: Cold but magical — warm layers plus a photogenic coat for those snowy fairy chimney shots
For winter destination inspiration, we’ve got you covered.
How Do Regional Dress Variations Work Across Turkey?

Direct answer: Coastal western Turkey is as liberal as southern Europe. Central Anatolia and eastern regions are more conservative. Istanbul exists in its own category as a cosmopolitan fashion hub [7].
Istanbul: Anything Goes (Almost)
Istanbul fashion is genuinely world-class. The city hosted Fashion Week, has a thriving designer scene, and locals dress with serious style. You’ll fit in wearing:
- Smart casual for restaurants and nightlife
- Trendy streetwear in neighborhoods like Karaköy, Kadıköy, and Beyoğlu
- More conservative choices in the Fatih district (the old city’s more traditional neighborhoods)
Aegean & Mediterranean Coast (Bodrum, Antalya, Fethiye)
Think Mediterranean resort wear:
- Swimwear at beaches and pools (bikinis are completely normal at resort beaches)
- Cover-ups for walking to/from the beach
- Casual sundresses and shorts for town
- Slightly more covered for evening dining at nicer restaurants
If you’re heading to Fethiye for adventure sports, pack athletic wear that’s comfortable and quick-drying.
Central Anatolia (Cappadocia, Konya, Ankara)
More conservative than the coast, but still relaxed by global standards:
- Cover shoulders and knees as a default (not required, but you’ll blend in better)
- Konya (home of the Whirling Dervishes) is notably more religious — modest dress shows respect
- Cappadocia is tourist-friendly but surrounded by traditional villages
Eastern Turkey & Black Sea Region
The most conservative regions:
- Women benefit from longer sleeves and pants/skirts below the knee
- Men should avoid sleeveless shirts [4]
- This isn’t about restriction — it’s about comfortable interactions with locals who will be incredibly warm and welcoming when you show cultural awareness
Explore the unmissable spots in the Black Sea Region with confidence.
What Should Business Travelers Wear in Turkey?
Direct answer: Turkish business culture leans formal. Suits for men, professional attire for women, and polished shoes are expected in corporate settings.
- Men: Dark suit, tie (unless told otherwise), polished leather shoes
- Women: Tailored trousers or knee-length skirt with a blouse, closed-toe heels or flats
- Summer exception: Some industries allow business casual in peak heat — follow your host’s lead
- Pro move: Turkish business culture values appearance as a sign of respect. Being slightly overdressed is always better than underdressed
Budget-Friendly Packing Strategies for Turkey
You don’t need a new wardrobe. Here’s the secret sauce for packing smart:
The Capsule Approach (10 items, 2 weeks of outfits):
- 2 pairs of bottoms (one pants, one skirt or shorts)
- 3 tops (mix of sleeveless and sleeved)
- 1 maxi dress or midi dress
- 1 lightweight cardigan or long-sleeve layer
- 1 scarf (large enough for mosque visits)
- 1 swimsuit
- 1 pair of walking shoes + 1 pair of sandals
Budget tips:
- Turkey has excellent, affordable shopping — Istanbul’s bazaars and malls sell quality basics cheaply
- Buy a Turkish cotton scarf locally (around 30-50 TL) rather than packing one from home — it’s a beautiful souvenir too
- Quick-dry fabrics mean less packing since you can wash and wear overnight
Sustainable and Ethical Clothing Considerations
For travelers who care about their environmental footprint (and we love that about you):
- Choose natural fibers — Turkish-grown organic cotton and linen breathe better in the heat AND biodegrade
- Buy local — Turkey is a major textile producer. Purchasing Turkish-made clothing supports local economies and reduces transport emissions
- Pack what you already own — the most sustainable garment is one you don’t buy
- Consider secondhand — Istanbul has a growing vintage scene, particularly in Kadıköy
For more on sustainable travel in Turkey, we’ve written a complete guide.
Specific Recommendations for LGBTQ+ Travelers
Direct answer: Turkey’s legal framework doesn’t criminalize LGBTQ+ identities, but social attitudes vary dramatically by region. Clothing choices can affect comfort levels.
- Istanbul’s Beyoğlu/Taksim area is the most LGBTQ+-friendly zone — dress as expressively as you like
- Coastal resorts are generally tolerant and international in outlook
- Conservative inland areas — gender-nonconforming clothing may attract attention; assess comfort levels individually
- Practical tip: Matching your visible presentation to the local norm isn’t about hiding — it’s about choosing your battles and prioritizing safety
- Same-sex couples: Public displays of affection draw attention regardless of clothing, particularly outside major cities
Our solo female travel safety guide covers related safety considerations in depth.
Adaptive Clothing for Travelers with Disabilities
Turkey’s terrain (cobblestones, mosque thresholds, uneven ruins) creates specific clothing considerations:
- Wheelchair users: Longer skirts or pants prevent fabric catching in wheels; a lap blanket can double as mosque coverage
- Sensory sensitivities: Turkey’s heat makes lightweight, tagless, seamless clothing essential
- Limited mobility: Slip-on shoes are practical for the constant shoe removal at mosques (and many Turkish homes)
- Compression garments: Completely normal and unremarkable in Turkey — no need to worry about appearance
Photography and Social Media Etiquette: What Your Outfit Signals
Fair warning — Turkey is ridiculously photogenic, and you’ll want to document everything. But here’s what nobody tells you about the intersection of clothing and photography etiquette:
- At mosques: Photographing people praying is disrespectful regardless of what you’re wearing. Dress appropriately, shoot architecture, and ask permission for portraits.
- In conservative areas: Being visibly “tourist” (camera out, different clothing) already draws attention. Modest dress reduces the overall attention load.
- For content creators: Outfit changes at religious sites for social media content is noticed and frowned upon. Respect the space.
- Hot tip: Your mosque-appropriate outfit (flowy dress + colorful scarf) actually photographs beautifully against Ottoman architecture. Function meets aesthetics — chef’s kiss.
FAQ: Turkey Dress Code Guide
Are there clothing restrictions for tourists in Turkey? No legal clothing restrictions exist for tourists anywhere in Turkey. The only enforced dress codes apply at active mosques and some religious sites, where both men and women must cover shoulders and knees, and women must cover their hair [7].
How do Turkish people typically dress? Extremely diversely. In Istanbul and coastal cities, you’ll see modern European fashion alongside traditional modest dress. Younger Turks in cities follow global fashion trends. In rural and eastern areas, dress tends to be more conservative [4].
What should women wear in Turkey? For general sightseeing: loose-fitting clothing covering shoulders and knees works everywhere. Maxi dresses, wide-leg trousers, and light blouses are ideal. At beaches and resorts, swimwear and casual summer clothing are completely normal [2].
Do I need to wear a headscarf in Turkey? Only inside active mosques. Headscarves are not required anywhere else in Turkey — not on streets, in restaurants, at shops, or at historical sites that aren’t active places of worship [4].
Can I wear shorts in Turkey? Yes, in most tourist areas and all coastal regions. Knee-length shorts are fine for men almost everywhere except mosques. Women wearing shorts is common in tourist areas but may draw attention in conservative inland towns [7].
What about swimwear at Turkish beaches? Bikinis and standard swimwear are completely normal at resort beaches, hotel pools, and tourist beaches. Some beaches near conservative towns may have separate family/women’s sections where more modest swimwear is appreciated.
Are leggings appropriate in Turkey? For everyday wear in cities, yes. However, leggings do not meet mosque dress code requirements even when worn under a long tunic [6]. Pair them with a knee-length top for general modesty in conservative areas.
What shoes should I pack for Turkey? Comfortable walking shoes with good grip (cobblestones are everywhere), sandals for beaches and warm days, and slip-on shoes for easy removal at mosques. Avoid brand-new shoes — break them in before your trip.
Is there a dress code for Turkish hammams (bath houses)? Traditional hammams provide a peştemal (thin cotton wrap). You’ll undress to underwear (or go nude in single-sex sections) and wrap in the provided cloth. Bring flip-flops for wet floors.
What should I wear to Turkish restaurants? Smart casual works for most restaurants. Upscale Istanbul restaurants may expect more formal attire (no shorts or flip-flops). Coastal restaurants are casual — clean and neat is sufficient.
Conclusion: Your Turkey Dress Code Guide in Action
Consider this your sign to stop overthinking your Turkey wardrobe. The core principle is beautifully simple: pack versatile, breathable layers that can dress up or down, keep a scarf handy for mosques, and match your modesty level to the region you’re in.
Your actionable next steps:
- Check your travel dates against our seasonal guide above and pack accordingly
- Map your itinerary — note which stops are coastal (relaxed) vs. inland (slightly more conservative)
- Invest in one quality scarf — it’ll serve you at mosques, on chilly evenings, as a beach cover-up, and as a gorgeous souvenir
- Download a packing checklist based on the capsule wardrobe above
- Relax — Turkish hospitality is no joke, and locals genuinely appreciate visitors who show cultural awareness through their clothing choices, even imperfectly
Future you will thank us: the traveler who packs thoughtfully spends less time worrying about what they’re wearing and more time falling in love with Turkey. And trust us on this — prepare to be obsessed.
References
[1] What To Wear In Istanbul Outfit Ideas For Every Season Sightseeing Spot – https://www.azafashions.com/blog/what-to-wear-in-istanbul-outfit-ideas-for-every-season-sightseeing-spot/
[2] The Ultimate Guide To What To Wear In Turkey In 2026 – https://cellesim.com/en/blog/the-ultimate-guide-to-what-to-wear-in-turkey-in-2026
[4] Dressing In Turkey – https://www.arkadaslik-yachting.com/archives/dressing-in-turkey.html
[6] How To Dress In Turkey – https://theartoflivinginturkey.com/how-to-dress-in-turkey/
[7] What To Wear In Turkey Packing List – https://www.chasingthedonkey.com/what-to-wear-in-turkey-packing-list/
.cg-element-container { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 700px; margin: 2rem auto; padding: 1.5rem; background: #fefefe; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid #e8e8e8; } .cg-element-title { font-size: 1.4rem; font-weight: 700; color: #1a3a4a; margin-bottom: 0.5rem; text-align: center; } .cg-element-subtitle { font-size: 0.9rem; color: #666; text-align: center; margin-bottom: 1.5rem; } .cg-element-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; justify-content: center; } .cg-element-filter-btn { padding: 0.5rem 1rem; border: 2px solid #2196F3; background: white; color: #2196F3; border-radius: 25px; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: all 0.2s ease; } .cg-element-filter-btn:hover { background: #e3f2fd; } .cg-element-filter-btn.cg-active { background: #2196F3; color: white; } .cg-element-checklist { list-style: none; padding: 0; margin: 0; } .cg-element-item { display: flex; align-items: center; padding: 0.75rem 1rem; margin-bottom: 0.5rem; background: #f8f9fa; border-radius: 8px; transition: all 0.2s ease; cursor: pointer; } .cg-element-item:hover { background: #e8f4fd; } .cg-element-item.cg-checked { background: #e8f5e9; text-decoration: line-through; color: #666; } .cg-element-checkbox { width: 20px; height: 20px; margin-right: 12px; accent-color: #4CAF50; cursor: pointer; } .cg-element-item-text { flex: 1; font-size: 0.95rem; } .cg-element-tag { font-size: 0.7rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; margin-left: 8px; } .cg-tag-essential { background: #ffebee; color: #c62828; } .cg-tag-mosque { background: #e8eaf6; color: #283593; } .cg-tag-beach { background: #e0f7fa; color: #00695c; } .cg-tag-winter { background: #ede7f6; color: #4527a0; } .cg-element-progress { margin-top: 1.5rem; text-align: center; } .cg-element-progress-bar { width: 100%; height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden; margin-bottom: 0.5rem; } .cg-element-progress-fill { height: 100%; background: linear-gradient(90deg, #4CAF50, #81C784); border-radius: 4px; transition: width 0.3s ease; width: 0%; } .cg-element-progress-text { font-size: 0.85rem; color: #666; } .cg-element-hidden { display: none; } @media (max-width: 500px) { .cg-element-container { margin: 1rem; padding: 1rem; } .cg-element-filter-btn { font-size: 0.75rem; padding: 0.4rem 0.8rem; } }
Turkey Packing Checklist
Filter by trip type, then check off items as you pack
<code> <div class="cg-element-filters">
<button class="cg-element-filter-btn cg-active" data-filter="all">All Items</button>
<button class="cg-element-filter-btn" data-filter="essential">Essentials</button>
<button class="cg-element-filter-btn" data-filter="mosque">Mosque Visits</button>
<button class="cg-element-filter-btn" data-filter="beach">Beach/Coast</button>
<button class="cg-element-filter-btn" data-filter="winter">Winter Trip</button>
</div>
<ul class="cg-element-checklist" id="cg-checklist">
<li class="cg-element-item" data-categories="essential,mosque,beach,winter">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Lightweight scarf (large enough for head + shoulders)</span>
<span class="cg-element-tag cg-tag-essential">Essential</span>
</li>
<li class="cg-element-item" data-categories="essential,mosque,beach">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Maxi dress or midi skirt (covers knees)</span>
<span class="cg-element-tag cg-tag-essential">Essential</span>
</li>
<li class="cg-element-item" data-categories="essential,winter">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Comfortable walking shoes (broken in!)</span>
<span class="cg-element-tag cg-tag-essential">Essential</span>
</li>
<li class="cg-element-item" data-categories="essential,mosque">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Loose trousers or wide-leg pants</span>
<span class="cg-element-tag cg-tag-essential">Essential</span>
</li>
<li class="cg-element-item" data-categories="essential">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Light cardigan or long-sleeve layer</span>
<span class="cg-element-tag cg-tag-essential">Essential</span>
</li>
<li class="cg-element-item" data-categories="mosque">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Slip-on shoes (easy mosque removal)</span>
<span class="cg-element-tag cg-tag-mosque">Mosque</span>
</li>
<li class="cg-element-item" data-categories="mosque">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Top with sleeves (covers shoulders)</span>
<span class="cg-element-tag cg-tag-mosque">Mosque</span>
</li>
<li class="cg-element-item" data-categories="mosque">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Small bag for carrying shoes inside</span>
<span class="cg-element-tag cg-tag-mosque">Mosque</span>
</li>
<li class="cg-element-item" data-categories="beach">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Swimsuit</span>
<span class="cg-element-tag cg-tag-beach">Beach</span>
</li>
<li class="cg-element-item" data-categories="beach">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Beach cover-up or sarong</span>
<span class="cg-element-tag cg-tag-beach">Beach</span>
</li>
<li class="cg-element-item" data-categories="beach">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Sandals with ankle support</span>
<span class="cg-element-tag cg-tag-beach">Beach</span>
</li>
<li class="cg-element-item" data-categories="beach">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Sun hat and quality sunglasses</span>
<span class="cg-element-tag cg-tag-beach">Beach</span>
</li>
<li class="cg-element-item" data-categories="beach">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Linen shorts (knee-length)</span>
<span class="cg-element-tag cg-tag-beach">Beach</span>
</li>
<li class="cg-element-item" data-categories="winter">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Warm waterproof coat</span>
<span class="cg-element-tag cg-tag-winter">Winter</span>
</li>
<li class="cg-element-item" data-categories="winter">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Thermal base layers</span>
<span class="cg-element-tag cg-tag-winter">Winter</span>
</li>
<li class="cg-element-item" data-categories="winter">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Waterproof boots</span>
<span class="cg-element-tag cg-tag-winter">Winter</span>
</li>
<li class="cg-element-item" data-categories="winter">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Wool scarf, gloves, and hat</span>
<span class="cg-element-tag cg-tag-winter">Winter</span>
</li>
<li class="cg-element-item" data-categories="winter">
<input type="checkbox" class="cg-element-checkbox">
<span class="cg-element-item-text">Umbrella (compact, windproof)</span>
<span class="cg-element-tag cg-tag-winter">Winter</span>
</li>
</ul>
<div class="cg-element-progress">
<div class="cg-element-progress-bar">
<div class="cg-element-progress-fill" id="cg-progress-fill"></div>
</div>
<span class="cg-element-progress-text" id="cg-progress-text">0 of 18 items packed</span>
</div>
</div>
<script>
(function() {
const filterBtns = document.querySelectorAll('.cg-element-filter-btn');
const items = document.querySelectorAll('.cg-element-item');
const progressFill = document.getElementById('cg-progress-fill');
const progressText = document.getElementById('cg-progress-text');
filterBtns.forEach(btn => {
btn.addEventListener('click', function() {
filterBtns.forEach(b => b.classList.remove('cg-active'));
this.classList.add('cg-active');
const filter = this.dataset.filter;
items.forEach(item => {
if (filter === 'all') {
item.classList.remove('cg-element-hidden');
} else {
const categories = item.dataset.categories.split(',');
if (categories.includes(filter)) {
item.classList.remove('cg-element-hidden');
} else {
item.classList.add('cg-element-hidden');
}
}
});
updateProgress();
});
});
items.forEach(item => {
const checkbox = item.querySelector('.cg-element-checkbox');
item.addEventListener('click', function(e) {
if (e.target !== checkbox) {
checkbox.checked = !checkbox.checked;
}
item.classList.toggle('cg-checked', checkbox.checked);
updateProgress();
});
});
function updateProgress() {
const visibleItems = document.querySelectorAll('.cg-element-item:not(.cg-element-hidden)');
const checkedVisible = document.querySelectorAll('.cg-element-item:not(.cg-element-hidden).cg-checked');
const total = visibleItems.length;
const checked = checkedVisible.length;
const percent = total > 0 ? (checked / total) * 100 : 0;
progressFill.style.width = percent + '%';
progressText.textContent = checked + ' of ' + total + ' items packed';
}
})();
</script>
</code>
