/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* CSS Variables for Theme */
:root {
    --primary-color: #f85606; /* Daraz Orange */
    --primary-hover: #d04000;
    --secondary-color: #2e2e2e;
    --background-light: #f5f5f5;
    --text-color: #333;
    --text-light: #757575;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}

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

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

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

/* Header */
.top-header {
    background-color: var(--background-light);
    font-size: 12px;
    padding: 5px 0;
    color: var(--text-light);
}

.top-header .container {
    display: flex;
    justify-content: space-between;
}

.top-header-links a {
    margin-left: 15px;
}

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

.main-header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
    background-color: var(--background-light);
}

.search-bar button {
    padding: 0 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    position: relative;
    cursor: pointer;
}

.icon-item i {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.icon-item:hover i, .icon-item:hover {
    color: var(--primary-color);
}

.badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Navbar */
.navbar {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.navbar ul {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.navbar ul li a {
    display: block;
    padding: 15px 0;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar ul li a:hover::after {
    width: 100%;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: auto;
}

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

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: #ccc;
}

/* Form Styles */
.form-container {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

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

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.product-image {
    height: 220px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.product-card:hover .add-to-cart-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.alert-error {
    background-color: #fdecea;
    color: #e53935;
    border: 1px solid #f8bbd0;
}

.alert-success {
    background-color: #e8f5e9;
    color: #43a047;
    border: 1px solid #c8e6c9;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 15px;
    }
    
    .navbar ul {
        flex-wrap: wrap;
        gap: 15px;
    }
}
