/* ==========================================================================
   变量定义
   ========================================================================== */
:root {
    /* Colors */
    --primary: #cf1773;
    --primary-hover: #e41b80;
    --background: #20121a;
    --surface: #472436;
    --surface-light: #5c2e45;
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
}

/* ==========================================================================
   基础样式
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}
/* 隐藏滚动条但保留滚动功能 */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background-color: #20121a;
    border-bottom: 1px solid #472436;
    transition: box-shadow 0.3s ease;
}

/* 添加滚动时的光效 */
header.scrolling {
    box-shadow: 0 4px 25px rgba(207, 23, 115, 0.25),
    0 2px 15px rgba(207, 23, 115, 0.2),
    0 0 8px rgba(207, 23, 115, 0.15),
    0 0 3px rgba(207, 23, 115, 0.3);
}

/* ==========================================================================
   认证页面样式
   ========================================================================== */
/* 输入框 */
.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #472436;
    border: 1px solid #5c2e45;
    border-radius: 0.5rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #cf1773;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* 复选框 */
.auth-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background-color: var(--surface);
    border: 2px solid var(--surface-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
}

.auth-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.auth-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.3rem;
    height: 0.6rem;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.auth-checkbox:hover {
    border-color: var(--primary);
}

/* 提交按钮 */
.auth-submit {
    width: 100%;
    background-color: #cf1773;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    transition: all 0.3s ease;
}

.auth-submit:hover {
    background-color: #e41b80;
}

.auth-submit:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(207, 23, 115, 0.2);
}

/* 密码切换按钮 */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #ffffff;
}

/* 社交登录按钮 */
.social-auth-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.625rem 1rem;
    border: 1px solid #472436;
    border-radius: 0.5rem;
    background: transparent;
    color: #ffffff;
    transition: all 0.3s ease;
}

.social-auth-btn:hover {
    background-color: #472436;
}

/* 分隔线 */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--surface);
}

.auth-divider span {
    position: relative;
    padding: 0 var(--spacing-2);
    background-color: var(--background);
    color: var(--text-secondary);
}

/* ==========================================================================
   响应式样式
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .auth-input,
    .auth-submit {
        padding: var(--spacing-2) var(--spacing-3);
    }
}

@media screen and (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

@media screen and (max-width: 640px) {
    :root {
        --spacing-4: 0.875rem;
    }

    .auth-input,
    .auth-submit {
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   浏览器兼容性
   ========================================================================== */
.auth-input,
.auth-submit,
.social-auth-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.password-toggle {
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    transform: translateY(-50%);
}

@-webkit-keyframes autofill {
    to {
        color: #ffffff;
        background: #472436;
    }
}

input:-webkit-autofill {
    -webkit-animation-name: autofill;
    -webkit-animation-fill-mode: both;
}

/* ==========================================================================
   无障碍支持
   ========================================================================== */
.auth-input:focus-visible,
.auth-submit:focus-visible,
.social-auth-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==========================================================================
   动画优化
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ==========================================================================
   移动端优化
   ========================================================================== */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==========================================================================
   添加 CSS 变量以提高可维护性
   ========================================================================== */
:root {
    --primary-color: #cf1773;
    --primary-hover: #e41b80;
    --background-color: #20121a;
    --border-color: #472436;
    --text-color: #ffffff;
    --transition-default: all 0.3s ease;
}

/* ==========================================================================
   基础样式
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: #20121a;
}

/* ==========================================================================
   导航链接样式
   ========================================================================== */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #cf1773;
    transition: width 0.3s ease;
}

/* ==========================================================================
   优化选择器性能
   ========================================================================== */
.nav-item:hover .nav-link::after,
.nav-item:has(.submenu:hover) .nav-link::after {
    width: 100%;
}

.nav-item:hover .nav-link,
.nav-item:has(.submenu:hover) .nav-link {
    color: #cf1773;
}

/* ==========================================================================
   按钮样式
   ========================================================================== */
.discover-btn {
    transition: all 0.3s ease;
}

.discover-btn:hover {
    transform: scale(1.05);
    background-color: #e41980;
}

.header-btn {
    position: relative;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background-color: #472436;
}

/* ==========================================================================
   轮播图样式
   ========================================================================== */
.carousel-container {
    position: relative;
    min-height: 360px;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 0 40px 40px;
}

.carousel-backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.carousel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: opacity;
}

.carousel-background.active {
    opacity: 1;
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* ==========================================================================
   导航菜单样式
   ========================================================================== */
.nav-item {
    position: relative;
}

.nav-item:has(.submenu):hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item:has(.submenu)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    background: transparent;
}

.nav-item::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    background: transparent;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #472436;
    border-radius: 12px;
    padding: 8px;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
}

.submenu-content {
    min-width: 200px;
}

.submenu-preview {
    width: 200px;
    margin-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 8px;
    display: none;
}

.submenu-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submenu-preview h4 {
    color: #ffffff;
    font-size: 14px;
    margin: 8px 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submenu-preview p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 1024px) {
    .submenu-preview {
        display: block;
    }

    .submenu-item:hover + .submenu-preview img {
        opacity: 1;
    }
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.submenu-item:hover {
    background-color: #cf1773;
}

.submenu-item svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   搜索框样式
   ========================================================================== */
.search-container {
    position: relative;
    width: 100%;
    margin: 0;
    z-index: 10;
}

.search-input {
    width: 100%;
    height: 45px;
    background-color: #5c2e45 !important;
    border: none;
    border-radius: 25px !important;
    padding: 0 45px 0 20px;
    color: white;
    transition: all 0.3s ease;
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
    padding-top: 12px;
    padding-bottom: 8px;
}

.search-input:hover,
.search-input:focus,
.search-container:hover .search-input,
.search-container.active .search-input {
    box-shadow: none !important;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.search-input:focus::placeholder {
    color: transparent;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: #472436;
    border-radius: 12px;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 30;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.search-container.active .search-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.image-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background-color: transparent;
    color: white;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.image-search-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.recent-searches {
    margin-top: 16px;
}

.recent-searches h3 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.recent-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   移动端导航样式
   ========================================================================== */
.mobile-nav {
    position: fixed;
    inset: 0;
    background-color: #22111a;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    color: #ffffff;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover {
    background-color: #472436;
}

.mobile-nav-item svg {
    width: 16px;
    height: 16px;
}

.mobile-submenu {
    padding-left: 12px;
    display: none;
}

.mobile-nav-group.active .mobile-submenu {
    display: block;
}

.mobile-nav-group.active .mobile-nav-item svg {
    transform: rotate(180deg);
}

.mobile-nav-group {
    border-bottom: 1px solid #472436;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    color: #ffffff;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover {
    background-color: #472436;
}

.mobile-nav-item svg {
    width: 16px;
    height: 16px;
}

.mobile-submenu {
    padding-left: 12px;
    display: none;
}

.mobile-nav-group.active .mobile-submenu {
    display: block;
}

.mobile-nav-group.active .mobile-nav-item svg {
    transform: rotate(180deg);
}

.product-card {
    cursor: pointer;
}

.product-card:hover .product-info h3 {
    color: #cf1773;
}

/* ==========================================================================
   页脚样式
   ========================================================================== */
.footer {
    background-color: transparent;
    padding: 3rem 1rem;
    margin-top: 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background-color: #472436;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    justify-content: center;
}

.footer-section h3 {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

/* ==========================================================================
   响应式布局
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
        gap: 1.5rem;
        justify-content: center;
    }

    .carousel-container {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
        gap: 1.5rem;
        justify-content: center;
    }

    .carousel-container {
        min-height: 300px;
    }

    .header-btn {
        padding: 0 0.5rem;
        min-width: auto;
    }
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: minmax(200px, 300px);
        gap: 2rem;
        justify-content: center;
    }

    .footer-section a {
        justify-content: center;
    }

    .carousel-container {
        min-height: 250px;
    }
}

.mobile-nav.active {
    transform: translateX(0);
}

body.nav-open {
    overflow: hidden;
}

.mobile-nav {
    position: fixed;
    inset: 0;
    background-color: #22111a;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-nav-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 6rem;
}

.mobile-nav-group {
    margin-bottom: 0.5rem;
    width: 100%;
}

.mobile-submenu {
    display: none;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(71, 36, 54, 0.5);
    border-radius: 0.5rem;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu .mobile-nav-item {
    padding: 0.75rem 1rem;
}

.mobile-nav-item svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.mobile-nav-item.active svg {
    transform: rotate(180deg);
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(34, 17, 26, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 15;
    pointer-events: none;
    display: none;
    top: 57px;
}

@media (min-width: 1024px) {
    .nav-backdrop {
        display: block;
    }
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.submenu {
    z-index: 20;
}

.mobile-nav .flex-col > a {
    display: none;
}

.mobile-nav-group .mobile-nav-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
}

.mobile-submenu {
    display: none;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(71, 36, 54, 0.5);
    border-radius: 0.5rem;
}

.mobile-submenu.active {
    display: block;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background-color: #20121a;
    border-bottom: 1px solid #472436;
}

.submenu-item img {
    border-radius: 2px;
}

.nav-item .submenu {
    min-width: 160px;
}

.footer {
    background-color: transparent;
    padding: 3rem 1rem;
    margin-top: 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background-color: #472436;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    justify-content: center;
}

.footer-section h3 {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.footer-section a:hover svg {
    opacity: 1;
}

.footer-section svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.layout-container {
    display: flex;
    flex-direction: column;
    padding-top: 57px; /* header的高度 */
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
        gap: 1.5rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
        gap: 1.5rem;
        justify-content: center;
    }
    .footer {
        padding: 2rem 1rem;
        margin-top: 1.5rem;
    }
    .layout-container {
        padding-top: 53px; /* 移动端header可能高度略小 */
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: minmax(200px, 300px);
        gap: 2rem;
        justify-content: center;
    }
    .footer-section a {
        justify-content: center;
    }
}

.mobile-submenu .mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.mobile-submenu .mobile-nav-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mobile-submenu .mobile-nav-item:hover svg {
    opacity: 1;
}

.search-dropdown {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mobile-nav-item > svg {
    min-width: 16px;
    min-height: 16px;
    transition: transform 0.3s ease;
}

.mobile-nav-item.active > svg {
    transform: rotate(180deg);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background-color: #cf1773;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.flex.gap-2 {
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .header-btn {
        padding: 0 0.5rem;
        min-width: auto;
    }

    .nav-item .header-btn span.lg\:inline {
        display: none;
    }
}

.payment-methods img {
    filter: grayscale(100%) brightness(200%);
    transition: all 0.3s ease;
}

.payment-methods img:hover {
    filter: grayscale(0%) brightness(100%);
}

@media (max-width: 640px) {
    .payment-methods img {
        height: 20px;
    }
}

.language-switcher {
    position: relative;
}

.language-switcher:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.language-switcher .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: #472436;
    border-radius: 0.75rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    display: none;
    z-index: 50;
    transition: all 0.3s ease;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
}

.language-switcher::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    bottom: -20px;
    background: transparent;
}

.language-switcher .submenu::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.language-switcher .submenu::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 20px;
    width: 8px;
    height: 8px;
    background-color: #472436;
    transform: rotate(45deg);
}

.language-switcher .submenu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: white;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.language-switcher .submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-switcher .submenu-item img {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
}

/* ==========================================================================
   图片网格样式
   ========================================================================== */
.image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.image-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.image-item:hover img {
    transform: scale(1.1);
}

.image-item:hover .image-caption {
    transform: translateY(0);
}

/* ==========================================================================
   分类标签样式
   ========================================================================== */
.category-tab {
    position: relative;
    transition: all 0.3s ease;
}

.category-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.category-tab.active {
    color: #ffffff;
}

.category-tab.active::after {
    background-color: #cf1773;
}

.product-card .absolute.inset-0 button {
    background: transparent;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.product-card .absolute.inset-0 button:hover {
    transform: scale(1.15);
}

.product-card .absolute.inset-0 button.active {
    color: #cf1773;
    animation: popScale 0.3s ease-in-out;
}

/* ==========================================================================
   收藏按钮心跳动画
   ========================================================================== */
.product-card .absolute.inset-0 button:first-child.active {
    animation: heartBeat 0.3s ease-in-out;
}

/* ==========================================================================
   购物车按钮弹出动画
   ========================================================================== */
.product-card .absolute.inset-0 button:last-child.active {
    animation: cartPop 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes cartPop {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ==========================================================================
   移除原有的背景色类
   ========================================================================== */
.product-card .absolute.inset-0 button.bg-white\/20,
.product-card .absolute.inset-0 button.bg-\[\#cf1773\] {
    background: transparent !important;
}

/* ==========================================================================
   Product Gallery Styles
   ========================================================================== */
.product-gallery {
    position: relative;
}

.thumbnail-btn {
    position: relative;
    width: 100%;
    padding: 2px;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail-btn:hover {
    opacity: 1;
}

.thumbnail-btn.active {
    border-color: #cf1773;
    opacity: 1;
}

.main-image-container {
    position: relative;
    overflow: hidden;
    background: #472436;
}

.main-image-container img {
    transition: transform 0.3s ease;
}

.main-image-container:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   Rating Styles
   ========================================================================== */
.rating-score {
    position: relative;
    padding-right: 1rem;
}

.rating-score::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 2rem;
    background: #472436;
}

.rating-stats {
    font-size: 0.875rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==========================================================================
   Color Selection Styles
   ========================================================================== */
.color-selection button {
    position: relative;
    transition: all 0.3s ease;
}

.color-selection button:hover {
    transform: scale(1.1);
}

.color-selection button::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 9999px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-selection button:focus::after {
    border-color: #cf1773;
}

/* ==========================================================================
   Product Actions
   ========================================================================== */
.product-info button {
    position: relative;
    overflow: hidden;
}

.product-info button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.product-info button:active::before {
    transform: translate(-50%, -50%) scale(2);
}

/* ==========================================================================
   仅添加用户下拉框位置调整
   ========================================================================== */
.user-dropdown {
    right: 0;
    left: auto;
    min-width: 160px;
}

/* ==========================================================================
   用户下拉框位置调整
   ========================================================================== */
.language-switcher:last-child .submenu {
    right: 0;
    left: auto;
    transform: translateY(-10px);
}

.language-switcher:last-child .submenu::before {
    left: auto;
    right: 20px;
}

.language-switcher:last-child:hover .submenu {
    transform: translateY(0);
}

/* ==========================================================================
   添加关键渲染路径优化
   ========================================================================== */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ==========================================================================
   添加性能优化的动画
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   使用 will-change 优化动画性能
   ========================================================================== */
.carousel-background {
    will-change: opacity;
}

/* ==========================================================================
   优化移动端性能
   ========================================================================== */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==========================================================================
   添加兼容性处理
   ========================================================================== */
.submenu {
    transform: translateY(-10px);
    -webkit-transform: translateY(-10px);
    -moz-transform: translateY(-10px);
}

@supports not (backdrop-filter: blur(12px)) {
    .search-dropdown {
        background-color: rgba(71, 36, 54, 0.95);
    }
}

/* ==========================================================================
   在文件末尾添加客服按钮样式
   ========================================================================== */
.customer-service-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    background-color: #cf1773;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 40;
    box-shadow: 0 4px 12px rgba(207, 23, 115, 0.3);
}

.customer-service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(207, 23, 115, 0.4);
}

.customer-service-panel {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 360px;
    height: 480px;
    background-color: #20121a;
    border: 1px solid #472436;
    border-radius: 12px;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.customer-service-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cs-panel-header {
    padding: 16px;
    background-color: #472436;
    border-bottom: 1px solid #472436;
}

.cs-panel-content {
    height: calc(100% - 150px);
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: #472436 #20121a;
}

/* ==========================================================================
   自定义滚动条样式 (Webkit浏览器)
   ========================================================================== */
.cs-panel-content::-webkit-scrollbar {
    width: 6px;
}

.cs-panel-content::-webkit-scrollbar-track {
    background: #20121a;
}

.cs-panel-content::-webkit-scrollbar-thumb {
    background-color: #472436;
    border-radius: 3px;
}

.cs-panel-content::-webkit-scrollbar-thumb:hover {
    background-color: #5c2e45;
}

.cs-panel-footer {
    padding: 16px;
    border-top: 1px solid #472436;
    background-color: #20121a;
    padding-bottom: 24px;
}

.cs-message-input {
    width: 100%;
    background-color: #5c2e45 !important;
    border: none;
    border-radius: 20px !important;
    padding: 12px 20px;
    color: white;
    outline: none;
    font-size: 14px;
}

.cs-message-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.cs-message-input:focus {
    box-shadow: 0 0 0 2px rgba(207, 23, 115, 0.3) !important;
    transition: box-shadow 0.2s ease !important;
}

@media (max-width: 480px) {
    .customer-service-panel {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* ==========================================================================
   Checkout Styles
   ========================================================================== */
.checkout-container {
    width: 100%;
    padding: 0 1rem;
}

.checkout-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.checkout-main {
    flex: 1;
}

.checkout-summary {
    width: 100%;
}

.border-outline {
    border: 1px solid #472436;
}

.product-image-container {
    transform: scale(0.85);
    transform-origin: center;
}

/* ==========================================================================
   输入框样式优化
   ========================================================================== */
.checkout-main input[type="text"],
.checkout-main input[type="radio"] {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* ==========================================================================
   响应式布局
   ========================================================================== */
@media (min-width: 1024px) {
    .checkout-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    .checkout-content {
        flex-direction: row;
        gap: 2rem;
    }

    .checkout-summary {
        width: 400px;
    }
}

/* ==========================================================================
   添加认证相关样式
   ========================================================================== */
.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #472436;
    border: 1px solid #5c2e45;
    border-radius: 0.5rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #cf1773;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.auth-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background-color: var(--surface);
    border: 2px solid var(--surface-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
}

.auth-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.auth-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.3rem;
    height: 0.6rem;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.auth-checkbox:hover {
    border-color: var(--primary);
}

.auth-submit {
    width: 100%;
    background-color: #cf1773;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    transition: all 0.3s ease;
}

.auth-submit:hover {
    background-color: #e41b80;
}

.auth-submit:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(207, 23, 115, 0.2);
}

.auth-divider {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #ffffff;
}

.social-auth-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.625rem 1rem;
    border: 1px solid #472436;
    border-radius: 0.5rem;
    background: transparent;
    color: #ffffff;
    transition: all 0.3s ease;
}

.social-auth-btn:hover {
    background-color: #472436;
}

/* ==========================================================================
   动画相关样式
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@-webkit-keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes cartPop {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@-webkit-keyframes cartPop {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes autofill {
    to {
        color: #ffffff;
        background: #472436;
    }
}

@-webkit-keyframes autofill {
    to {
        color: #ffffff;
        background: #472436;
    }
}

/* ==========================================================================
   Checkout 页面样式
   ========================================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-section {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.checkout-form-group {
    margin-bottom: 1.25rem;
}

.checkout-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.checkout-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--surface-light);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all var(--transition-normal);
}

.checkout-input:focus {
    border-color: var(--primary);
    outline: none;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--surface-light);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.payment-method:hover {
    border-color: var(--primary);
    background-color: var(--surface-light);
}

.payment-method.active {
    border-color: var(--primary);
    background-color: var(--surface-light);
}

.payment-method-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--surface-light);
    border-radius: 50%;
    margin-right: 1rem;
    position: relative;
    transition: all var(--transition-normal);
}

.payment-method-radio:checked {
    border-color: var(--primary);
}

.payment-method-radio:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.625rem;
    height: 0.625rem;
    background-color: var(--primary);
    border-radius: 50%;
}

.order-summary {
    position: sticky;
    top: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.summary-item.total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-light);
    color: var(--text);
    font-weight: 600;
    font-size: 1.125rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary);
    color: var(--text);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.checkout-btn:hover {
    background-color: var(--primary-hover);
}

@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }
}

@media (max-width: 640px) {
    .checkout-layout {
        padding: 1rem;
    }

    .checkout-section {
        padding: 1rem;
    }
}

/* 购物车弹窗样式 */
.cart-drawer {
    pointer-events: none;
}

.cart-drawer.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.cart-drawer-container {
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.active .cart-drawer-container {
    transform: translateX(0);
}

/* 左侧显示时的样式 */
.cart-drawer-container.left-side {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    border-left: none;
    border-right: 1px solid #472436;
}

.cart-drawer.active .cart-drawer-container.left-side {
    transform: translateX(0);
}

/* 切换位置按钮动画 */
#togglePosition {
    transition: all 0.2s ease;
}

#togglePosition svg {
    transition: all 0.2s ease;
    opacity: 0.7;
}

#togglePosition:hover svg {
    opacity: 1;
}

.cart-drawer-container.left-side #togglePosition svg {
    transform: scaleX(-1);
}

/* 悬停效果 */
.cart-drawer-container:not(.left-side) #togglePosition:hover svg {
    transform: translateX(-2px);
}

.cart-drawer-container.left-side #togglePosition:hover svg {
    transform: scaleX(-1) translateX(-2px);
}

/* 按钮激活状态 */
#togglePosition:active svg {
    transform: scale(0.9);
}

.cart-drawer-container.left-side #togglePosition:active svg {
    transform: scaleX(-1) scale(0.9);
}

/* 购物车商品项样式 */
.cart-item {
    position: relative;
    transition: all 0.3s ease;
}

.cart-item.opacity-0 {
    opacity: 0;
    transform: translateX(20px);
}

.cart-item .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: #472436;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item .remove-btn:hover {
    background-color: #cf1773;
    transform: scale(1.1);
}

.cart-item .quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item .quantity-controls button {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: #472436;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item .quantity-controls button:hover {
    background-color: #cf1773;
    transform: scale(1.1);
}

/* 添加过渡动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* ==========================================================================
   文章页面样式
   ========================================================================== */
.breadcrumb-nav {
    border-bottom: 1px solid #472436;
}

.breadcrumb-nav a:hover {
    color: #cf1773;
}

.back-btn:hover svg {
    transform: translateX(-4px);
    transition: transform 0.3s ease;
}

.article-featured-image {
    position: relative;
    overflow: hidden;
}

.article-featured-image img {
    transition: transform 0.5s ease;
}

.article-featured-image:hover img {
    transform: scale(1.05);
}

.article-content h2 {
    position: relative;
    padding-left: 1rem;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #cf1773;
    border-radius: 2px;
}

.article-content ul li {
    position: relative;
    padding-left: 1.5rem;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 6px;
    height: 6px;
    background: #cf1773;
    border-radius: 50%;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: #472436;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #cf1773;
    transform: translateY(-2px);
}

.article-card {
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card .rounded-xl {
    overflow: hidden;
}

.article-card img {
    transition: transform 0.5s ease;
}

.article-card:hover img {
    transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .related-articles .grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-content h2 {
        font-size: 1.25rem;
    }

    .breadcrumb-nav {
        font-size: 0.75rem;
    }

    .share-btn {
        width: 36px;
        height: 36px;
    }
}

/* 打印样式优化 */
@media print {
    .breadcrumb-nav,
    .back-btn,
    .article-share,
    .related-articles {
        display: none;
    }

    .article-content {
        color: #000 !important;
    }

    .article-content a {
        text-decoration: underline;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .article-content {
        color: rgba(255, 255, 255, 0.8);
    }

    .article-content a {
        color: #cf1773;
    }
}

/* 动画性能优化 */
.article-featured-image img,
.article-card img {
    will-change: transform;
}

/* 无障碍支持 */
.article-content a:focus-visible,
.share-btn:focus-visible,
.back-btn:focus-visible {
    outline: 2px solid #cf1773;
    outline-offset: 2px;
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .article-featured-image img,
    .article-card img,
    .article-card,
    .share-btn {
        transition: none !important;
    }
}

/* ==========================================================================
   博客列表页样式
   ========================================================================== */
.blog-search input {
    transition: all 0.3s ease;
}

.blog-search input:focus {
    box-shadow: 0 0 0 2px rgba(207, 23, 115, 0.3);
}

.category-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background-color: transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn:hover {
    color: white;
    background-color: #472436;
}

.category-btn.active {
    color: white;
    background-color: #cf1773;
}

.featured-article {
    position: relative;
}

.featured-article::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    box-shadow: 0 0 0 0 rgba(207, 23, 115, 0);
    transition: box-shadow 0.3s ease;
}

.featured-article:hover::after {
    box-shadow: 0 0 30px 0 rgba(207, 23, 115, 0.3);
}

.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card .rounded-xl {
    position: relative;
}

.blog-card .rounded-xl::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .rounded-xl::after {
    opacity: 1;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    background-color: transparent;
    transition: all 0.3s ease;
}

.pagination-btn:not(:disabled):hover {
    color: white;
    background-color: #472436;
}

.pagination-btn.active {
    color: white;
    background-color: #cf1773;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .blog-container {
        padding-top: 2rem;
    }

    .featured-article h2 {
        font-size: 1.5rem;
    }

    .blog-card h3 {
        font-size: 1.25rem;
    }

    .category-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding-top: 1.5rem;
    }

    .featured-article h2 {
        font-size: 1.25rem;
    }

    .pagination-btn {
        width: 36px;
        height: 36px;
    }
}

/* 动画性能优化 */
.featured-article img,
.blog-card img {
    will-change: transform;
}

/* 无障碍支持 */
.blog-search input:focus-visible,
.category-btn:focus-visible,
.pagination-btn:focus-visible {
    outline: 2px solid #cf1773;
    outline-offset: 2px;
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .featured-article img,
    .blog-card img,
    .blog-card {
        transition: none !important;
    }
}

/* 打印样式优化 */
@media print {
    .blog-search,
    .category-btn,
    .pagination {
        display: none;
    }

    .featured-article,
    .blog-card {
        break-inside: avoid;
    }
}

/* Wishlist Page Styles */
.menu-section {
    position: relative;
}

.menu-section .submenu {
    display: none;
    background: #2a1720;
    border: 1px solid #472436;
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.menu-section .submenu:not(.hidden) {
    display: block;
    opacity: 1;
}

/* Custom select styles */
select {
    background-color: var(--background) !important;
    color: var(--text) !important;
    border: 1px solid var(--surface-light) !important;
}

select option {
    background-color: #2a1720 !important;
    color: var(--text) !important;
}

select:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: none !important;
}

.menu-section .submenu.hidden {
    display: none;
}

/* Menu content styles */
.menu-content a {
    display: block;
    padding: 0.5rem 1rem;
    transition: all var(--transition-normal);
}

.menu-content a.active {
    color: var(--text);
    background: var(--surface);
    border-radius: var(--radius-md);
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .menu-section {
        position: relative;
    }

    .menu-section .submenu {
        position: static;
        width: 100%;
        background: transparent;
        border: none;
        padding-left: 3rem;
    }

    .menu-content a {
        padding-left: 2rem;
    }

    .menu-content a.active {
        color: white;
        background: #472436;
        border-radius: 0.75rem;
    }
}

/* Desktop menu styles */
@media (min-width: 769px) {
    .menu-section {
        position: relative;
    }

    .menu-section .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        z-index: 50;
    }

    .menu-section:hover .submenu {
        display: block;
    }

    .menu-content a.active {
        color: white;
        background: #472436;
        border-radius: 0.75rem;
    }
}

/* 输入框聚焦样式覆盖 */
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #cf1773 !important;
    ring-width: 0 !important;
    --tw-ring-color: transparent !important;
}

input[type="radio"]:focus,
input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: none !important;
    --tw-ring-offset-width: 0 !important;
    --tw-ring-width: 0 !important;
}

/* ==========================================================================
   统一输入框聚焦效果
   ========================================================================== */
.auth-input,
.checkout-input,
.search-input,
.cs-message-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
select,
textarea {
    background-color: #472436 !important;
    border: 1px solid #5c2e45 !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
}

.auth-input:focus,
.checkout-input:focus,
.search-input:focus,
.cs-message-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: #cf1773 !important;
    box-shadow: none !important;
    ring-width: 0 !important;
    --tw-ring-color: transparent !important;
}

.auth-input::placeholder,
.checkout-input::placeholder,
.search-input::placeholder,
.cs-message-input::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}


/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #cf1773;
    color: white;
}

.btn-primary:hover {
    background-color: #e41b80;
}

.btn-secondary {
    background-color: #472436;
    color: white;
}

.btn-secondary:hover {
    background-color: #5c2e45;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: white;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .side-modal {
        max-width: 100%;
    }
}

/* Custom Form Styles */
.custom-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    background-color: #2c1823;
    border: 2px solid #472436;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-radio:checked {
    background-color: #2c1823;
    border-color: #cf1773;
}

.custom-radio:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    background-color: #cf1773;
    border-radius: 50%;
}

.custom-radio:hover {
    border-color: #cf1773;
}

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    background-color: #2c1823;
    border: 2px solid #472436;
    border-radius: 0.25rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox:checked {
    background-color: #cf1773;
    border-color: #cf1773;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.25rem;
    height: 0.5rem;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.custom-checkbox:hover {
    border-color: #cf1773;
}

/* Image styles */
img.preview-image {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

img.preview-image:hover {
    transform: scale(1.05);
}
