/* Jameel Minimart Store - Main Stylesheet */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Open+Sans:wght@400;500;600&display=swap');

/* CSS Variables */
:root {
    --primary-color: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary-color: #FF6F00;
    --secondary-dark: #E65100;
    --accent-color: #FFD54F;
    --bg-color: #FAFAFA;
    --text-primary: #212121;
    --text-secondary: #757575;
    --white: #FFFFFF;
    --error: #D32F2F;
    --success: #388E3C;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.875rem;
}

.header-main {
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.header-actions a:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.nav-menu {
    background: var(--primary-dark);
}

.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    display: block;
    padding: 15px 0;
    color: var(--white);
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Section Styles */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-secondary);
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-card .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.75rem;
    color: var(--white);
}

.category-card h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.category-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .placeholder {
    font-size: 3rem;
    color: #ccc;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: var(--transition);
    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.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 1.25rem;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-quantity button:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1.25rem;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-total span:last-child {
    color: var(--primary-color);
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 15px;
    color: #ddd;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Page Banner */
.page-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.875rem;
    opacity: 0.8;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Products Page */
.products-section {
    padding: 40px 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.products-filter {
    display: flex;
    gap: 15px;
    align-items: center;
}

.products-filter select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Product Detail Page */
.product-detail {
    padding: 40px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-detail-image {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.product-detail-category {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.product-detail-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.8;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.product-quantity label {
    font-weight: 600;
}

.product-quantity-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-quantity-input button {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.product-quantity-input button:hover {
    background: var(--primary-color);
    color: var(--white);
}

.product-quantity-input input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

/* Cart Page */
.cart-page {
    padding: 40px 0;
}

.cart-table {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.cart-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.cart-table .product-col {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-table .product-col img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.cart-table .quantity-col input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
}

.cart-table .total-col {
    font-weight: 700;
    color: var(--primary-color);
}

.cart-table .action-col button {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1.25rem;
}

.cart-summary {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 30px;
    max-width: 400px;
    margin-left: auto;
}

.cart-summary h3 {
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
}

.cart-summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    border-top: 2px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 15px;
}

.cart-summary-row.total span:last-child {
    color: var(--primary-color);
}

/* Checkout Page */
.checkout-page {
    padding: 40px 0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.checkout-form {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.checkout-form h3 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.order-summary {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    height: fit-content;
}

.order-summary h3 {
    margin-bottom: 25px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-details span {
    display: block;
}

.order-item-name {
    font-weight: 600;
}

.order-item-qty {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    margin-top: 15px;
    font-size: 1.25rem;
    font-weight: 700;
}

.order-total span:last-child {
    color: var(--primary-color);
}

/* Admin Styles */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--primary-dark);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 20px;
    background: var(--primary-color);
    text-align: center;
}

.admin-logo h2 {
    font-size: 1.25rem;
}

.admin-nav {
    padding: 20px 0;
}

.admin-nav ul li a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    transition: var(--transition);
}

.admin-nav ul li a:hover,
.admin-nav ul li a.active {
    background: rgba(255,255,255,0.1);
    border-left: 3px solid var(--accent-color);
}

.admin-nav ul li a i {
    margin-right: 10px;
    width: 20px;
}

.admin-main {
    margin-left: 250px;
    flex: 1;
    background: var(--bg-color);
}

.admin-header {
    background: var(--white);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.admin-content {
    padding: 30px;
}

.admin-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.admin-card h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.stat-icon.products { background: var(--primary-color); }
.stat-icon.orders { background: var(--secondary-color); }
.stat-icon.pending { background: var(--accent-color); color: var(--text-primary); }
.stat-icon.revenue { background: var(--success); }

.stat-info h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-info .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.admin-table tr:hover {
    background: #f9f9f9;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.pending { background: #FFF3E0; color: #E65100; }
.status-badge.processing { background: #E3F2FD; color: #1565C0; }
.status-badge.delivered { background: #E8F5E9; color: #2E7D32; }
.status-badge.cancelled { background: #FFEBEE; color: #C62828; }

/* Admin Forms */
.admin-form {
    max-width: 600px;
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.alert-success {
    background: #E8F5E9;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #FFEBEE;
    color: var(--error);
    border-left: 4px solid var(--error);
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid #E65100;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu a {
        padding: 12px 20px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-table {
        overflow-x: auto;
    }
    
    .cart-table table {
        min-width: 600px;
    }
    
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-main {
        margin-left: 200px;
    }
}

@media (max-width: 480px) {
    .header-actions a span {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-sidebar {
        width: 60px;
    }
    
    .admin-logo h2 {
        display: none;
    }
    
    .admin-nav ul li a span {
        display: none;
    }
    
    .admin-main {
        margin-left: 60px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
