/* 前台样式 - 直角、极简、硬朗风格 */

/* 全局样式 */
* {
    border-radius: 0 !important;
}

body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 0 10px 10px;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo .logoimg {
    height: 80px;
    width: 80px;
    vertical-align: middle;
    background-image: url('/images/logo.png');
    background-size: cover;
    background-position: center;
}

.nav-links {
    display: flex;
    gap: 20px;
}

/* 确保dropdown文字垂直居中 */
.dropdown summary {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: var(--pico-font-size);
}

/* 确保dropdown中的li标签正确显示 */
.dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown ul li {
    margin: 0;
}

.dropdown ul li a {
    display: block;
    padding: 0.25rem 1rem;
    text-decoration: none;
}

/* 响应式导航 */
.responsive-nav {
    order: 1;
}

.search-container {
    order: 3;
    width: 100%;
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.search-container form {
    display: flex;
    width: 100%;
}

.search-container input {
    flex: 1;
    margin-bottom: 0;
    border-radius: var(--pico-border-radius)!important;
}

.dropdown:last-child {
    order: 4;
}

/* 移动端样式 */
@media (max-width: 767px) {
    /* 导航菜单只显示图标 */
    .responsive-nav summary {
        font-size: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: auto;
        padding: 0 1rem;
        height: 40px;
        position: relative;
        z-index: 10;
    }
    
    .responsive-nav summary::before {
        content: '☰';
        font-size: 1.5rem;
    }
    
    .responsive-nav summary::after {
        content: '▼';
        font-size: 0.8rem;
        margin-left: 10px;
    }
    
    /* 确保展开后图标仍然可见 */
    .responsive-nav[open] summary {
        background-color: #fff;
        border: 1px solid #000;
    }
    
    /* 搜索框在同一行显示 */
    .search-container {
        flex: 1;
        max-width: none;
        margin: 0 10px;
    }
}

/* 平板端样式 */
@media (min-width: 768px) and (max-width: 991px) {
    nav {
        flex-wrap: nowrap;
    }
    
    .responsive-nav {
        display: block;
        margin-right: auto;
    }
    
    .responsive-nav summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
    }
    
    .responsive-nav summary::after {
        content: '▼';
        font-size: 0.8rem;
        margin-left: 10px;
    }
    
    .search-container {
        order: 2;
        width: 100%;
        margin: 0 10px;
        flex: 1;
        max-width: none;
    }
    
    .dropdown:last-child {
        order: 3;
    }
}

/* 桌面端样式 */
@media (min-width: 992px) {
    nav {
        flex-wrap: nowrap;
    }
    
    .responsive-nav {
        display: block;
        margin-right: auto;
    }
    
    .responsive-nav summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
    }
    
    .responsive-nav summary::after {
        content: '▼';
        font-size: 0.8rem;
        margin-left: 10px;
    }
    
    .search-container {
        order: 2;
        width: 100%;
        margin: 0 20px;
        flex: 1;
        max-width: none;
    }
    
    .dropdown:last-child {
        order: 3;
    }
}

/* 商品列表样式 */
section {
    margin-bottom: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border: 2px solid #000;
    padding: 14px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid #000;
}

.product-card h3 {
    margin-top: 10px;
    margin-bottom: 5px;
}

.product-card .price {
    font-weight: bold;
    margin: 10px 0;
}

.product-card .brief {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.product-card:hover {
    border: 2px solid #000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

/* 商品详情页样式 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.product-image {
    border: 1px solid #000;
    padding: 10px;
}

.product-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: 1px solid #000;
}

.product-info {
    border: 1px solid #000;
    padding: 20px;
}

.product-info h1 {
    margin-top: 0;
    margin-bottom: 20px;
}

.code {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.product-info .price {
    font-size: 1.5em;
    font-weight: bold;
    margin: 20px 0;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #000;
}

.product-content {
    margin-top: 40px;
    border: 1px solid #000;
    padding: 20px;
}

.product-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* 响应式商品列表 */
@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card img {
        height: 150px;
    }

    .logo .logoimg {
        height: 60px;
        width: 60px;
        background-image: url('/images/logo_2.png');
        background-size: cover;
        background-position: center;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 响应式商品详情页 */
@media (max-width: 767px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-image img {
        height: 300px;
    }
    
    .product-info h1 {
        font-size: 1.5em;
    }
    
    .product-info .price {
        font-size: 1.2em;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .product-image img {
        height: 350px;
    }
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 5px 15px;
    border: 1px solid #000;
    text-decoration: none;
}

/* 分类链接样式 */
.category-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.category-link:hover {
    text-decoration: underline;
}

/* 已出售标签样式 */
.sold-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffe6e6;
    padding: 5px 10px;
    border: 1px solid #ff0000;
    font-size: 12px;
}

.sold-badge {
    background-color: #ffe6e6;
    padding: 10px;
    border: 1px solid #ff0000;
    margin: 10px 0;
}

/* 商品详情页样式 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.product-images {
    border: 1px solid #000;
    padding: 10px;
}

.product-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: 1px solid #000;
    margin-bottom: 10px;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid #000;
    cursor: pointer;
    opacity: 0.6;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    opacity: 1;
}

.product-info {
    border: 1px solid #000;
    padding: 20px;
}

.product-info h1 {
    margin-top: 0;
    margin-bottom: 20px;
}

.product-info .code {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.product-info .price {
    font-size: 1.5em;
    font-weight: bold;
    margin: 20px 0;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #000;
}

.product-content {
    margin-top: 40px;
    border: 1px solid #000;
    padding: 20px;
}

.product-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* 响应式商品详情页 */
@media (max-width: 767px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-image img {
        height: 300px;
    }
    
    .product-info h1 {
        font-size: 1.5em;
    }
    
    .product-info .price {
        font-size: 1.2em;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .product-image img {
        height: 350px;
    }
}



/* 面包屑导航样式 */
[aria-label="breadcrumb"] {
    
}

/* 响应式面包屑导航 */
@media (max-width: 767px) {
    [aria-label="breadcrumb"] ul {
        font-size: 0.9em;
    }
}

/* 底部样式 */
footer {
    border-top: 2px solid #000;
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
}

.search-container{
    display: flex;
    justify-content: center;
}

.search-container input{
    margin-bottom: 0;
    border-radius: var(--pico-border-radius)!important;
}