/* CSS Reset & Variables */
:root {
    --jd-red: #f10215;
    --text-dark: #333;
    --text-secondary: #666;
    --text-light: #999;
    --bg-gray: #f4f4f4;
    --border-color: #e3e4e5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-secondary);
    font-size: 12px;
}

a {
    color: var(--text-secondary);
    text-decoration: none;
}

a:hover {
    color: var(--jd-red);
}

ul,
li {
    list-style: none;
}

/* Utilities */
.w {
    width: 1190px;
    margin: 0 auto;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

.style-red {
    color: var(--jd-red);
}

/* Shortcut Header */
.shortcut {
    height: 30px;
    line-height: 30px;
    background-color: #e3e4e5;
    border-bottom: 1px solid #ddd;
}

.shortcut li {
    float: left;
    margin: 0 5px;
}

.shortcut .spacer {
    color: #ccc;
    width: 1px;
    margin: 0 10px;
}

/* Main Header */
.header {
    height: 140px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.header .w {
    position: relative;
    height: 100%;
}

/* Logo Styling */
.logo a {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 32px;
    font-weight: bold;
    color: var(--jd-red);
    text-align: center;
    padding-top: 25px;
    line-height: 1.2;
    font-family: "Microsoft YaHei", sans-serif;
}

.logo-text span {
    display: block;
    font-size: 14px;
    color: #999;
    font-weight: normal;
    margin-top: -2px;
}

/* Navigation - Active State */
.navitems a {
    font-size: 15px;
    color: #333;
    font-weight: 700;
    text-decoration: none;
    padding-bottom: 5px;
    /* Space for border */
}

.navitems a:hover,
.navitems a.active {
    color: var(--jd-red);
}

.navitems a.active {
    border-bottom: 2px solid var(--jd-red);
}

/* Sidebar - Active Hover */
.sidebar li:hover a {
    color: var(--jd-red);
}

.logo {
    position: absolute;
    top: 10px;
    left: 0;
    width: 190px;
    height: 120px;
    background: #fff;
    box-shadow: 0 -10px 10px rgba(0, 0, 0, .05);
    /* Subtle shadow */
}

.search {
    position: absolute;
    top: 25px;
    left: 260px;
    width: 550px;
}

.search-form {
    border: 2px solid var(--jd-red);
    height: 36px;
    display: flex;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
}

.search-btn {
    width: 80px;
    background-color: var(--jd-red);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.search-hot {
    padding-top: 8px;
    font-size: 12px;
}

.search-hot a {
    margin-right: 10px;
    color: #999;
}

.shopping-cart {
    position: absolute;
    top: 25px;
    right: 80px;
    width: 130px;
    height: 35px;
    border: 1px solid #eee;
    background-color: #fff;
    text-align: center;
    line-height: 35px;
    color: var(--jd-red);
}

.shopping-cart .badg {
    position: absolute;
    top: 2px;
    left: 28px;
    height: 14px;
    line-height: 14px;
    color: #fff;
    background-color: var(--jd-red);
    padding: 0 5px;
    border-radius: 7px;
    font-size: 10px;
}


/* Navigation */
.nav-main {
    height: 40px;
    border-bottom: 1px solid var(--jd-red);
    background-color: #fff;
}

.nav-main .dropdown {
    float: left;
    width: 190px;
    height: 40px;
    background-color: var(--jd-red);
    color: #fff;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
    font-weight: bold;
}

.navitems {
    float: left;
    margin-left: 10px;
}

.navitems li {
    float: left;
    margin: 0 15px;
    line-height: 40px;
}

.navitems a {
    font-size: 15px;
    color: #333;
    font-weight: 700;
}

.navitems a:hover {
    color: var(--jd-red);
}

/* Main Content: Sidebar + Hero */
.main {
    margin-top: 10px;
    height: 480px;
    /* Fixed height for hero section */
    display: flex;
    margin-bottom: 20px;
}

.sidebar {
    width: 190px;
    height: 100%;
    background-color: #fefefe;
    color: #666;
    padding: 10px 0;
    margin-right: 10px;
}

.sidebar li {
    padding-left: 12px;
    height: 25px;
    /* Compact */
    line-height: 25px;
    overflow: hidden;
    font-size: 14px;
}

.sidebar li a {
    font-size: 14px;
}

.sidebar li:hover {
    background-color: #d9d9d9;
}

.hero-banner {
    flex: 1;
    /* Takes remaining space */
    position: relative;
    margin-right: 10px;
}

.slider-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 30px;
}

.slider-indicators span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    margin-right: 8px;
    cursor: pointer;
}

.slider-indicators span.active {
    background: #fff;
    width: 12px;
    height: 12px;
    margin-top: -1px;
}

.user-module {
    width: 190px;
    height: 100%;
    background: #fff;
}

.user-info {
    height: 120px;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.user-show {
    margin-top: 10px;
    font-size: 12px;
}

.user-show a {
    color: #333;
    margin: 0 5px;
}

.news {
    padding: 10px 15px;
}

.news-t {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.news-t h5 {
    font-size: 14px;
}

.news-t .more {
    font-size: 12px;
}

.news-list li {
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag {
    background: #fdefee;
    color: var(--jd-red);
    padding: 0 2px;
    margin-right: 5px;
    font-size: 12px;
}

/* Section Header */
.section-header {
    margin-top: 20px;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-align: center;
    position: relative;
}

.section-header h2::before,
.section-header h2::after {
    content: "";
    display: inline-block;
    width: 50px;
    height: 3px;
    background: #333;
    vertical-align: middle;
    margin: 0 20px;
}

/* Product Grid (Refined) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.product-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.product-card:hover {
    border-color: #e9e9e9;
    box-shadow: 0 12px 20px 0 rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}

.image-wrapper {
    width: 100%;
    padding: 5px;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.info-wrapper {
    padding: 15px;
    padding-top: 0;
}

.price-row {
    margin-bottom: 5px;
}

.currency {
    color: var(--jd-red);
    font-size: 16px;
    font-weight: bold;
}

.price {
    color: var(--jd-red);
    font-size: 24px;
    font-weight: bold;
}

.title {
    font-size: 14px;
    color: #666;
    line-height: 20px;
    height: 40px;
    /* 2 lines */
    overflow: hidden;
    margin-bottom: 10px;
    font-weight: normal;
}

.title:hover {
    color: var(--jd-red);
}

.bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.comment-count {
    color: #999;
    font-size: 12px;
}

.buy-btn {
    background-color: transparent;
    color: var(--jd-red);
    border: 1px solid var(--jd-red);
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
}

.buy-btn:hover {
    background-color: var(--jd-red);
    color: #fff;
}

/* Footer */
.footer {
    background-color: #f4f4f4;
    padding-top: 30px;
    margin-top: 50px;
    border-top: 1px solid #e3e4e5;
}

/* Service Icons Row */
.service {
    padding: 30px 0;
    border-bottom: 1px solid #e3e4e5;
    overflow: hidden;
}

.service ul {
    display: flex;
    justify-content: space-around;
}

.service li {
    display: flex;
    align-items: center;
}

.service h5 {
    width: 36px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border: 2px solid var(--jd-red);
    color: var(--jd-red);
    /* Placeholder style for icon */
    font-size: 18px;
    border-radius: 50%;
    float: left;
    margin-right: 10px;
}

.service p {
    font-size: 18px;
    font-weight: 700;
    color: #444;
}

/* Help Links */
.help {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
}

.help dl {
    width: 20%;
    padding-left: 40px;
}

.help dt {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
}

.help dd {
    font-size: 12px;
    line-height: 22px;
}

/* Copyright */
.copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e1e1e1;
    color: #999;
}

.copyright p {
    margin-bottom: 15px;
}