:root {
    --primary-color: #f57224; /* Daraz Orange */
    --primary-hover: #d0611e;
    --secondary-color: #2e2e54;
    --background-color: #f5f5f5;
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #757575;
    --border-color: #eff0f5;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 16px rgba(0,0,0,0.15);
    --font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* Header */
header {
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.top-bar {
    background-color: #f5f5f5;
    font-size: 12px;
    padding: 5px 0;
    border-bottom: 1px solid #e2e2e2;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.top-bar a {
    color: var(--secondary-color);
}

.top-bar a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.main-header {
    padding: 15px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.search-bar {
    flex: 1;
    display: flex;
    background: #eff0f5;
    border-radius: var(--radius);
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
}

.search-bar button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: var(--primary-hover);
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon {
    font-size: 24px;
    color: var(--secondary-color);
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nav Menu used for Categories or Actions */
nav {
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    padding: 10px 0;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    margin-top: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    height: 350px;
    background: linear-gradient(135deg, #f57224 0%, #ff9f43 100%);
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-content {
    padding: 50px;
    max-width: 600px;
    animation: fadeIn 1s ease-in-out;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--white);
    color: var(--primary-color);
    font-weight: 700;
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
}

/* Section Titles */
.section-title {
    margin: 40px 0 20px;
    font-size: 22px;
    color: #424242;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.view-all {
    font-size: 14px;
    color: var(--primary-color);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f9f9f9;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 40px; /* Limit lines */
    overflow: hidden;
    color: #212121;
}

.product-price {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: auto;
}

.add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
    border-radius: 4px;
}

.add-to-cart-btn:hover {
    background: var(--primary-hover);
}

/* Authentication Forms */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Cart & Checkout tables */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.cart-table th, .cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #fafafa;
    font-weight: 600;
}

.cart-summary {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 400px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-total {
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-color);
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utilities */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-danger { color: #e74c3c; }
.text-success { color: #2ecc71; }

/* Responsive */
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 15px; }
    .search-bar { width: 100%; }
    .nav-links { overflow-x: auto; white-space: nowrap; padding-bottom: 5px; }
    .hero { height: auto; text-align: center; }
    .hero-content { padding: 30px; }
    .cart-summary { width: 100%; }
}
