/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-left, .header-right {
    flex: 1;
}

.header-center {
    flex: 2;
    text-align: center;
}

.header-search form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.header-search input[type="search"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.header-search button {
    padding: 0.5rem 1rem;
    background: var(--primary-color, #333);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.header-account a, .header-cart a {
    color: #333;
    text-decoration: none;
    margin-left: 1rem;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color, #007cba);
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
}

.main-navigation {
    margin-top: 1rem;
    text-align: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

/* Sticky header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Top bar */
.top-bar {
    background: #f5f5f5;
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    background: #f5f5f5;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-widgets .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-copyright {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #ddd;
    margin-top: 2rem;
}

/* Product Grid - Daraz Style */
.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
}

.product {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.product:hover {
    border-color: var(--hover-border-color, #0d9489);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
}

.product-image img {
    max-width: 100%;
    height: auto;
}

.product-details {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 10px;
    color: var(--product-text-color, #000);
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-rating {
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.star-rating {
    display: inline-block;
    margin-right: 5px;
    color: #ccc;
}

.star-rating span:before {
    color: var(--rating-star-color, #ffc107);
}

.price {
    margin-bottom: 0;
    font-size: 18px;
    font-weight: 600;
}

.price del {
    color: var(--regular-price-color, #999);
    font-size: 14px;
    font-weight: normal;
    margin-right: 5px;
}

.price ins {
    color: var(--sale-price-color, #30b6bf);
    text-decoration: none;
}

.onsale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--sale-badge-bg, #c90620);
    color: var(--sale-badge-text, #fff);
    padding: 5px 10px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-widgets .container {
        grid-template-columns: 1fr;
    }
    .header-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Simple grid system */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container { max-width: 540px; }
}
@media (min-width: 768px) {
    .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 15px; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 15px; }
.col-lg-3 { flex: 0 0 25%; max-width: 25%; }
.col-lg-9 { flex: 0 0 75%; max-width: 75%; }

@media (max-width: 767px) {
    .col-md-4, .col-md-8 { flex: 0 0 100%; max-width: 100%; }
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    text-align: center;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}
.pagination .current {
    background: var(--primary-color, #333);
    color: #fff;
    border-color: var(--primary-color, #333);
}

/* Button */
.button, .read-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--button-bg, #333);
    color: var(--button-text, #fff);
    text-decoration: none;
    border-radius: 4px;
}