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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav {
    background: #2c3e50;
    color: white;
    padding: 0 20px;
}

.nav-container {
    max-width: none;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

.container {
    max-width: none;
    margin: 0 auto;
    padding: 30px 20px;
    flex: 1;
    width: 100%;
}

footer {
    background: #2c3e50;
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border-radius: 8px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    background: #ecf0f1;
    color: #333;
}

.btn-sm:hover {
    background: #d5dbdb;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}


.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.product-info h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.product-info h3 a:hover {
    color: #3498db;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 5px;
}

.category {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

/* Forms */
.form-container {
    max-width: 450px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
}

.form-footer {
    margin-top: 15px;
    font-size: 13px;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tables */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll table {
    min-width: 600px;
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Status badges */
.status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status.processing { background: #fff3cd; color: #856404; }
.status.shipped { background: #cce5ff; color: #004085; }
.status.delivered { background: #d4edda; color: #155724; }

/* Profile */
.profile-page {
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 30px;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}


.profile-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.profile-section h3 {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Product Detail */
.product-detail {
    display: flex;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.product-image-large {
    min-width: 300px;
    border-radius: 8px;
}

.product-detail-info h1 {
    margin-bottom: 10px;
}

.product-detail-info .description {
    margin: 15px 0;
    line-height: 1.6;
    color: #666;
}

.stock {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}

/* Reviews */
.reviews-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.reviews-section h2 {
    margin-bottom: 20px;
}

.review {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.review:last-child {
    border-bottom: none;
}

.review-header {
    margin-bottom: 8px;
}

.rating {
    color: #f39c12;
    margin-left: 10px;
}

.review-content {
    line-height: 1.5;
    color: #444;
}

.review-date {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Search */
.search-form {
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-input:focus {
    border-color: #3498db;
    outline: none;
}

.category-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.category-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #ecf0f1;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s;
}

.category-tag:hover {
    background: #d5dbdb;
}

/* Admin */
.admin-panel {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.admin-nav {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.message-card {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.message-header {
    margin-bottom: 10px;
}

.message-body {
    line-height: 1.6;
}

/* Track Order */
.track-form {
    max-width: 500px;
    margin-bottom: 30px;
}

.track-result pre {
    background: #2c3e50;
    color: #2ecc71;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}

/* Checkout */
.checkout-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    font-size: 18px;
}

.checkout-summary p {
    margin: 0;
}

/* Empty states */
.empty-cart,
.not-found {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart p,
.not-found p {
    color: #999;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Total row */
.total-row td {
    font-size: 16px;
}

/* H2 default spacing */
h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

h3 {
    color: #2c3e50;
}

/* Modal overlay & box */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.modal-box {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    z-index: 1000;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-box .form-group { margin-bottom: 12px; }
.modal-box label { display: block; font-weight: bold; margin-bottom: 3px; font-size: 13px; }
.modal-box input[type="text"],
.modal-box input[type="number"],
.modal-box select { width: 100%; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }

/* Responsive nav */
@media (max-width: 768px) {
    .nav-container { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .nav-links { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; justify-content: center; margin-top: 6px; }
    .nav-links a { margin-left: 0; font-size: 12px; padding: 4px 8px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-detail { flex-direction: column; }
    .profile-tabs { flex-wrap: wrap; }
}
