/* layout.css - 布局相关样式 */

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 120px;
}

.profile-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 120px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .main-container {
        padding: var(--space-md);
        padding-top: 120px;
        margin: var(--space-md);
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.order-confirm-detail {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .order-confirm-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(255, 107, 74, 0.2);
    transition: all var(--duration-normal) var(--ease-snappy);
}

.nav-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--duration-normal) var(--ease-snappy);
}

.category-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding: var(--space-sm) var(--space-xs);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    margin-bottom: 0;
    padding-top: var(--space-md);
    border-top: 2px solid var(--border-light);
    flex: 0 0 auto;
    min-height: 60px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 3px dashed var(--border-light);
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
    color: #1a1a1a;
    font-weight: var(--font-weight-bold);
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-black);
    padding-top: var(--space-lg);
    border-top: 3px solid var(--border-medium);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 3px solid var(--border-light);
}

.cart-item {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 2px solid var(--border-light);
    transition: all var(--duration-normal) var(--ease-snappy);
}

.cart-total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    margin-bottom: var(--space-xl);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}

.address-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.address-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.avatar-section {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
}

.item-card-detail {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff8f0;
    border-radius: 15px;
    border: 2px solid #e8e8e8;
    align-items: center;
    transition: all 0.3s;
}

.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-max);
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    transition: opacity var(--duration-slow) var(--ease-bounce);
}

.product-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-secondary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    min-width: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--bg-card);
}

.search-icon {
    position: absolute;
    left: var(--space-xl);
    color: var(--text-muted);
    font-size: 24px;
    transition: all var(--duration-normal) var(--ease-snappy);
    pointer-events: none;
}

.confirm-right-section {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.search-container {
    position: relative;
    margin-bottom: var(--space-xl);
    max-width: 800px;
    margin-left: var(--space-asym-left);
    margin-right: var(--space-asym-right);
}

@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.products-section {
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    margin-bottom: var(--space-lg);
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}

.order-card {
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    transition: all var(--duration-normal) var(--ease-snappy);
}

.cart-content {
    padding: var(--space-xl);
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.cart-footer {
    padding: var(--space-xl);
    border-top: 3px solid var(--border-light);
}

.sidebar {
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    height: fit-content;
}

.content-area {
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    min-height: 500px;
}

.profile-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.info-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 2px solid var(--border-light);
}

.address-item {
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    margin-bottom: var(--space-md);
}

.stat-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 2px solid var(--border-light);
    text-align: center;
}

.breadcrumb {
    margin-bottom: 30px;
    padding: 15px 25px;
    background: #fff;
    border-radius: 15px;
    border: 2px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.breadcrumb-detail {
    margin-bottom: 30px;
    padding: 15px 25px;
    background: #fff;
    border-radius: 15px;
    border: 2px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-image-section {
    background: #fff8f0;
    border-radius: 30px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid #e8e8e8;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.product-info-section {
    padding: 20px;
}

.price-display {
    background: linear-gradient(135deg, #ff8a8a, #ffd080);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    border: 2px solid #e8e8e8;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.description-box {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    border: 3px solid #e8e8e8;
    margin-bottom: 30px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.long-desc-section {
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    border: 3px solid #e8e8e8;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.long-desc-header {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    padding: 40px;
    color: #fff;
}

.long-desc-content {
    padding: 50px;
    color: #2d2d2d;
    font-size: 18px;
    line-height: 1.8;
}

.detail-section-box {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    border: 3px solid #e8e8e8;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.address-display {
    background: #fff8f0;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e8e8e8;
}

.summary-box {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    border: 3px solid #e8e8e8;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.address-form-container {
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--duration-normal) var(--ease-snappy);
}

@media (max-width: 768px) {
    .header {
        padding: var(--space-md) var(--space-lg);
    }
    
    .logo {
        font-size: var(--font-size-xl);
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .product-card:nth-child(odd),
    .product-card:nth-child(even) {
        height: auto;
    }
    
    .product-card:nth-child(3n) .product-image-area,
    .product-card:nth-child(4n) .product-image-area {
        height: 180px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .product-image-area {
        height: 180px;
    }
    
    .product-icon {
        font-size: 70px;
    }
    
    .nav-icon-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-icon-btn .iconify {
        font-size: 18px;
    }
    
    .cart-count {
        font-size: 10px;
        padding: 1px 6px;
        min-width: 16px;
        top: -4px;
        right: -4px;
    }
    
    .address-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .address-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .logout-item {
        margin-top: var(--space-xl);
    }
    
    .long-desc-content {
        padding: 30px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}