* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #0d1b2a 50%, #1b263b 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 191, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    font-size: 1.8em;
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: #00bfff;
}

/* Hero Section */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3em;
    line-height: 1.2;
    margin-bottom: 10px;
    color: white;
}

.gradient-text {
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 30px;
}

/* Search Section */
.search-section {
    max-width: 900px;
    margin: 0 auto 40px;
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-header h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.search-subtitle {
    color: rgba(255,255,255,0.6);
}

.search-box {
    position: relative;
    margin-bottom: 30px;
}

.search-box input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: white;
    font-size: 1em;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: rgba(0, 191, 255, 0.5);
    background: rgba(255,255,255,0.08);
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.4);
}

/* Category Filters */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.tab-btn.active {
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    border-color: transparent;
    color: white;
}

/* Products Section */
.products-section {
    padding: 20px 0 80px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.product-card {
    background: linear-gradient(135deg, rgba(10, 30, 60, 0.6) 0%, rgba(15, 40, 80, 0.4) 100%);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 16px;
    padding: 0;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00bfff 0%, #1e90ff 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 15px 40px rgba(0, 191, 255, 0.2);
}

.product-image-container {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 100, 200, 0.2) 0%, rgba(0, 50, 150, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 80%;
    max-width: 150px;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    z-index: 10;
}

.product-info {
    padding: 20px;
}

.product-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.price-stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price {
    font-size: 1.8em;
    color: #00bfff;
    font-weight: bold;
}

.old-price {
    font-size: 1em;
    color: #666;
    text-decoration: line-through;
}

.stock-info {
    font-size: 0.85em;
    padding: 4px 10px;
    border-radius: 5px;
    display: inline-block;
}

.in-stock {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.low-stock {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.out-of-stock {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.description {
    color: rgba(255,255,255,0.6);
    margin: 10px 0;
    font-size: 0.9em;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-add-cart, .btn-buy-now {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-cart {
    background: rgba(0, 191, 255, 0.15);
    color: #00bfff;
    border: 2px solid rgba(0, 191, 255, 0.3);
}

.btn-add-cart:hover {
    background: rgba(0, 191, 255, 0.25);
    border-color: rgba(0, 191, 255, 0.5);
}

.btn-buy-now {
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    color: white;
}

.btn-buy-now:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 191, 255, 0.4);
}

.btn-add-cart:disabled,
.btn-buy-now:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.3);
    border-color: rgba(100, 100, 100, 0.3);
}

.btn-add-cart:disabled:hover,
.btn-buy-now:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Auth Buttons */
.btn-login, .btn-logout, .btn-orders, .btn-cart {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
}

.btn-cart {
    background: rgba(0, 191, 255, 0.2);
    color: white;
    border: 2px solid rgba(0, 191, 255, 0.3);
    position: relative;
}

.btn-cart:hover {
    background: rgba(0, 191, 255, 0.3);
    border-color: rgba(0, 191, 255, 0.5);
}

.cart-badge {
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.85em;
    margin-left: 5px;
}

.btn-login {
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    color: white;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.4);
}

.username {
    color: white;
    font-weight: 600;
}

.btn-orders {
    background: rgba(255,255,255,0.1);
    color: white;
}

.btn-orders:hover {
    background: rgba(255,255,255,0.15);
}

.btn-logout {
    background: rgba(231,76,60,0.8);
    color: white;
}

.btn-logout:hover {
    background: rgba(231,76,60,1);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #0a1628;
    border-left: 2px solid rgba(0, 191, 255, 0.3);
    z-index: 1000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-header {
    padding: 25px;
    border-bottom: 2px solid rgba(0, 191, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.5em;
    color: #00bfff;
}

.cart-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.cart-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 40px 20px;
}

.cart-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info h4 {
    color: white;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #00bfff;
    font-weight: bold;
    font-size: 1.1em;
}

.btn-remove {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: rgba(231, 76, 60, 0.4);
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid rgba(0, 191, 255, 0.2);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
}

.cart-total span:last-child {
    color: #00bfff;
}

.btn-checkout, .btn-clear-cart {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-checkout {
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    color: white;
    margin-bottom: 10px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 191, 255, 0.4);
}

.btn-clear-cart {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: white;
}

.btn-clear-cart:hover {
    background: rgba(231, 76, 60, 0.4);
}

/* Product Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #0a1628;
    margin: 5% auto;
    padding: 0;
    border: 2px solid rgba(0, 191, 255, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.product-modal-content {
    padding: 30px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

.close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.modal-product-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-product-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    flex-shrink: 0;
}

.modal-product-header > div {
    flex: 1;
}

.modal-product-header h2 {
    color: white;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.modal-product-desc {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

.modal-price-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.modal-price {
    font-size: 2em;
    color: #00bfff;
    font-weight: bold;
}

.modal-old-price {
    font-size: 1.2em;
    color: #666;
    text-decoration: line-through;
}

.modal-stock {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
}

.modal-quantity-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.modal-quantity-section label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-selector button {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-selector button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.4);
}

.quantity-selector button:active {
    transform: scale(0.95);
}

.quantity-selector input {
    width: 80px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    outline: none;
}

.quantity-selector input:focus {
    border-color: rgba(0, 191, 255, 0.5);
}

.modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-total span:first-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1em;
}

.modal-total span:last-child {
    color: #00bfff;
    font-size: 1.8em;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.btn-modal-cart, .btn-modal-buy {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-cart {
    background: rgba(0, 191, 255, 0.2);
    color: white;
    border: 2px solid rgba(0, 191, 255, 0.3);
}

.btn-modal-cart:hover {
    background: rgba(0, 191, 255, 0.3);
    border-color: rgba(0, 191, 255, 0.5);
    transform: translateY(-2px);
}

.btn-modal-buy {
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    color: white;
}

.btn-modal-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.5);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00bfff 0%, #1e90ff 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 191, 255, 0.4);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Orders Modal */
.orders-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.orders-modal.show {
    opacity: 1;
}

.orders-modal-content {
    background: #0a1628;
    border: 2px solid rgba(0, 191, 255, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
}

.orders-header {
    padding: 25px 30px;
    border-bottom: 2px solid rgba(0, 191, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orders-header h2 {
    font-size: 1.8em;
    color: #00bfff;
    margin: 0;
}

.orders-body {
    padding: 20px 30px;
    overflow-y: auto;
    flex: 1;
}

.order-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.order-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 191, 255, 0.4);
    transform: translateY(-2px);
}

.order-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.order-id {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.8);
}

.order-icon {
    font-size: 1.2em;
}

.order-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.order-status.completed {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.order-product {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.product-icon {
    font-size: 1.3em;
}

.product-name {
    color: white;
    font-size: 1.1em;
    font-weight: 600;
}

.order-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.order-price,
.order-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
}

.price-icon,
.date-icon {
    font-size: 1.1em;
}

.order-price span:last-child {
    color: #00bfff;
    font-weight: 700;
    font-size: 1.1em;
}

.empty-orders {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-orders p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.3em;
    margin-bottom: 10px;
}

.empty-subtitle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1em !important;
}

/* Footer */
footer {
    background: rgba(10, 22, 40, 0.8);
    padding: 40px 0 20px;
    margin-top: 80px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-content {
    color: rgba(255,255,255,0.5);
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content h1 {
        font-size: 2em;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-product-header {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .filter-tabs {
        gap: 8px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
}
