/* Main CSS - DO NOT define CSS variables here, they are in theme.css */
/* This file imports after theme.css and contains component styles only */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-weight: 600;
}

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

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    font-weight: 600;
}

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

.btn-success {
    background: var(--btn-success-bg);
    color: var(--btn-success-text);
    font-weight: 600;
}

.btn-success:hover {
    background: var(--btn-success-hover);
    color: var(--btn-success-text);
}

.btn-danger {
    background: var(--btn-danger-bg);
    color: var(--btn-danger-text);
    font-weight: 600;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--text-dark);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-dark);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
    transition: color 0.3s;
}

.btn-icon:hover {
    color: var(--primary);
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

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

.nav-links a:hover {
    color: var(--primary);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--error);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.product-shop {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.stars {
    color: #fbbf24;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price-old {
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-add-cart {
    flex: 1;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-weight: 600;
    color: var(--text);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 0.5rem;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: var(--bg);
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3 {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

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

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
