:root { --primary: #d4af37; --bg: #111; --card-bg: #222; --text: #fff; }
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Helvetica Neue', sans-serif; }
body { background: var(--bg); color: var(--text); overflow-x: hidden; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

header { display: flex; justify-content: space-between; padding: 15px 5%; background: rgba(0,0,0,0.95); position: sticky; top: 0; z-index: 100; align-items: center; transition: 0.3s;}
.logo-area { display: flex; align-items: center; gap: 15px; }
.logo { font-size: 22px; font-weight: bold; color: var(--primary); }
.hamburger { display: none; background: none; border: none; color: white; font-size: 26px; cursor: pointer; }

#mobileMenu { display: flex; gap: 20px; align-items: center; transition: opacity 0.3s;}
#mobileMenu a { color: white; text-decoration: none; transition: 0.3s; }
#mobileMenu a:hover { color: var(--primary); }
.header-right { display: flex; gap: 15px; align-items: center; }

/* Premium My Orders Outline Button */
.my-orders-btn { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 8px 15px; border-radius: 20px; font-weight: bold; cursor: pointer; transition: 0.3s; font-size: 14px; outline: none; white-space:nowrap;}
.my-orders-btn:hover { background: var(--primary); color: #000; }

.header-search { display: none; position: absolute; left: 50%; transform: translateX(-50%); width: 300px; }
.header-search.scrolled { display: flex; }
.header-search input { width: 100%; padding: 8px 35px 8px 15px; border-radius: 20px; border: 1px solid var(--primary); background: #222; color: white; outline:none; }
.search-icon-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border:none; cursor: pointer; color: var(--primary); display: flex; align-items: center; justify-content: center;}

.search-results { position: absolute; top: 100%; left: 0; width: 100%; background: #222; border-radius: 5px; display: none; max-height: 250px; overflow-y: auto; z-index: 1000;}
.search-results div.search-item { padding: 10px; border-bottom: 1px solid #444; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.search-results div.search-item:hover { background: #333; }
.search-results img { width: 45px; height: 45px; object-fit: cover; border-radius: 6px; }
.search-info { display: flex; flex-direction: column; }
.search-info .s-title { font-weight: bold; font-size: 14px; color: #fff; }
.search-info .s-price { font-size: 13px; color: var(--primary); margin-top: 3px; }

.cart-icon-wrapper { position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 35px; height: 35px;}
.cart-icon-wrapper svg { fill: var(--primary); width: 28px; height: 28px; transition: 0.3s; }
.cart-icon-wrapper:hover svg { fill: #b5952f; transform: scale(1.05); }
.cart-badge { position: absolute; top: -2px; right: -5px; background: red; color: white; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; font-weight: bold; display: none; justify-content: center; align-items: center; box-shadow: 0 0 5px rgba(0,0,0,0.5); }

@media (max-width: 768px) {
    header { flex-wrap: wrap; }
    .hamburger { display: block; }
    .logo-area { order: 1; flex: 1; }
    .header-right { order: 2; }
    
    .header-search { order: 3; position: relative; left: 0; transform: none; width: 100%; margin-top: 15px; display: none; }
    .header-search.scrolled { display: flex; transform: none; }
    #mobileMenu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: #111; flex-direction: column; padding: 20px; align-items: flex-start; border-bottom: 1px solid #333;}
    #mobileMenu.active { display: flex; }
}

.hero { position: relative; height: 60vh; overflow: hidden; }
.slide { position: absolute; top:0; left:0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s; display: flex; align-items: center; justify-content: center; }
.slide::after { content: ''; position: absolute; top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.6); }
.slide h1 { position: relative; z-index: 2; font-size: 3rem; color: var(--primary); text-align: center; }
.slide.active { opacity: 1; }

.menu-section { padding: 40px 5%; }
.category-heading { font-size: 2rem; color: var(--primary); margin: 30px 0 15px; border-bottom: 1px solid #333; padding-bottom: 5px; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; } 
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } } 
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } } 

/* Fixed Product Card to keep Add To Cart button always at bottom */
.product-card { background: var(--card-bg); border-radius: 12px; overflow: hidden; padding-bottom: 15px; text-align: center; position: relative; display: flex; flex-direction: column; height: 100%;}
.product-card img { width: 100%; height: 180px; object-fit: cover; }
.product-card h3 { margin: 10px 0; font-size: 1.1rem;}
.product-desc { font-size: 0.85rem; color: #aaa; padding: 0 10px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 32px; }

/* Pricing Layout - Updated to side-by-side with White Text */
.price-row { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 10px; }
.price { font-size: 18px; color: #ffffff; font-weight: bold;}
.discount { text-decoration: line-through; color: #aaaaaa; font-size: 15px; }
.perc-badge { position: absolute; top:10px; right:10px; background: red; color: white; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: bold;}

.add-btn { background: var(--primary); border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; font-weight: bold; margin-top: auto; margin-left:15px; margin-right:15px; transition: 0.3s;}
.add-btn:hover { background: #b5952f; }

/* Dynamic Button Processing State */
.btn-loading { opacity: 0.6; pointer-events: none; position: relative; }

@media (max-width: 600px) {
    .product-card img { height: 110px; }
    .product-card h3 { font-size: 0.8rem; margin: 6px 0 2px; }
    .product-desc { font-size: 0.65rem; margin: 0 6px 4px; line-height: 1.2; height: 24px; }
    .price { font-size: 14px; }
    .discount { font-size: 12px; }
    .add-btn { padding: 5px 10px; font-size: 11px; margin-left: 10px; margin-right: 10px;}
}

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { background: var(--bg); padding: 30px; border-radius: 12px; width: 90%; max-width: 500px; border: 1px solid var(--primary); max-height: 90vh; overflow-y:auto;}
.modal-content input, .modal-content select, .modal-content textarea { width: 100%; padding: 12px; margin: 10px 0; border-radius: 5px; border: 1px solid #333; background: #222; color: white; outline:none;}
.checkout-btn { width: 100%; padding: 15px; background: var(--primary); color: #000; border: none; border-radius: 5px; font-size: 18px; font-weight: bold; cursor: pointer; transition:0.3s;}
.checkout-btn:hover { opacity: 0.8; }

.cart-summary { background: #1a1a1a; padding: 15px; border-radius: 8px; border: 1px solid #333; margin-bottom: 15px; }

.order-toggle { display: flex; background: #111; border: 1px solid var(--primary); border-radius: 8px; overflow: hidden; margin: 15px 0; }
.order-toggle input { display: none; }
.order-toggle label { flex: 1; text-align: center; padding: 12px; color: #aaa; font-weight: bold; cursor: pointer; transition: 0.3s; }
.order-toggle input:checked + label { background: var(--primary); color: #000; }

.history-item { background: #1a1a1a; padding: 12px; border-radius: 8px; border-left: 4px solid #555; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.history-item.active { border-left-color: var(--primary); }
.history-info .h-num { font-weight: bold; color: var(--primary); font-size: 1.1rem;}
.history-info .h-date { font-size: 0.8rem; color: #888; }
.history-total { font-weight: bold; font-size: 1rem; }

footer { background: #0a0a0a; border-top: 1px solid var(--primary); padding: 20px 5%; text-align: center; }

/* Real-time pulse animation for UI */
.status-pulse { position: absolute; top:-50px; left:50%; transform:translateX(-50%); width: 200px; height: 200px; border-radius: 50%; opacity: 0.1; z-index:-1; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: translateX(-50%) scale(0.8); opacity: 0.2; } 100% { transform: translateX(-50%) scale(1.5); opacity: 0; } }