/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.logo span {
    color: var(--secondary-color);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.header-icons {
    display: flex;
    gap: 1.5rem;
}

.header-icons a {
    color: var(--dark-text);
    font-size: 1.2rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Products Grid */
.products-section,
.category-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--light-text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.product-price {
    margin: 1rem 0;
}

.original-price {
    color: var(--light-text);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.current-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.pre-order-badge {
    display: inline-block;
    background: var(--warning-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.btn-add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-to-cart:hover {
    background: var(--secondary-color);
}

/* Cart Page Styles */
.cart-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.page-title {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.empty-cart {
    text-align: center;
    padding: 4rem;
}

.empty-cart i {
    font-size: 5rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.empty-cart p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: auto 100px 100px 30px;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.item-details h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.item-quantity input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.item-total {
    font-weight: bold;
    color: var(--secondary-color);
}

.remove-item {
    color: var(--danger-color);
    text-decoration: none;
}

.cart-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.cart-summary {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    height: fit-content;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.highlight {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.summary-note {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Checkout Page */
.checkout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.checkout-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group small {
    color: var(--light-text);
    font-size: 0.8rem;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
}

.payment-option:hover {
    background: var(--light-bg);
}

.payment-option input[type="radio"] {
    width: auto;
    margin-right: 1rem;
}

.payment-label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Track Order Page */
.track-order-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.search-form {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-form .form-group {
    display: flex;
    gap: 1rem;
}

.search-form input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.order-details {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.order-status {
    margin: 2rem 0;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.status-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.status-step {
    position: relative;
    z-index: 2;
    text-align: center;
    background: white;
    padding: 0 1rem;
}

.status-step i {
    display: block;
    font-size: 1.5rem;
    color: var(--border-color);
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.status-step.completed i {
    color: var(--success-color);
}

.current-status {
    text-align: center;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 5px;
}

.status-pending { color: var(--warning-color); }
.status-processing { color: var(--accent-color); }
.status-shipped { color: var(--primary-color); }
.status-completed { color: var(--success-color); }

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Admin Panel Styles */
.admin-body {
    background: #f4f6f9;
}

.admin-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
}

.admin-sidebar h2 {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: 0.5rem;
}

.admin-sidebar a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.admin-sidebar a:hover,
.admin-sidebar li.active a {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar i {
    margin-right: 0.5rem;
    width: 20px;
}

.admin-main {
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-details h3 {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Tables */
.orders-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.orders-table thead {
    background: var(--primary-color);
    color: white;
}

.orders-table th,
.orders-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.orders-table tbody tr:hover {
    background: var(--light-bg);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-processing { background: #cce5ff; color: #004085; }
.status-shipped { background: #d4edda; color: #155724; }
.status-completed { background: #d1e7dd; color: #0f5132; }

/* Footer */
.main-footer {
    background: var(--primary-color);
    color: white;
    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 a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .cart-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-container {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}
/* ========== MOBILE RESPONSIVE HEADER STYLES ========== */

/* Header Styles */
.main-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    position: relative;
}

.logo a {
    text-decoration: none;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

.logo span {
    color: var(--secondary-color);
}

/* Desktop Icons */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Cart Icon */
.cart-icon {
    color: var(--dark-text);
    font-size: 1.3rem;
    position: relative;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

/* ===== Mobile Menu Toggle (Hamburger) ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--secondary-color);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--secondary-color);
}

/* Navigation Menu */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-item a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-item a:hover,
.nav-item a.active {
    color: var(--secondary-color);
}

.nav-item a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

/* Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== MOBILE STYLES (max-width: 768px) ===== */
@media screen and (max-width: 768px) {
    /* Show hamburger menu */
    .menu-toggle {
        display: flex;
    }
    
    /* Hide desktop icons */
    .desktop-only {
        display: none;
    }
    
    /* Show mobile-only items */
    .mobile-only {
        display: block !important;
    }
    
    /* Mobile Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 999;
        padding: 80px 20px 30px;
        overflow-y: auto;
        display: block;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-item a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }
    
    .nav-item a.active::after {
        display: none;
    }
    
    .nav-item a.active {
        color: var(--secondary-color);
        font-weight: 600;
    }
    
    /* Mobile menu icons */
    .nav-item a i {
        width: 25px;
        color: var(--primary-color);
        margin-right: 10px;
    }
    
    /* Cart count in mobile menu */
    .nav-item .cart-count-mobile {
        background: var(--secondary-color);
        color: white;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.8rem;
        margin-left: 8px;
    }
    
    /* Body when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Adjust header padding for mobile */
    .header-content {
        padding: 0.6rem 0;
    }
    
    /* Smaller logo on mobile */
    .logo h1 {
        font-size: 1.3rem;
    }
}

/* ===== SMALL MOBILE (max-width: 480px) ===== */
@media screen and (max-width: 480px) {
    .nav-menu {
        width: 85%;
        padding: 70px 15px 20px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .menu-toggle {
        width: 25px;
        height: 18px;
    }
    
    .menu-toggle .bar {
        height: 2.5px;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ===== TABLET STYLES (769px - 1024px) ===== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .nav-list {
        gap: 1.5rem;
    }
    
    .nav-item a {
        font-size: 0.95rem;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
}

/* Fix for very small devices */
@media screen and (max-width: 320px) {
    .logo h1 {
        font-size: 1rem;
    }
    
    .nav-menu {
        width: 90%;
    }
}
/* ===== CATEGORY DROPDOWN ===== */

.nav-item.dropdown {
    position: relative;
}

/* Hidden by default */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    width: 220px;
    display: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
    z-index: 1000;
}

/* Dropdown items */
.dropdown-menu li {
    list-style: none;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 15px;
    color: var(--dark-text);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu li a:hover {
    background: var(--light-bg);
    color: var(--secondary-color);
}

/* Desktop hover */
@media (min-width: 769px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Mobile dropdown */
@media (max-width: 768px) {

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    .dropdown-menu li a {
        padding-left: 30px;
        background: #fafafa;
    }
}
.product-description {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0;
    line-height: 1.4;
}
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}