/* Main Style CSS for frontend */

/* Homepage */
.banner {
    width: 100%;
    height: 400px;
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden;
}

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

.category-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6600;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.category-item {
    background: #fff;
    padding: 15px;
    text-align: center;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.category-item:hover {
    border-color: #ff6600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
}

.category-item .name {
    font-size: 14px;
    color: #333;
}

/* Product Grid */
.product-section {
    margin-bottom: 30px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-item {
    background: #fff;
    padding: 15px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.product-item:hover {
    border-color: #ff6600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-item .image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.product-item .name {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    height: 40px;
    overflow: hidden;
}

.product-item .price {
    font-size: 18px;
    color: #ff6600;
    font-weight: bold;
}

.product-item .original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

/* Category Page */
.category-header {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.category-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.filter-list {
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
}

.filter-item {
    display: inline-block;
    margin-right: 20px;
}

.filter-item a {
    color: #666;
    padding: 5px 10px;
}

.filter-item a.active {
    color: #ff6600;
    font-weight: bold;
}

.list-sort {
    padding: 15px 0;
}

.list-sort a {
    margin-right: 20px;
    color: #666;
}

.list-sort a.active {
    color: #ff6600;
}

/* Product Detail Page */
.product-detail {
    background: #fff;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.product-images {
    float: left;
    width: 450px;
}

.main-image {
    width: 450px;
    height: 450px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e5e5e5;
}

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

.thumbnail-list {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #e5e5e5;
    cursor: pointer;
    overflow: hidden;
}

.thumbnail.active {
    border-color: #ff6600;
}

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

.product-info {
    margin-left: 500px;
}

.product-info h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.product-price {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
}

.product-price .price {
    font-size: 28px;
    color: #ff6600;
    font-weight: bold;
}

.product-price .original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.product-attrs {
    margin-bottom: 20px;
}

.attr-item {
    margin-bottom: 15px;
}

.attr-item label {
    display: inline-block;
    width: 80px;
    color: #666;
}

.attr-item select, .attr-item input {
    padding: 5px 10px;
    border: 1px solid #e5e5e5;
    min-width: 200px;
}

.quantity-input {
    width: 60px;
    text-align: center;
}

.btn-add-cart {
    padding: 12px 40px;
    font-size: 18px;
    background: #ff6600;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.btn-buy-now {
    padding: 12px 40px;
    font-size: 18px;
    background: #d9534f;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 10px;
}

/* Cart Page */
.cart-table {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.cart-table th {
    padding: 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
}

.cart-product {
    display: flex;
    align-items: center;
}

.cart-product img {
    width: 80px;
    height: 80px;
    margin-right: 15px;
}

.cart-product .name {
    font-size: 14px;
    color: #333;
}

.quantity-control {
    display: flex;
    align-items: center;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    cursor: pointer;
}

.quantity-control input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #e5e5e5;
    border-left: none;
    border-right: none;
}

.cart-summary {
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e5e5;
    text-align: right;
}

.cart-summary .total {
    font-size: 24px;
    color: #ff6600;
    font-weight: bold;
}

.btn-checkout {
    padding: 12px 50px;
    font-size: 18px;
    background: #ff6600;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 20px;
}

/* Login/Register Pages */
.auth-container {
    width: 500px;
    margin: 50px auto;
    background: #fff;
    padding: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.auth-container h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
}

.form-group input {
    width: 100%;
    height: 40px;
    border: 1px solid #e5e5e5;
    padding: 0 10px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #ff6600;
    outline: none;
}

.btn-submit {
    width: 100%;
    height: 44px;
    background: #ff6600;
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #ff6600;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #e5e5e5;
    color: #333;
}

.pagination a:hover {
    border-color: #ff6600;
    color: #ff6600;
}

.pagination .current {
    background: #ff6600;
    color: #fff;
    border-color: #ff6600;
}
