:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--secondary);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.brand-text h1 {
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0;
}

.brand-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
    color: white;
    text-align: center;
    position: relative;
    padding: 100px 0 150px;
    overflow: hidden;
}

.hero h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-bg svg {
    position: relative;
    display: block;
    width: calc(150% + 1.3px);
    height: 90px;
}

.wave-bg .shape-fill {
    fill: var(--background);
}

/* Home Page Specific */
.home-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.home-hero {
    position: relative;
    padding: 140px 0 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.2) 0%, transparent 50%),
        radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.home-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    color: white;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-size: 1rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--background);
    position: relative;
    z-index: 5;
    margin-top: -60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 24px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--secondary);
}

.feature-card p {
    color: var(--text-muted);
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    margin-top: -60px;
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
}

/* Sidebar Filters */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.filter-box,
.stats-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.filter-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-reset:hover {
    color: var(--primary);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

select {
    width: 100%;
    appearance: none;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

select:disabled {
    background-color: var(--surface-hover);
    cursor: not-allowed;
    opacity: 0.7;
}

.stats-box {
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Products Section */
.products-section {
    display: flex;
    flex-direction: column;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: var(--surface);
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.products-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.view-options {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.view-btn.active,
.view-btn:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.products-grid.hidden {
    display: none;
}

/* List View Modifiers */
.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    flex-direction: row;
    align-items: stretch;
}

.products-grid.list-view .card-header {
    width: 250px;
    border-bottom: none;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.products-grid.list-view .card-body {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.products-grid.list-view .spec-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.products-grid.list-view .spec-item {
    background: var(--surface-hover);
    padding: 6px 12px;
    border-radius: 8px;
}

.products-grid.list-view .card-footer {
    width: 200px;
    border-top: none;
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Product Card */
.product-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    animation: fadeIn 0.5s ease forwards;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: var(--surface-hover);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0;
    color: var(--secondary);
}

.card-type-badge {
    background: var(--primary-dark);
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.card-body {
    padding: 16px;
    flex-grow: 1;
}

.spec-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spec-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.spec-icon {
    width: 24px;
    color: var(--text-muted);
    text-align: center;
}

.spec-val {
    font-weight: 500;
    color: var(--text-main);
}

.card-footer {
    padding: 16px;
    background: var(--surface-hover);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-code {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-detail {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-detail:hover {
    background: var(--primary-dark);
}

/* Loading & Empty States */
.loading-state,
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.loading-state.hidden,
.no-results.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(14, 165, 233, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.page-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-hover);
}

.page-indicator {
    font-weight: 600;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--secondary);
    color: white;
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info-grid h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-info-grid h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-info-grid p {
    color: #cbd5e1;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-info-grid p i {
    color: var(--primary);
    margin-top: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.9rem;
}

/* How to Order Banner */
.how-to-order-banner {
    grid-column: 1 / -1;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 40px;
}

.howto-content {
    flex: 1;
}

.howto-content h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.howto-content h3 i {
    color: var(--primary);
}

.howto-steps {
    list-style: none;
    margin-bottom: 24px;
}

.howto-steps li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    color: var(--text-main);
    line-height: 1.5;
}

.howto-steps li::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary);
    font-size: 0.85rem;
}

.howto-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.howto-image {
    width: 300px;
    flex-shrink: 0;
    background: #f1f5f9;
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    text-align: center;
}

.howto-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Modals & Dashboard Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    transform: translateY(0);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-hover);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--secondary);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.w-100 {
    width: 100%;
}

.mt-3 {
    margin-top: 16px;
}

.error-msg {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 500;
}

.error-msg.hidden {
    display: none;
}

/* Floating Lock Button */
.admin-lock-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.1);
    color: var(--secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 90;
    opacity: 0.6;
}

.admin-lock-btn:hover {
    opacity: 1;
    background: var(--surface);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 70vh;
    min-height: 500px;
}

.dashboard-sidebar {
    width: 320px;
    padding: 24px;
    background: var(--surface-hover);
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.dashboard-sidebar h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.dashboard-main {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
    background: var(--surface);
}

.table-container {
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--surface-hover);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(14, 165, 233, 0.05);
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.action-btn.edit:hover {
    color: var(--primary);
}

.action-btn.delete:hover {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        margin-top: 0;
        padding-top: 24px;
    }

    .hero {
        padding: 60px 0 100px;
    }

    .how-to-order-banner {
        flex-direction: column;
        grid-column: 1 / -1;
    }

    .howto-image {
        width: 100%;
        max-width: 400px;
    }

    /* List View Responsive Override */
    .products-grid.list-view .product-card {
        flex-direction: column;
    }

    .products-grid.list-view .card-header,
    .products-grid.list-view .card-footer {
        width: 100%;
        border-right: none;
        border-left: none;
    }

    .products-grid.list-view .card-header {
        border-bottom: 1px solid var(--border);
        align-items: flex-start;
    }

    .products-grid.list-view .card-footer {
        border-top: 1px solid var(--border);
        flex-direction: row;
        justify-content: space-between;
    }
}