/* ==========================================
   1. BASE & SITE WIDE STYLES
   ========================================== */
body { 
    font-family: sans-serif; 
    margin: 0;
    padding: 0;
    background-color: #ffffff; /* Clean white background for contrast */
    color: #111111;            /* Deep black for highly readable body text */
}

/* ==========================================
   2. SITE HEADER STYLES (Logo Area)
   ========================================== */
.site-header {
    display: flex;
    justify-content: center; 
    align-items: center;     
    width: 100%;             
    padding: 25px 0;         
    background-color: #111111; /* Sleek black header background */
    border-bottom: 3px solid #D4AF37; /* Metallic gold bottom accent bar */
}

.header-logo {
    max-width: 100%;         
    height: auto;            
    display: block;
}

/* Auth Bar Styles */
.auth-bar {
    background-color: #111111;
    color: #D4AF37;
    padding: 10px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    border-bottom: 1px solid #333;
}

.auth-bar button, .auth-bar a {
    background-color: #D4AF37;
    color: #111111;
    border: none;
    padding: 6px 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

/* ==========================================
   MODAL OVERLAY & VIP FORMS
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Darker, richer overlay */
    backdrop-filter: blur(4px); /* Adds a modern frosted glass effect behind the modal */
}

.modal-content {
    background-color: #111111; /* Deep black to match the header */
    margin: 8% auto;
    padding: 35px 30px;
    border: 2px solid #D4AF37; /* Metallic gold border */
    width: 340px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15); /* Soft gold ambient glow */
}

.modal-content h3 { 
    margin-top: 0; 
    margin-bottom: 25px;
    color: #D4AF37; 
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    font-size: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    box-sizing: border-box;
    background-color: #222222; /* Dark input fields */
    color: #ffffff; /* White text when typing */
    border: 1px solid #444444;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Style the placeholder text so it isn't too bright */
.modal-content input::placeholder {
    color: #888888;
}

/* Gold glow when the user clicks into an input field */
.modal-content input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.modal-content button {
    background-color: #D4AF37;
    color: #111111;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.modal-content button:hover {
    background-color: #fce181; /* Brighter gold on hover */
}

.modal-content button:active {
    transform: scale(0.98); /* Satisfying click effect */
}

.full-width-btn {
    width: 100%;
    margin-top: 10px;
}

.close-btn {
    position: absolute;
    right: 20px; 
    top: 15px;
    font-size: 24px;
    color: #888888;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #D4AF37; /* Close button turns gold on hover */
}

/* ==========================================
   3. CATEGORY HEADER STYLES (Updated Design)
   ========================================== */
.category-header { 
    text-align: center; 
    margin: 40px auto 20px auto; 
    max-width: 1200px;         /* Keeps it aligned with grid container */
    font-size: 26px; 
    font-weight: bold; 
    letter-spacing: 1px;       /* Adds a premium, spacious look */
    text-transform: uppercase; /* Looks sharp in black and gold */
    background-color: #111111; /* Solid black background */
    color: #D4AF37;            /* Premium metallic gold text */
    padding: 15px; 
    border-radius: 4px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    scroll-margin-top: 65px;   /* Offset for sticky nav */
}

/* ==========================================
   4. PRODUCT CATALOGUE GRID STYLES
   ========================================== */
.grid-container { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* Maintains requested 3-column layout */
    gap: 25px; 
    padding: 20px; 
    max-width: 1200px;         /* Prevents the grid from getting too wide on huge monitors */
    margin: 0 auto;            /* Centers the entire grid container on the screen */
}

.grid-item { 
    position: relative; /* Added to hold the absolute price banners */
    text-align: center; 
    border: 1px solid #e0e0e0; 
    background-color: #ffffff;
    padding: 15px; 
    border-radius: 6px; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); 
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth hover effect */
}

/* Elegant gold border focus when a user hovers over a product card */
.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-color: #D4AF37;
}

/* Price Banner in Bottom Right */
.price-banner {
    position: absolute;
    bottom: 75px;
    right: 10px;
    background-color: #D4AF37;
    color: #111111;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to the image */
}

.clickable-img {
    cursor: pointer;
}

.grid-item img { 
    max-width: 100%; 
    height: auto; 
    max-height: 250px; 
    object-fit: contain; 
    margin-bottom: 10px;
}

.sku { 
    font-weight: bold; 
    margin-bottom: 8px; 
    color: #D4AF37;            /* Gold SKU color to stand out as a key feature */
    font-size: 1.1em; 
}

.name { 
    margin-top: 5px; 
    font-size: 14px; 
    color: #444444;            /* Dark charcoal grey for soft, readable product names */
    line-height: 1.4;
}

/* ==========================================
   5. MOBILE RESPONSIVE STYLES
   ========================================== */
@media (max-width: 768px) {
    /* Shrinks the 3-column grid to 1 column on tablets and mobile phones */
    .grid-container {
        grid-template-columns: repeat(1, 1fr);
        gap: 15px; /* Slightly tighter spacing for smaller screens */
        padding: 15px;
    }

    /* Slightly reduces font size so long titles don't look awkward on mobile */
    .category-header {
        font-size: 20px;
        padding: 12px;
        margin: 20px 15px 15px 15px; /* Adds space on the sides so it doesn't touch the screen edge */
    }
}

/* ==========================================
   6. STICKY CENTERED NAVIGATION BAR & MENU
   ========================================== */

html {
    scroll-behavior: smooth;
}

/* Full-width sticky bar */
.sticky-nav-bar {
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: #111111;
    border-bottom: 2px solid #D4AF37;
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the menu icon perfectly */
    height: 50px;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Container for the hamburger menu */
.menu-container {
    position: relative;
}

/* Hide the checkbox */
.menu-container #menu-toggle {
    display: none;
}

/* Three Horizontal Lines (Hamburger Icon) */
.menu-container .menu-btn {
    display: inline-block;
    color: #D4AF37;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    padding: 5px 20px; /* Added horizontal padding to create a larger clickable area */
    transition: color 0.2s ease;
}

.menu-container .menu-btn:hover {
    color: #ffffff;
}

/* Dropdown list container */
.menu-container .menu-list {
    display: none;
    position: absolute;
    top: 40px; /* Drops down just below the bar */
    left: 50%;
    transform: translateX(-50%); /* Keeps the dropdown perfectly centered relative to the icon */
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #111111;
    border: 2px solid #D4AF37;
    border-radius: 6px;
    max-height: 65vh;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    width: 270px;
}

/* Show menu when icon is clicked */
.menu-container #menu-toggle:checked ~ .menu-list {
    display: block;
}

/* Menu Link Styling */
.menu-container .menu-list li a {
    display: block;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #222222;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: center; /* Centers the text inside the dropdown to match the aesthetic */
}

.menu-container .menu-list li:last-child a {
    border-bottom: none;
}

.menu-container .menu-list li a:hover {
    background-color: #D4AF37;
    color: #111111;
    font-weight: bold;
}

/* ==========================================
   7. FOOTER STYLES
   ========================================== */
.site-footer {
    width: 100%;
    padding: 40px 20px;
    background-color: #111111;
    margin-top: 50px;
    border-top: 1px solid #222222;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-contact {
    color: #ffffff;
    font-size: 1rem;
    margin: 0 0 15px 0;
}

.footer-contact a {
    color: #D4AF37;
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    margin: 0 0 15px 0;
}

.footer-company {
    color: #888888;
    font-size: 1.8rem; 
    font-weight: bold;
    letter-spacing: 1px;
    margin: 0;
}

/* ==========================================
   8. ADMIN & PROFILE DARK THEME STYLES
   ========================================== */
body.dark-theme { 
    background-color: #111111; 
    color: #ffffff; 
}

/* Profile Specific */
.profile-container { 
    max-width: 850px; 
    margin: 40px auto; 
    padding: 35px; 
    background-color: #111111; 
    color: #ffffff; 
    border: 2px solid #D4AF37; 
    border-radius: 8px; 
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15); 
}
.profile-container h2, .profile-container h3 { 
    color: #D4AF37; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    text-align: center; 
    margin-top: 0; 
}
.profile-container h4 { 
    color: #D4AF37; 
    text-transform: uppercase; 
    text-align: left; 
    margin-bottom: 15px; 
    border-bottom: 1px solid #333333; 
    padding-bottom: 8px; 
    letter-spacing: 1px; 
}
.address-box { 
    border: 1px solid #444444; 
    padding: 20px; 
    margin-bottom: 25px; 
    border-radius: 6px; 
    background-color: #222222; 
}
.address-grid { display: flex; gap: 25px; }
.address-col { flex: 1; }
.profile-container label { 
    display: block; 
    font-weight: bold; 
    margin-bottom: 5px; 
    color: #bbbbbb; 
}
.profile-container input[type="text"], .profile-container textarea { 
    width: 100%; 
    padding: 12px; 
    margin: 0 0 20px 0; 
    box-sizing: border-box; 
    background-color: #222222; 
    color: #ffffff; 
    border: 1px solid #444444; 
    border-radius: 4px; 
    font-family: sans-serif; 
    font-size: 14px; 
    transition: border-color 0.3s ease, box-shadow 0.3s ease; 
}
.profile-container input[type="text"]:focus, .profile-container textarea:focus { 
    outline: none; 
    border-color: #D4AF37; 
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3); 
}
.shaded { 
    background-color: #151515 !important; 
    color: #666666 !important; 
    cursor: not-allowed; 
    border-color: #2a2a2a !important; 
}
.checkbox-container-profile { 
    display: flex; 
    align-items: center; 
    margin: 10px 0 30px 0; 
    background: #222; 
    padding: 15px; 
    border-radius: 4px; 
    border: 1px solid #333; 
}
.checkbox-container-profile input[type="checkbox"] { 
    margin-right: 15px; 
    width: 18px; 
    height: 18px; 
    cursor: pointer; 
    accent-color: #D4AF37; 
}
.checkbox-container-profile label { 
    cursor: pointer; 
    color: #D4AF37; 
    font-weight: bold; 
    margin: 0; 
}
.profile-btn { 
    background-color: #D4AF37; 
    color: #111111; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    padding: 16px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    width: 100%; 
    font-size: 15px; 
    transition: background-color 0.3s ease, transform 0.1s ease; 
}
.profile-btn:hover { background-color: #fce181; }

.btn-delete { background-color: #cc0000 !important; color: #ffffff !important; padding: 12px !important; margin-top: 15px; width: 100%; border: none; font-weight: bold; border-radius: 4px; cursor: pointer; text-transform: uppercase;}
.btn-delete:hover { background-color: #990000 !important; }
.error-msg { color: #cc0000; font-weight: bold; text-align: center; background: #330000; padding: 10px; border-radius: 4px; border: 1px solid #cc0000; }

/* Admin Specific */
.admin-login-wrapper { display: flex; justify-content: center; align-items: center; height: 100vh; }
.admin-login-box { background: #222222; padding: 40px; border-radius: 8px; border: 2px solid #D4AF37; text-align: center; box-shadow: 0 10px 30px rgba(212,175,55,0.15); width: 340px; }
.admin-login-box h2 { text-transform: uppercase; letter-spacing: 2px; margin-top: 0; color: #D4AF37; }
.admin-login-box input { padding: 12px; width: 100%; box-sizing: border-box; margin-bottom: 15px; border-radius: 4px; border: 1px solid #444; background: #111; color: #fff; }
.admin-login-box button { padding: 14px; width: 100%; background: #D4AF37; color: #111; border: none; font-weight: bold; cursor: pointer; border-radius: 4px; text-transform: uppercase; letter-spacing: 1px; }

.dashboard-container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.dashboard-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid #D4AF37; padding-bottom: 15px; }
.dashboard-header-bar h2 { color: #D4AF37; text-transform: uppercase; letter-spacing: 2px; margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; background-color: #222222; box-shadow: 0 4px 15px rgba(212,175,55,0.1); border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 15px; border: 1px solid #444444; text-align: left; vertical-align: top; color: #fff;}
.admin-table th { background-color: #D4AF37; color: #111111; text-transform: uppercase; font-weight: bold; letter-spacing: 1px; }
.admin-btn { background-color: #D4AF37; color: #111111; border: none; padding: 10px; cursor: pointer; font-weight: bold; border-radius: 4px; margin-bottom: 8px; width: 100%; text-transform: uppercase; transition: background 0.3s; }
.admin-btn:hover { background-color: #fce181; }
.admin-logout-btn { background-color: #111111; color: #D4AF37; padding: 10px 20px; text-decoration: none; border-radius: 4px; font-weight: bold; border: 2px solid #D4AF37; text-transform: uppercase; transition: all 0.3s; }
.admin-logout-btn:hover { background-color: #D4AF37; color: #111111; }
.admin-table textarea, .admin-table select { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 4px; border: 1px solid #444444; background-color: #111111; color: #ffffff; font-family: sans-serif; }
.admin-table textarea:focus, .admin-table select:focus { outline: none; border-color: #D4AF37; box-shadow: 0 0 5px rgba(212,175,55,0.5); }
.admin-table textarea { resize: vertical; min-height: 80px; }
.admin-success-msg { color: #4CAF50; font-weight: bold; background: #1a331a; padding: 10px; border-radius: 4px; border: 1px solid #4CAF50; margin-bottom: 20px; text-align: center; }

.email-link { color: #D4AF37; text-decoration: none; }
.email-link:hover { text-decoration: underline; }
.margin-zero { margin: 0; }
.align-right { margin-left: auto; }

@media (max-width: 768px) {
    .address-grid { flex-direction: column; gap: 15px; }
    .profile-container { margin: 20px 15px; padding: 20px; }
}

/* ==========================================
   9. PROFILE FORM SPECIFIC LAYOUTS
   ========================================== */
.form-row { 
    display: flex; 
    gap: 15px; 
}
.form-col { 
    flex: 1; 
}
.profile-container select {
    width: 100%; 
    padding: 12px; 
    margin: 0 0 20px 0; 
    box-sizing: border-box; 
    background-color: #222222; 
    color: #ffffff; 
    border: 1px solid #444444; 
    border-radius: 4px; 
    font-family: sans-serif; 
    font-size: 14px; 
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.profile-container select:focus {
    outline: none; 
    border-color: #D4AF37; 
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}
/* Shaded class specifically for dropdowns */
select.shaded {
    background-color: #151515 !important; 
    color: #666666 !important; 
    cursor: not-allowed; 
    border-color: #2a2a2a !important;
}

/* ==========================================
   10. ADDRESS ACTIONS (EDIT & DEFAULT)
   ========================================== */
.address-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333333;
}
.action-buttons {
    display: flex;
    gap: 10px;
}
.btn-edit {
    background-color: #444444 !important;
    color: #ffffff !important;
    padding: 10px 15px !important;
    border: none;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s;
}
.btn-edit:hover { background-color: #666666 !important; }

/* Keep Delete button size consistent with Edit */
.btn-delete-small {
    background-color: #cc0000 !important;
    color: #ffffff !important;
    padding: 10px 15px !important;
    border: none;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s;
}
.btn-delete-small:hover { background-color: #990000 !important; }

/* Default Radio Button Styling */
.default-label {
    cursor: pointer;
    color: #D4AF37;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.default-radio {
    accent-color: #D4AF37;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.is-default-badge {
    background: #D4AF37;
    color: #111;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 10px;
}

/* ==========================================
   11. PROFILE FORM BUTTON LAYOUT
   ========================================== */
.form-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px; /* This adds the clean space between the buttons */
    margin-top: 10px;
}
.btn-cancel {
    background-color: #444444 !important;
    color: #ffffff !important;
}
.btn-cancel:hover {
    background-color: #666666 !important;
}
.hidden-btn {
    display: none !important;
}