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

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --secondary: #14b8a6;
    --danger: #ef4444;
    --success: #059669;
    --warning: #f59e0b;
    --light: #f5f5f5;
    --border: #e5e7eb;
    --text: #333;
    --text-light: #666;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f9fafb;
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Header Top */
.header-top {
    background: var(--primary);
    color: white;
    padding: 10px 0;
    font-size: 13px;
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
}

/* Header Main */
header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.search-box {
    flex: 1;
    display: flex;
    gap: 10px;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.search-box button {
    padding: 10px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--primary);
}

.cart-link {
    position: relative;
    font-size: 20px;
}

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

/* Main Content */
main {
    flex: 1;
}

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

/* Footer */
footer {
    background: #1f2937;
    color: white;
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    margin-bottom: 8px;
    color: #d1d5db;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid #374151;
    text-align: center;
    color: #9ca3af;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light);
    color: var(--text);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

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

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

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th {
    background: #f3f4f6;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: #f9fafb;
}

/* Messages */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #7f1d1d;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Admin */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--primary);
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar h2 {
    margin-bottom: 30px;
    font-size: 20px;
}

.admin-sidebar a {
    display: block;
    padding: 12px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--primary-dark);
}

.admin-main {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
    background: #f9fafb;
}

.admin-title {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-main {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-box {
        max-width: 100%;
        order: 3;
        flex-basis: 100%;
    }

    .header-nav {
        gap: 15px;
        font-size: 14px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .header-top-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .header-nav {
        gap: 10px;
    }

    .header-nav a {
        font-size: 12px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
