/* =========================================
   1. GLOBAL RESET & LAYOUT FIXES
   ========================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    
    /* FIXED: Removed "!important" so Tracker page can control its own layout */
    min-height: 100vh; 
    overflow-x: hidden;
    
    /* BACKGROUND IMAGE SETUP */
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)), url('banner.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: #050505;
    
    color: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    /* Adjusted padding so content starts below the banner + header */
    padding-top: 140px; 
    padding-bottom: 90px; 
}

h1, h2, h3, h4 { margin: 0; font-weight: normal; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* =========================================
   2. ANNOUNCEMENT BANNER (MISSING IN YOUR CODE - ADDED BACK)
   ========================================= */
.announcement-bar {
    background: #C5A059; /* Gold Background */
    color: #000000;      /* Black Text */
    border-bottom: 1px solid #000;
    
    height: 48px; 
    width: 100%;
    position: fixed; /* STAYS STICKY */
    top: 0;
    left: 0;
    z-index: 2000; /* Highest Priority */
    
    display: none; /* JS turns this to flex */
    justify-content: center;
    align-items: center;
    
    font-family: 'Playfair Display', serif; 
    font-size: 0.9rem; 
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

/* =========================================
   3. PREMIUM HEADER
   ========================================= */
header {
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    
    /* FIXED: Changed to ABSOLUTE so it scrolls away on Shop Page */
    position: absolute; 
    top: 48px; /* Pushed down by banner */
    
    width: 100%;
    z-index: 1000;
}

.header-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 20px; max-width: 1400px; margin: 0 auto;
}

.logo {
    font-family: 'Playfair Display', serif; font-size: 1.4rem;
    color: #C5A059; font-weight: bold; letter-spacing: 1px; white-space: nowrap;
}

.search-box {
    display: flex; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 15px; border-radius: 50px; width: 100%; max-width: 500px; margin: 0 15px;
}
.search-box input { background: transparent; border: none; color: white; width: 100%; outline: none; }
.search-box button { background: transparent; border: none; color: #C5A059; cursor: pointer; }

.cart-icon {
    font-size: 1.2rem; color: white; cursor: pointer; transition: 0.3s; display: flex; align-items: center;
}
.cart-icon:hover { color: #C5A059; transform: scale(1.1); text-shadow: 0 0 10px rgba(197, 160, 89, 0.5); }

/* Navigation Links */
.nav-links {
    display: flex; gap: 25px; padding: 12px 20px; 
    background: rgba(0,0,0,0.95); 
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; justify-content: center;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: #ccc; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.nav-links a.active, .nav-links a:hover { color: #C5A059; }

/* =========================================
   4. PRODUCT GRID (SHOP PAGE)
   ========================================= */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px; padding: 20px 40px; max-width: 1400px; margin: 0 auto;
}

.product-card {
    background: rgba(20, 20, 20, 0.7); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-direction: column; position: relative; transition: 0.3s;
}
.product-card:hover { transform: translateY(-5px); border-color: #C5A059; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.product-card.sold-item { opacity: 0.6; }
.product-card.sold-item:hover { transform: none; border-color: #333; box-shadow: none; }
.sold-item .p-img-container img { filter: grayscale(100%); }

.p-img-container { width: 100%; height: 300px; overflow: hidden; position: relative; }
.p-img-container img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover img { transform: scale(1.05); }

.sale-badge { position: absolute; top: 10px; left: 10px; background: #C5A059; color: black; font-weight: bold; padding: 2px 6px; font-size: 0.7rem; z-index: 5; }
.sold-badge { position: absolute; top: 10px; right: 10px; background: black; color: red; border: 1px solid red; font-weight: bold; padding: 2px 6px; font-size: 0.7rem; z-index: 5; }

.p-info { padding: 12px; }
.p-info h3 { font-size: 1rem; color: #eee; margin-bottom: 5px; }
.p-info p { color: #C5A059; font-size: 1rem; }

.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-grid {
    flex: 1; padding: 8px 0; font-size: 0.75rem; font-weight: bold;
    border-radius: 4px; border: none; cursor: pointer; text-transform: uppercase; text-align: center;
}
.btn-grid-buy { background: transparent; border: 1px solid #C5A059; color: #C5A059; }
.btn-grid-add { background: #C5A059; color: black; }

.qty-grid { display: flex; align-items: center; justify-content: space-between; background: #222; border: 1px solid #C5A059; border-radius: 4px; flex: 1; height: 30px; }
.qty-grid button { background: #C5A059; border: none; color: black; width: 30px; height: 100%; cursor: pointer; font-weight: bold; }
.qty-grid span { color: white; font-size: 0.9rem; font-weight: bold; }

/* =========================================
   5. SINGLE PRODUCT PAGE
   ========================================= */
.product-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
    max-width: 1200px; margin: 40px auto; padding: 20px;
    align-items: start;
}
.p-image-box {
    width: 100%; height: 500px; border-radius: 15px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.p-image-box img { width: 100%; height: 100%; object-fit: cover; }

.p-details-box { color: white; }
.p-title { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: #C5A059; margin-bottom: 10px; }
.p-price { font-size: 1.5rem; color: white; margin-bottom: 20px; }
.p-desc { color: #ccc; line-height: 1.6; margin-bottom: 30px; }

.add-btn {
    background: #C5A059; color: black; padding: 15px 30px; border: none;
    font-weight: bold; cursor: pointer; font-size: 1rem; width: 100%; margin-top: 10px;
    border-radius: 8px; transition: 0.3s;
}
.add-btn:hover { background: #d6b066; transform: translateY(-2px); }

/* =========================================
   6. SIDE DRAWER CART (FIXED Z-INDEX)
   ========================================= */
.cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); 
    z-index: 10000;
    opacity: 0; pointer-events: none; transition: 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed; top: 0; right: -400px; width: 400px; height: 100%;
    background: #111; border-left: 1px solid #C5A059; 
    z-index: 10001;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.c-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #222; padding-bottom: 15px; }
.c-img { width: 70px; height: 70px; object-fit: cover; border-radius: 5px; border: 1px solid #333; }
.c-details { flex: 1; }
.c-name { color: white; font-size: 0.9rem; margin: 0; }
.c-price { color: #C5A059; font-size: 0.85rem; }
.c-controls { display: flex; align-items: center; gap: 10px; margin-top: 5px; }

.qty-mini { display: flex; align-items: center; border: 1px solid #444; border-radius: 4px; }
.qty-mini button { background: #222; border: none; color: white; width: 25px; height: 25px; cursor: pointer; }
.qty-mini span { padding: 0 8px; color: white; font-size: 0.8rem; }
.del-btn { background: none; border: none; color: #ff4d4d; cursor: pointer; font-size: 1rem; margin-left: auto; }

.cart-footer { 
    padding: 20px; border-top: 1px solid #222; background: #050505; 
    padding-bottom: 80px; 
}
.cart-total { display: flex; justify-content: space-between; color: white; font-size: 1.2rem; font-weight: bold; margin-bottom: 15px; }
.track-btn { width: 100%; background: #C5A059; color: black; font-weight: bold; padding: 15px; border: none; cursor: pointer; text-transform: uppercase; }

/* =========================================
   7. CHECKOUT PAGE LAYOUT
   ========================================= */
.checkout-container {
    display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px;
    max-width: 1200px; width: 95%; margin: 0 auto;
}

.glass-form, .checkout-box, .account-box {
    background: rgba(20, 20, 20, 0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 20px; padding: 30px; color: white; margin-bottom: 30px;
}

.checkout-box { height: fit-content; }

input, select, textarea {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white;
    padding: 12px; border-radius: 5px; width: 100%; margin-bottom: 10px; box-sizing: border-box;
}
input:focus { border-color: #C5A059; outline: none; background: rgba(255,255,255,0.1); }

.chk-item-row { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; border-bottom: 1px solid #222; padding-bottom: 15px; }
.chk-img { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; border: 1px solid #333; }
.chk-details { flex: 1; }
.chk-title { font-size: 0.9rem; color: white; margin-bottom: 5px; }
.chk-price { font-size: 0.85rem; color: #888; }
.chk-actions { display: flex; align-items: center; gap: 10px; margin-top: 5px; }

.qty-box { display: flex; align-items: center; border: 1px solid #444; border-radius: 4px; background: #000; }
.qty-box button { width: 25px; height: 25px; background: #222; color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-box span { padding: 0 10px; font-size: 0.8rem; color: white; }

.payment-options { display: flex; gap: 10px; margin-bottom: 20px; }
.pay-card { flex: 1; cursor: pointer; }
.pay-card input { display: none; }
.pay-content {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 15px;
    border-radius: 10px; color: #ccc; font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.pay-card input:checked + .pay-content { background: rgba(197, 160, 89, 0.2); border-color: #C5A059; color: white; }

.confirm-btn {
    width: 100%; padding: 15px; background: #C5A059; color: black; border: none;
    font-weight: bold; cursor: pointer; margin-top: 10px;
}

/* =========================================
   8. PREMIUM SUCCESS MODAL
   ========================================= */
.success-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 5000;
    align-items: center; justify-content: center; backdrop-filter: blur(15px);
}
.success-box {
    background: rgba(20, 20, 20, 0.75); border: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(197, 160, 89, 0.1);
    padding: 50px 40px; border-radius: 24px; text-align: center;
    max-width: 420px; width: 90%; animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn { from { transform: scale(0.8) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.success-icon-container {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, #C5A059, #9A7B4F);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 25px; box-shadow: 0 10px 20px -10px rgba(197, 160, 89, 0.5);
}
.success-icon-container svg { width: 45px; height: 45px; fill: white; }
.success-title { font-family: 'Playfair Display', serif; color: #C5A059; font-size: 2rem; margin: 0 0 10px; }
.order-id-badge {
    background: rgba(255,255,255,0.1); padding: 8px 20px; border-radius: 50px;
    display: inline-block; margin: 20px 0; border: 1px solid rgba(197, 160, 89, 0.2);
}
.order-id-text { font-family: 'Poppins', sans-serif; color: white; font-weight: 600; letter-spacing: 2px; font-size: 1.1rem; }

.btn-gold-gradient {
    display: block; background: linear-gradient(to right, #C5A059, #b08d4e);
    color: white; text-decoration: none; padding: 16px; border-radius: 12px;
    font-weight: 600; margin-top: 30px; box-shadow: 0 10px 20px -10px rgba(197, 160, 89, 0.5);
}
.btn-glass-outline {
    display: block; background: rgba(255,255,255,0.05); border: 1px solid rgba(197, 160, 89, 0.4);
    color: #C5A059; padding: 16px; border-radius: 12px; font-weight: 600;
    margin-top: 15px; cursor: pointer; width: 100%;
}

/* =========================================
   9. BOTTOM BAR (Fixed)
   ========================================= */
.bottom-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 85%; max-width: 350px;
    background: rgba(20, 20, 20, 0.8); backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 50px;
    padding: 12px 30px; display: flex; justify-content: space-between; align-items: center;
    z-index: 9000; box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.bar-item { display: flex; flex-direction: column; align-items: center; color: #ccc; font-size: 1.2rem; }
.bar-item small { font-size: 0.6rem; margin-top: 3px; text-transform: uppercase; }
.bar-item.active, .bar-item:hover { color: #C5A059; }

/* =========================================
   10. MOBILE RESPONSIVE RULES 📱
   ========================================= */
@media (max-width: 900px) {
    .checkout-container { grid-template-columns: 1fr; }
    .order-summary-box { grid-row: 1; }
}

@media (max-width: 768px) {
    .search-box { display: none; }
    .header-top { padding: 15px; }
    .nav-links { justify-content: flex-start; padding-left: 20px; }
    
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
    .p-img-container { height: 200px; }
    .p-info h3 { font-size: 0.8rem; }
    .card-actions { flex-direction: column; gap: 5px; }
    
    /* Product Page Specific */
    .product-container { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px; }
    .p-image-box { height: 350px; }
    
    /* Center Forms on Mobile */
    .glass-form, .checkout-box { width: 90%; margin: 20px auto; padding: 20px; }
    
    .cart-drawer { width: 100% !important; right: -100% !important; }
    .cart-drawer.open { right: 0 !important; }
    
    #cursor-dot, #cursor-outline { display: none; }
}

/* =========================================
   11. EXTRAS
   ========================================= */
.filter-container { display: flex; justify-content: center; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.filter-btn { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #ccc; padding: 8px 20px; border-radius: 30px; font-size: 0.8rem; cursor: pointer; }
.filter-btn.active { background: #C5A059; color: black; border-color: #C5A059; }

#cursor-dot { background: #C5A059; width: 6px; height: 6px; border-radius: 50%; position: fixed; pointer-events: none; z-index: 999999; }
#cursor-outline { border: 1px solid #C5A059; width: 40px; height: 40px; border-radius: 50%; position: fixed; pointer-events: none; z-index: 999999; }

/* =========================================
   UNIVERSAL PREMIUM FOOTER
   ========================================= */
.site-footer {
    background: #050505;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    padding: 60px 20px;
    margin-top: auto; 
    width: 100%;
    position: relative;
    z-index: 10;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #C5A059;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
}

.footer-links {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link-item {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    position: relative;
}

.footer-link-item:hover {
    color: #C5A059;
    transform: translateY(-2px);
}

.footer-link-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: #C5A059;
    transition: width 0.3s;
}

.footer-link-item:hover::after {
    width: 100%;
}

.footer-divider {
    width: 50px;
    height: 1px;
    background: #333;
    margin-bottom: 20px;
}

.copyright {
    color: #444;
    font-size: 0.75rem;
    line-height: 1.6;
    letter-spacing: 1px;
    font-family: 'Helvetica Neue', sans-serif;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .footer-links { gap: 20px; flex-direction: column; }
    .site-footer { padding-bottom: 100px; } /* Space for mobile bottom bar */
}
