tesr / styles.css
abeea's picture
Upload 6 files
3a74bdf verified
Raw
History Blame Contribute Delete
13.9 kB
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #6366f1;
--secondary-color: #8b5cf6;
--accent-color: #ec4899;
--dark-color: #1f2937;
--light-color: #f3f4f6;
--border-color: #e5e7eb;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-color: #374151;
--text-light: #6b7280;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
color: var(--text-color);
background-color: #fff;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Pages */
.page {
display: none;
min-height: 100vh;
}
.page.active {
display: block;
}
/* Landing Page */
.landing-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
padding: 20px;
}
.landing-content {
text-align: center;
color: white;
max-width: 600px;
}
.landing-content h1 {
font-size: 3.5rem;
margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.tagline {
font-size: 1.3rem;
margin-bottom: 3rem;
opacity: 0.9;
}
.landing-buttons {
display: flex;
gap: 1rem;
justify-content: center;
margin-bottom: 3rem;
flex-wrap: wrap;
}
.tracking-section {
background: rgba(255,255,255,0.1);
backdrop-filter: blur(10px);
padding: 2rem;
border-radius: 12px;
margin-top: 2rem;
}
.tracking-section h3 {
margin-bottom: 1rem;
}
.tracking-form {
display: flex;
gap: 0.5rem;
max-width: 400px;
margin: 0 auto;
}
/* Login Page */
.login-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--light-color);
}
.login-box {
background: white;
padding: 3rem;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
width: 100%;
max-width: 400px;
}
.login-box h2 {
margin-bottom: 2rem;
text-align: center;
color: var(--dark-color);
}
/* Header */
.header {
background: white;
border-bottom: 1px solid var(--border-color);
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
}
.header-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
.admin-header {
background: var(--dark-color);
color: white;
}
.admin-header .logo {
color: white;
}
/* Buttons */
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.btn-primary {
background: var(--primary-color);
color: white;
}
.btn-primary:hover {
background: #4f46e5;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
background: white;
color: var(--text-color);
border: 2px solid var(--border-color);
}
.btn-secondary:hover {
background: var(--light-color);
border-color: var(--text-color);
}
.btn-accent {
background: var(--accent-color);
color: white;
}
.btn-accent:hover {
background: #db2777;
}
.btn-success {
background: var(--success-color);
color: white;
}
.btn-danger {
background: var(--danger-color);
color: white;
}
.btn-icon {
position: relative;
}
.badge {
background: var(--danger-color);
color: white;
padding: 0.2rem 0.5rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: bold;
}
.full-width {
width: 100%;
justify-content: center;
}
/* Inputs */
.input {
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: 8px;
font-size: 1rem;
width: 100%;
transition: border-color 0.3s;
}
.input:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
textarea.input {
resize: vertical;
font-family: inherit;
}
/* Form */
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: var(--text-color);
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
/* Filters */
.filters {
display: flex;
gap: 1rem;
margin: 2rem 0;
flex-wrap: wrap;
}
.filters .input {
flex: 1;
min-width: 200px;
}
/* Products Grid */
.products-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 2rem;
margin-bottom: 3rem;
}
.product-card {
background: white;
border: 1px solid var(--border-color);
border-radius: 12px;
overflow: hidden;
transition: transform 0.3s, box-shadow 0.3s;
cursor: pointer;
}
.product-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.product-image {
width: 100%;
height: 250px;
background: var(--light-color);
display: flex;
align-items: center;
justify-content: center;
font-size: 4rem;
color: var(--text-light);
}
.product-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.product-info {
padding: 1.5rem;
}
.product-name {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--dark-color);
}
.product-category {
display: inline-block;
background: var(--light-color);
color: var(--text-light);
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.85rem;
margin-bottom: 0.75rem;
}
.product-description {
color: var(--text-light);
margin-bottom: 1rem;
font-size: 0.95rem;
}
.product-price {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
}
.product-variants {
margin-top: 1rem;
}
.variant-options {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.5rem;
}
.variant-btn {
padding: 0.5rem 1rem;
border: 2px solid var(--border-color);
background: white;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s;
font-size: 0.9rem;
}
.variant-btn:hover {
border-color: var(--primary-color);
}
.variant-btn.selected {
border-color: var(--primary-color);
background: var(--primary-color);
color: white;
}
.variant-btn.out-of-stock {
opacity: 0.5;
cursor: not-allowed;
}
/* Pagination */
.pagination {
display: flex;
justify-content: center;
gap: 0.5rem;
margin: 2rem 0;
}
.pagination button {
padding: 0.5rem 1rem;
border: 1px solid var(--border-color);
background: white;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s;
}
.pagination button:hover:not(:disabled) {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.pagination button.active {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.pagination button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Admin Tabs */
.admin-tabs {
display: flex;
gap: 0.5rem;
margin: 2rem 0;
border-bottom: 2px solid var(--border-color);
}
.tab-btn {
padding: 1rem 2rem;
border: none;
background: none;
cursor: pointer;
font-size: 1rem;
font-weight: 500;
color: var(--text-light);
position: relative;
transition: color 0.3s;
}
.tab-btn:hover {
color: var(--primary-color);
}
.tab-btn.active {
color: var(--primary-color);
}
.tab-btn.active::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
right: 0;
height: 2px;
background: var(--primary-color);
}
.admin-tab {
display: none;
}
.admin-tab.active {
display: block;
}
/* Admin Actions */
.admin-actions {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.admin-actions .input {
flex: 1;
min-width: 200px;
}
/* Admin List */
.admin-list {
background: white;
border: 1px solid var(--border-color);
border-radius: 12px;
overflow: hidden;
}
.admin-item {
padding: 1.5rem;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
transition: background 0.3s;
}
.admin-item:hover {
background: var(--light-color);
}
.admin-item:last-child {
border-bottom: none;
}
.admin-item-info {
flex: 1;
}
.admin-item-title {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--dark-color);
}
.admin-item-meta {
color: var(--text-light);
font-size: 0.9rem;
}
.admin-item-actions {
display: flex;
gap: 0.5rem;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
}
.status-pending {
background: #fef3c7;
color: #92400e;
}
.status-processing {
background: #dbeafe;
color: #1e40af;
}
.status-shipped {
background: #e0e7ff;
color: #3730a3;
}
.status-delivered {
background: #d1fae5;
color: #065f46;
}
.status-cancelled {
background: #fee2e2;
color: #991b1b;
}
/* Modal */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
animation: fadeIn 0.3s;
}
.modal.active {
display: flex;
align-items: center;
justify-content: center;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.modal-content {
background-color: white;
padding: 2rem;
border-radius: 12px;
width: 90%;
max-width: 500px;
max-height: 90vh;
overflow-y: auto;
position: relative;
animation: slideUp 0.3s;
}
@keyframes slideUp {
from { transform: translateY(50px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.modal-content.large {
max-width: 700px;
}
.close {
position: absolute;
right: 1.5rem;
top: 1.5rem;
font-size: 2rem;
font-weight: bold;
color: var(--text-light);
cursor: pointer;
transition: color 0.3s;
}
.close:hover {
color: var(--dark-color);
}
/* Cart */
.cart-items {
margin: 1.5rem 0;
}
.cart-item {
display: flex;
gap: 1rem;
padding: 1rem;
border: 1px solid var(--border-color);
border-radius: 8px;
margin-bottom: 1rem;
}
.cart-item-info {
flex: 1;
}
.cart-item-name {
font-weight: 600;
margin-bottom: 0.5rem;
}
.cart-item-variant {
color: var(--text-light);
font-size: 0.9rem;
}
.cart-item-quantity {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.5rem;
}
.quantity-btn {
width: 30px;
height: 30px;
border: 1px solid var(--border-color);
background: white;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
}
.quantity-btn:hover {
background: var(--light-color);
}
.cart-item-price {
font-weight: 600;
color: var(--primary-color);
}
.cart-footer {
border-top: 2px solid var(--border-color);
padding-top: 1rem;
margin-top: 1rem;
}
.cart-total {
display: flex;
justify-content: space-between;
font-size: 1.3rem;
margin-bottom: 1rem;
}
/* Checkout */
.checkout-summary {
background: var(--light-color);
padding: 1.5rem;
border-radius: 8px;
margin: 1.5rem 0;
}
.summary-row {
display: flex;
justify-content: space-between;
margin-bottom: 0.75rem;
}
.summary-row.total {
border-top: 2px solid var(--border-color);
padding-top: 0.75rem;
margin-top: 0.75rem;
font-size: 1.2rem;
}
/* Loading */
.loading {
text-align: center;
padding: 3rem;
color: var(--text-light);
}
/* Empty State */
.empty-state {
text-align: center;
padding: 3rem;
color: var(--text-light);
}
.empty-state-icon {
font-size: 4rem;
margin-bottom: 1rem;
}
/* Responsive */
@media (max-width: 768px) {
.landing-content h1 {
font-size: 2.5rem;
}
.landing-buttons {
flex-direction: column;
}
.form-row {
grid-template-columns: 1fr;
}
.products-grid {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 1rem;
}
.admin-item {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
}
.modal-content {
width: 95%;
padding: 1.5rem;
}
.header .container {
flex-direction: column;
gap: 1rem;
}
}
/* Utility Classes */
.icon {
font-size: 1.2rem;
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }