* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #4a9eff;
    --accent-color: #ff6b6b;
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --light-bg: #2a2a2a;
    --dark-bg: #0f0f0f;
    --white: #ffffff;
    --border-color: #3a3a3a;
    --hover-color: #3a8eef;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background: var(--dark-bg);
    position: relative;
}

/* Star-like background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 40%, white, transparent),
        radial-gradient(1px 1px at 33% 60%, white, transparent),
        radial-gradient(1px 1px at 55% 80%, white, transparent),
        radial-gradient(2px 2px at 15% 90%, white, transparent),
        radial-gradient(1px 1px at 70% 20%, white, transparent),
        radial-gradient(1px 1px at 25% 15%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: stars 20s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

body > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.logo a:hover {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
    display: block;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-icons a {
    color: var(--text-color);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-icons a:hover {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}

.btn-primary {
    background: var(--light-bg);
    border: 1px solid var(--secondary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #c0392b;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--primary-color);
    color: var(--text-color);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* --- Admin Styles --- */
.admin-section { padding: 4rem 0; }

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.admin-tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.admin-tab-btn:hover {
    color: var(--text-color);
}

.admin-tab-btn.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.admin-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Admin Filters */
.admin-filters {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Settings Panel */
.settings-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.danger-zone {
    border-color: var(--danger-color);
}

.danger-zone h3 {
    color: var(--danger-color);
    border-color: rgba(231, 76, 60, 0.3);
}

/* --- Modal Styles (Layout Fixes) --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modern-modal {
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    max-width: 700px;
    width: 100%;
    max-height: 90vh; /* Fixed height relative to viewport */
    display: flex;
    flex-direction: column; /* Stack header, body, footer */
    border-radius: 12px;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover { color: white; }

/* Scrollable Body - Key Fix for Product Creation Layout */
.modal-body {
    padding: 2rem;
    overflow-y: auto; /* Enable vertical scrolling */
    flex-grow: 1; /* Take up remaining space */
}

/* Custom Scrollbar for Modal */
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

.modal-footer {
    padding: 1.25rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Floating Labels */
.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label input,
.floating-label textarea,
.floating-label select {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    appearance: none;
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label select:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.floating-label label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 0.25rem;
}

/* Label Animation */
.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label,
.floating-label textarea:focus ~ label,
.floating-label textarea:not(:placeholder-shown) ~ label,
.floating-label select:valid ~ label {
    top: -10px;
    left: 0.8rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    background: var(--light-bg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--light-bg);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--secondary-color);
}

.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--danger-color); }
.toast.info { border-left-color: var(--secondary-color); }

.toast i { font-size: 1.2rem; }
.toast.success i { color: var(--success-color); }
.toast.error i { color: var(--danger-color); }
.toast.info i { color: var(--secondary-color); }

/* Other Existing Styles (Navbar, etc.) */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.user-dropdown { position: relative; }
.user-btn { background: none; border: none; color: var(--text-color); font-size: 1.2rem; cursor: pointer; padding: 0.5rem; border-radius: 50%; transition: all 0.3s; }
.user-btn:hover { color: var(--secondary-color); transform: scale(1.1); }
.dropdown-menu { position: absolute; top: 100%; right: 0; background: var(--light-bg); border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.5); border-radius: 8px; min-width: 150px; margin-top: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; z-index: 1000; overflow: hidden; }
.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 0.75rem 1rem; color: var(--text-color); text-decoration: none; transition: all 0.3s; font-size: 0.95rem; position: relative; border-left: 3px solid transparent; }
.dropdown-menu a:hover { background: rgba(74, 158, 255, 0.1); color: var(--secondary-color); padding-left: 1.25rem; }

.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 4px; }
.hamburger span { width: 25px; height: 3px; background: var(--text-color); transition: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .nav-menu { position: fixed; left: -100%; top: 70px; flex-direction: column; background: var(--light-bg); border-bottom: 1px solid var(--border-color); width: 100%; text-align: center; transition: 0.3s; box-shadow: 0 10px 27px rgba(0,0,0,0.5); padding: 2rem 0; }
    .nav-menu.active { left: 0; }
    .form-row { grid-template-columns: 1fr; }
}

/* Star-like background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 40%, white, transparent),
        radial-gradient(1px 1px at 33% 60%, white, transparent),
        radial-gradient(1px 1px at 55% 80%, white, transparent),
        radial-gradient(2px 2px at 15% 90%, white, transparent),
        radial-gradient(1px 1px at 70% 20%, white, transparent),
        radial-gradient(1px 1px at 25% 15%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: stars 20s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes stars {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

body > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.logo a:hover {
    color: var(--secondary-color);
}

.logo i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
    display: block;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-icons a {
    color: var(--text-color);
    font-size: 1.2rem;
    position: relative;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-icons a:hover {
    color: var(--secondary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
}

.user-btn:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 8px;
    min-width: 150px;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
    position: relative;
    border-left: 3px solid transparent;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--secondary-color);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.dropdown-menu a:hover::before {
    transform: scaleY(1);
}

.dropdown-menu a:hover {
    background: rgba(74, 158, 255, 0.1);
    color: var(--secondary-color);
    padding-left: 1.25rem;
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: 0.3s;
}

/* Slider */
.slider-section {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 4rem;
    border-radius: 0 0 30px 30px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide:nth-child(2) {
    background: linear-gradient(135deg, #2d1b3d 0%, #1a0d2e 50%, #0d0520 100%);
}

.slide:nth-child(3) {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.slide-content {
    text-align: center;
    color: white;
    z-index: 1;
    animation: slideInUp 1s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    animation: fadeInScale 1s ease 0.2s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
    animation: fadeInScale 1s ease 0.4s both;
}

.slide-content .btn {
    animation: fadeInScale 1s ease 0.6s both;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 2;
}

.slider-controls button {
    background: rgba(74, 158, 255, 0.3);
    border: 1px solid rgba(74, 158, 255, 0.5);
    color: white;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.slider-controls button:hover {
    background: rgba(74, 158, 255, 0.6);
    transform: scale(1.1);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(74, 158, 255, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: var(--secondary-color);
    border-color: white;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.8);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background: #3a8eef;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.4);
}

.btn-primary {
    background: var(--light-bg);
    border: 1px solid var(--secondary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

/* Category Section */
.category-section {
    padding: 4rem 0;
    background: transparent;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
    cursor: pointer;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1) 0%, rgba(74, 158, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
    pointer-events: none;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(74, 158, 255, 0.4);
}

.category-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.category-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-card:hover .category-image-wrapper img {
    transform: scale(1.15);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    transition: opacity 0.4s;
    z-index: 1;
}

.category-card:hover .category-overlay {
    opacity: 0.7;
}

.category-card h3 {
    padding: 1rem;
    color: var(--text-color);
}

.category-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.category-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.category-link:hover::after {
    width: 80%;
}

/* Products Section */
.products-section {
    padding: 4rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(74, 158, 255, 0.4);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 0;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--primary-color) 100%);
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card .btn {
    position: relative;
    overflow: hidden;
    z-index: 3;
}

.product-card .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.product-card .btn:hover::after {
    width: 300px;
    height: 300px;
}

.product-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background: var(--light-bg);
    transition: background 0.4s;
}

.product-card:hover .product-info {
    background: rgba(42, 42, 42, 0.95);
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-rating {
    color: #f39c12;
    margin-bottom: 0.5rem;
}

.product-rating span {
    color: var(--text-secondary);
    margin-left: 5px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 1rem 0;
}

.product-info .btn {
    width: 100%;
    text-align: center;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.3);
}

.feature-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--primary-color);
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.footer-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-section a:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.3);
}

.scroll-top:hover {
    background: #3a8eef;
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(74, 158, 255, 0.5);
}

.scroll-top.show {
    display: flex;
}

/* Products Page */
.filters-section {
    background: transparent;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.filters-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--primary-color);
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background: var(--light-bg);
    color: var(--text-color);
    transition: all 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.filter-group label {
    color: var(--text-color);
}

/* --- Fix for Products Page Dropdowns --- */
/* Ensure the filter section sits above the product grid */
.filters-section {
    position: relative;
    z-index: 50; /* Higher than product cards */
}

.filters-container {
    position: relative;
    z-index: 51;
}

.filter-group {
    position: relative;
    z-index: 52;
}

/* Ensure the product grid is below */
.products-section {
    position: relative;
    z-index: 1;
}

/* Fix product card z-index interaction */
.product-card {
    z-index: 1; /* Reset stack context */
}

/* Ensure Custom Dropdown options are on top of everything */
.custom-options {
    z-index: 9999 !important; /* Force top */
    background: var(--light-bg); /* Ensure background is solid */
    border: 1px solid var(--border-color);
}

/* --- Admin Status Manager Styles --- */
.status-item {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

/* Product View Page */
.product-view {
    padding: 4rem 0;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: transform 0.4s;
    cursor: zoom-in;
}

.main-image:hover {
    transform: scale(1.02);
}

.thumbnail-images {
    display: flex;
    gap: 1rem;
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.4);
}

.thumbnail.active {
    border-color: var(--secondary-color);
    opacity: 1;
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.6);
}

.product-info-detail h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.product-rating-large {
    font-size: 1.2rem;
    color: #f39c12;
    margin-bottom: 1rem;
}

.price-large {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 1.5rem;
    animation: pricePulse 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

@keyframes pricePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.quantity-selector button:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.quantity-selector input {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--primary-color);
    color: var(--text-color);
}

.add-to-cart-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
}

.related-products {
    margin-top: 4rem;
}

/* Cart Page */
.cart-section {
    padding: 4rem 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.cart-table th,
.cart-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.cart-table th {
    background: var(--primary-color);
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.cart-item-image:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.4);
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.cart-quantity button:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.cart-quantity input {
    width: 50px;
    padding: 0.3rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--primary-color);
    color: var(--text-color);
}

.remove-item {
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-summary {
    margin-top: 2rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-row.total {
    font-size: 1.5rem;
    font-weight: bold;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    color: var(--accent-color);
}

.checkout-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1.2rem;
}

/* Checkout Page */
.checkout-section {
    padding: 4rem 0;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.checkout-form {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--primary-color);
    color: var(--text-color);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.form-group .error {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: var(--accent-color);
}

.form-group.error .error {
    display: block;
}

.order-summary {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    height: fit-content;
    position: sticky;
    top: 100px;
    animation: slideInRight 0.6s ease;
    transition: transform 0.3s;
}

.order-summary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Order Confirmation */
.confirmation-section {
    padding: 4rem 0;
    text-align: center;
}

.confirmation-icon {
    font-size: 5rem;
    color: #27ae60;
    margin-bottom: 2rem;
}

.confirmation-message {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.order-number {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* About Us Page */
.about-section {
    padding: 4rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: center;
}

.about-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.testimonials {
    margin-top: 4rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.testimonial-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.3);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.testimonial-author {
    font-weight: bold;
    color: var(--text-color);
}

/* Contact Us Page */
.contact-section {
    padding: 4rem 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.contact-item h3 {
    color: var(--text-color);
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-form {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* Search Page */
.search-section {
    padding: 4rem 0;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto 3rem;
    display: flex;
    gap: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background: var(--light-bg);
    color: var(--text-color);
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.search-bar button {
    padding: 1rem 2rem;
}

.search-results {
    margin-top: 2rem;
}

/* Category Page */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.category-page-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.category-page-card:hover {
    transform: translateY(-10px) scale(1.01);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(74, 158, 255, 0.4);
}

.category-page-card .category-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.category-page-card .category-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-page-card:hover .category-image-wrapper img {
    transform: scale(1.15);
}

.category-page-card .category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 100%);
    transition: opacity 0.4s;
    z-index: 1;
}

.category-page-card:hover .category-overlay {
    opacity: 0.8;
}

.category-page-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.category-page-content {
    padding: 1.5rem;
}

.category-page-content h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.category-page-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Login Section */
.login-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.login-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.tab-btn.active::after {
    width: 100%;
}

.tab-btn.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.tab-btn:hover {
    color: var(--text-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Profile Section */
.profile-section {
    padding: 4rem 0;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.profile-avatar {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.profile-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.profile-form-container {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Admin Styles */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.admin-tab-btn:hover {
    color: var(--text-color);
}

.admin-tab-btn.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modern-modal {
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    max-width: 700px;
    width: 100%;
    max-height: 90vh; /* Limit height to viewport */
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Header stays at top */
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}
.close-modal:hover { color: white; }

/* Scrollable Body */
.modal-body {
    padding: 2rem;
    overflow-y: auto; /* Scroll ONLY the form body */
    flex-grow: 1;
}

/* Custom Scrollbar for Modal */
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

.modal-footer {
    padding: 1.25rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0; /* Footer stays at bottom */
}

/* Floating Labels */
.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label input,
.floating-label textarea,
.floating-label select {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    appearance: none;
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label select:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.floating-label label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 0.25rem;
}

/* Label Animation */
.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label,
.floating-label textarea:focus ~ label,
.floating-label textarea:not(:placeholder-shown) ~ label,
.floating-label select:valid ~ label {
    top: -10px;
    left: 0.8rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    background: var(--light-bg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
}
/* Responsive */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--light-bg); /* Changed from white to light-bg */
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.5);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .slide-content h2 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1.2rem;
    }

    .product-details,
    .checkout-container,
    .contact-container,
    .about-content {
        grid-template-columns: 1fr;
    }

    .cart-table {
        font-size: 0.9rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 0.75rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .main-image {
        height: 300px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dropdown-menu {
        right: -50px;
    }
}

/* --- Add to the bottom of shop/css/style.css --- */

/* Improved Order History Card Layout */
.order-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary-color);
}

.order-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-header-info h4 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.1rem;
}

.order-header-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-body {
    padding: 1.5rem;
}

.order-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-item-row:last-child {
    border-bottom: none;
}

.order-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}

.order-footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--light-bg);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--secondary-color);
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-left-color: #27ae60; }
.toast.error { border-left-color: #e74c3c; }
.toast.info { border-left-color: #3498db; }

.toast i { font-size: 1.2rem; }
.toast.success i { color: #27ae60; }
.toast.error i { color: #e74c3c; }
.toast.info i { color: #3498db; }

/* --- New Profile Page Layout (Split View) --- */
.profile-grid-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
}

.profile-sidebar {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    position: sticky;
    top: 100px;
    text-align: center;
}

.profile-main-content {
    background: transparent;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    background: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--secondary-color);
    border: 3px solid var(--border-color);
}

.profile-name-display {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.profile-email-display {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Payment Method Styles */
.payment-method-box {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-weight: 500;
}

/* Responsive Profile */
@media (max-width: 900px) {
    .profile-grid-layout {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        position: static;
    }
}

/* --- Improved Login Page Scaling & Social Buttons --- */

/* Fix scaling to fit window better */
.login-section {
    min-height: 85vh; /* Occupy most of the screen */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-container {
    width: 100%;
    max-width: 450px; /* Slightly narrower for a cleaner look */
    margin: 0 auto;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    animation: fadeInScale 0.5s ease-out;
}

/* Social Login Styles */
.social-login-divider {
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
}

.social-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 0;
}

.social-login-divider span {
    background: var(--light-bg);
    padding: 0 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    border-color: var(--text-secondary);
}

.social-btn.google i { color: #DB4437; }
.social-btn.github i { color: #ffffff; }

.social-btn:hover.google { border-color: #DB4437; background: rgba(219, 68, 55, 0.1); }
.social-btn:hover.github { border-color: #ffffff; background: rgba(255, 255, 255, 0.1); }

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustment */
@media (max-height: 700px) {
    .login-section {
        min-height: auto;
        padding: 4rem 0;
    }
}

/* ... [Existing styles] ... */

/* --- Custom Dropdown Menu Styles --- */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-color);
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.custom-select-trigger:hover {
    border-color: var(--secondary-color);
}

.custom-select-trigger::after {
    content: '\f107'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.custom-select.open .custom-select-trigger::after {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid var(--border-color);
    border-top: 0;
    border-radius: 0 0 5px 5px;
    background: var(--light-bg);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    margin-top: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-height: 200px;
    overflow-y: auto;
}

/* Custom scrollbar for options */
.custom-options::-webkit-scrollbar {
    width: 8px;
}
.custom-options::-webkit-scrollbar-track {
    background: var(--primary-color);
}
.custom-options::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
.custom-options::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    position: relative;
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(74, 158, 255, 0.1);
    color: var(--secondary-color);
    padding-left: 1.25rem;
}

.custom-option.selected {
    background: var(--secondary-color);
    color: var(--white);
}

/* Force hide native select but keep it accessible for form submission logic */
select {
    display: none !important;
}

/* Custom Payment Method Styling */
.payment-method-box {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    position: relative;
}

.payment-method-box:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.payment-method-box.selected {
    border-color: var(--secondary-color);
    background: rgba(74, 158, 255, 0.1);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.2);
}

.payment-method-box input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
}

.payment-method-box input[type="radio"]:checked {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    box-shadow: inset 0 0 0 4px var(--light-bg);
}

.payment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.payment-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.payment-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ... [Keep all existing CSS] ... */

/* --- Modern Admin Modal Styles --- */
.modern-modal {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 90%;
    padding: 0;
    overflow: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modern-form {
    padding: 2rem;
}

/* Floating Labels */
.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label input,
.floating-label textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.floating-label input:focus,
.floating-label textarea:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    outline: none;
}

.floating-label label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 0.25rem;
}

/* Move label up when input has value or focused */
.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label,
.floating-label textarea:focus ~ label,
.floating-label textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 0.8rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    background: var(--primary-bg); /* Match bg to hide line if needed */
    padding: 0 5px;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: white;
    color: white;
    background: rgba(255,255,255,0.05);
}

.btn-submit {
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6);
}

/* Close button style */
.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}
.close-modal:hover { color: white; }

/* Print Styling */
@media print {
    /* Hide non-receipt elements */
    .navbar, 
    .footer, 
    .scroll-top, 
    .no-print, 
    .btn, 
    .nav-icons, 
    button {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        visibility: hidden; /* Hide everything initially */
    }

    /* Target the receipt container specifically */
    #orderReceipt, #orderReceipt * {
        visibility: visible; /* Show only receipt content */
        color: black !important;
    }

    /* Position the receipt at the top left */
    #orderReceipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: white;
        max-width: 100% !important;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Ensure text is black for printing */
    h2, h3, h4, p, span, strong, div {
        color: black !important;
        text-shadow: none !important;
    }
}

/* Receipt Specific Styles (Visible on screen too) */
.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.receipt-store-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.receipt-customer-info {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.receipt-total-section {
    border-top: 2px dashed #ccc;
    margin-top: 1rem;
    padding-top: 1rem;
}
