* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --dark: #1a1a1a;
    --dark-light: #2a2a2a;
    --dark-lighter: #3a3a3a;
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --orange: #f97316;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background-color: var(--dark);
    color: var(--text-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background-color: var(--dark-light);
    border-bottom: 1px solid var(--dark-lighter);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                      url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-white);
}

.logo-primary {
    color: var(--primary);
}

.account-btn-icon {
    padding: 12px;
    background-color: transparent;
    border-radius: 8px;
    color: var(--text-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.account-btn-icon:hover {
    opacity: 0.7;
}

.cart-icon-header {
    position: relative;
    padding: 12px;
    background-color: var(--dark-lighter);
    border-radius: 8px;
    color: var(--text-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.cart-icon-header:hover {
    background-color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.header-search {
    display: flex;
    gap: 8px;
    padding-bottom: 16px;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background-color: var(--dark-lighter);
    border: 1px solid var(--dark-lighter);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 16px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-btn {
    padding: 12px 20px;
    background-color: var(--dark-lighter);
    border: none;
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.filter-btn:hover {
    background-color: var(--primary);
    color: white;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: inline;
    }
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 48px 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 16px;
}

.hero .primary-text {
    color: var(--primary);
}

.hero p {
    font-size: 18px;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Category Tabs */
.category-section {
    margin-bottom: 24px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 10px 16px;
    background-color: transparent;
    border: 1px solid var(--primary);
    border-radius: 20px;
    color: var(--text-white);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

.category-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Products Grid */
.products-section {
    margin-bottom: 32px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.products-header h2 {
    font-size: 24px;
}

.product-count {
    color: var(--text-gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1536px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Product Card */
.product-card {
    background-color: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--dark-lighter);
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--dark-lighter);
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
}

.product-price-unit {
    color: var(--text-gray);
    font-size: 12px;
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
}

/* Footer */
.footer {
    background-color: var(--dark-light);
    border-top: 1px solid var(--dark-lighter);
    padding: 48px 0 24px;
    margin-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    color: var(--text-gray);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact i {
    color: var(--primary);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--dark-lighter);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--primary);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--dark-lighter);
    color: var(--text-gray);
    font-size: 14px;
}

/* Detail Page */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--text-white);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.detail-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 12px;
    background-color: var(--dark-lighter);
}

.detail-info h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.detail-price {
    font-size: 32px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 32px;
}

.detail-section {
    background-color: var(--dark-light);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--dark-lighter);
}

.detail-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.detail-list {
    list-style: none;
}

.detail-list li {
    padding: 8px 0;
    color: var(--text-gray);
    display: flex;
    align-items: start;
    gap: 12px;
}

.detail-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
}

.detail-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn-large {
    flex: 1;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-image {
        height: 400px;
    }
}

/* Cart Page */
.cart-item {
    background-color: var(--dark-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--dark-lighter);
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-item-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    background-color: var(--dark-lighter);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-white);
}

.cart-item-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    background-color: var(--dark-lighter);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: var(--primary);
}

.qty-value {
    font-size: 16px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    color: var(--text-white);
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.remove-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.cart-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-light);
    border-top: 1px solid var(--dark-lighter);
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 50;
}

.cart-bottom-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cart-total {
    font-size: 24px;
    color: var(--primary);
    font-weight: bold;
}

.cart-total-label {
    font-size: 12px;
    color: var(--text-gray);
    display: block;
    margin-bottom: 4px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-gray);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--dark-lighter);
    border: 1px solid var(--dark-lighter);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 16px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920');
    background-size: cover;
    background-position: center;
}

.login-box {
    background-color: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--dark-lighter);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 16px;
}

.mt-4 {
    margin-top: 16px;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-gray);
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 24px;
}

