/*your custom css goes here*/

/* 公告样式 */
.announcement-container {
    background: white;
    color: #003399;
    padding: 12px 0;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.announcement-wrapper {
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
    display: flex;
    align-items: center;
}

.announcement-content {
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
}

.announcement-icon {
    font-size: 18px;
    margin-right: 10px;
    color: #003399;
    animation: pulse 2s infinite;
}

.announcement-text {
    margin-right: 50px;
    line-height: 1.4;
}

/* 多条公告时的样式 */
.announcement-container .announcement-content:not(:last-child) .announcement-text::after {
    content: " • ";
    margin-left: 30px;
    margin-right: 20px;
    color: #003399;
    font-weight: bold;
}

/* 滚动动画 */
@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .announcement-content {
        font-size: 13px;
        padding: 0 15px;
    }
    
    .announcement-icon {
        font-size: 16px;
        margin-right: 8px;
    }
    
    .announcement-text {
        margin-right: 30px;
    }
}

@media (max-width: 480px) {
    .announcement-container {
        padding: 10px 0;
    }
    
    .announcement-content {
        font-size: 12px;
        padding: 0 10px;
    }
    
    .announcement-icon {
        font-size: 14px;
        margin-right: 6px;
    }
    
    .announcement-text {
        margin-right: 20px;
    }
}

/* 暂停滚动效果（鼠标悬停时） */
.announcement-container:hover .announcement-wrapper {
    animation-play-state: paused;
}

/* 公告管理页面样式 */
.announcement-status-badge {
    font-size: 11px;
    padding: 4px 8px;
}

.announcement-content-preview {
    max-width: 300px;
    word-wrap: break-word;
    line-height: 1.4;
}

/* 公告表单样式 */
.announcement-form .form-group label {
    font-weight: 600;
    color: #495057;
}

.announcement-form .form-control {
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.announcement-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 公告卡片样式 */
.announcement-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    transition: transform 0.2s ease-in-out;
}

.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* 区域间距统一调整 */
.banner-section,
.announcement-container,
.categories-section {
    margin-bottom: 20px;
}

/* PC端侧边栏高度调整 */
@media (min-width: 992px) {
    .sidebar-categories,
    .today-deals-sidebar {
        transition: height 0.3s ease;
    }
    
    /* 当有公告时，侧边栏增加高度 */
    body:has(.announcement-container) .sidebar-categories,
    body:has(.announcement-container) .today-deals-sidebar {
        min-height: calc(100vh - 200px);
    }
    
    /* 当没有公告时，侧边栏减少高度 */
    body:not(:has(.announcement-container)) .sidebar-categories,
    body:not(:has(.announcement-container)) .today-deals-sidebar {
        min-height: calc(100vh - 180px);
    }
}

/* 今日特卖高度调整 */
.h-lg-500px, .size-lg-500px {
    height: 445px !important;
}

@media (max-width: 991.98px) {
    .h-lg-500px, .size-lg-500px {
        height: auto !important;
    }
}

/* 公告显示时，原有的400px高度元素自动增加到500px */
body:has(.announcement-container) .h-lg-400px,
body:has(.announcement-container) .size-lg-400px {
    height: 445px !important;
}

/* 公告不显示时，恢复原有400px高度 */
body:not(:has(.announcement-container)) .h-lg-400px,
body:not(:has(.announcement-container)) .size-lg-400px {
    height: 400px !important;
}

@media (max-width: 991.98px) {
    body:has(.announcement-container) .h-lg-400px,
    body:has(.announcement-container) .size-lg-400px,
    body:not(:has(.announcement-container)) .h-lg-400px,
    body:not(:has(.announcement-container)) .size-lg-400px {
        height: auto !important;
    }
}

/* 类别菜单内容增加时的样式调整 */
@media (min-width: 992px) {
    .aiz-category-menu .categories {
        transition: max-height 0.3s ease;
    }
    
    /* 当有公告时，类别菜单增加一行的高度（约40px） */
    body:has(.announcement-container) .aiz-category-menu .categories {
        max-height: calc(11 * 40px + 40px); /* 原11行 + 新增1行 */
    }
    
    /* 当没有公告时，类别菜单保持原有11行高度 */
    body:not(:has(.announcement-container)) .aiz-category-menu .categories {
        max-height: calc(11 * 40px); /* 原11行高度 */
    }
}
/* OTTO Blue Theme Overrides */
:root {
    --primary: #003399 !important;
    --hov-primary: #002266 !important;
    --soft-primary: rgba(0, 51, 153, 0.15) !important;
}
.btn-primary {
    background-color: #003399 !important;
    border-color: #003399 !important;
}
.btn-primary:hover {
    background-color: #002266 !important;
    border-color: #002266 !important;
}
.bg-primary, .bg-soft-primary {
    background-color: rgba(0, 51, 153, 0.15) !important;
}
.text-primary {
    color: #003399 !important;
}
.border-primary {
    border-color: #003399 !important;
}

/* OTTO clone alignment: hide account menu until the account area is hovered, matching original storefront behavior. */
.hover-user-top-menu { display: none; }
#nav-user-info:hover .hover-user-top-menu,
#nav-user-info:focus-within .hover-user-top-menu,
.hover-user-top-menu:hover { display: block; }

/* OTTO clone header alignment */
.otto-search-box { max-width: 570px; margin: 0 auto; }
.otto-search-type { height: 42px; border-radius: 22px 0 0 22px; border-right: 0 !important; min-width: 106px; }
.otto-search-input { height: 42px !important; border-radius: 0 !important; border-left: 0 !important; box-shadow: none !important; }
.otto-search-button { height: 42px; border-radius: 0 22px 22px 0 !important; min-width: 58px; display: inline-flex; align-items: center; justify-content: center; }
.otto-account-block { display: none !important; }
.logo-bar-area .py-20px { padding-top: 20px !important; padding-bottom: 20px !important; }
@media (max-width: 991.98px) {
  .otto-search-box { max-width: none; margin: 0; }
  .otto-search-button { min-width: 48px; }
}

/* OTTO clone color and nav alignment */
:root { --primary: #ff2e4d !important; --hov-primary: #F91155 !important; --soft-primary: rgba(255,46,77,0.15) !important; }
.bg-primary { background-color: #ff2e4d !important; }
.text-primary { color: #ff2e4d !important; }
.btn-primary { background-color: #ff2e4d !important; border-color: #ff2e4d !important; }
.btn-primary:hover { background-color: #F91155 !important; border-color: #F91155 !important; }
.badge-primary { background-color: #ff2e4d !important; }
header .bg-primary.h-50px { background: #ffffff !important; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
header .all-category { background: #ff2e4d !important; }
header .all-category .categoriesAll span,
header .all-category .las,
header .all-category span { color: #ffffff !important; }
header .hor-swipe a { color: #757575 !important; opacity: 1 !important; }
header .nav-cart-box > a { color: #757575 !important; background: transparent !important; }
header .nav-cart-box > a svg path,
header .nav-cart-box > a svg circle { fill: #919199 !important; }
header .nav-cart-box > a .text-white,
header .nav-cart-box > a span { color: #757575 !important; }
.aiz-category-menu .sub-cat-menu,
.aiz-category-menu { border-radius: 4px !important; }
.aiz-category-menu .category-nav-element:first-child,
.aiz-category-menu .card-header,
.aiz-category-menu .bg-primary { background-color: #ff2e4d !important; }
.todays_deal .bg-soft-primary { background-color: rgba(255,46,77,.14) !important; }
.otto-search-button { background-color: #ff2e4d !important; border-color: #ff2e4d !important; color: #fff !important; }

/* OTTO clone category menu alignment */
.aiz-category-menu .bg-primary,
.aiz-category-menu > .bg-primary,
.aiz-category-menu .card-header,
.aiz-category-menu .category-menu-title { background-color: #ff2e4d !important; }
.aiz-category-menu .category-nav-element > a { background: #ffffff !important; color: #1b1b28 !important; }
.aiz-category-menu .category-nav-element > a:hover { background: #f5f6f7 !important; color: #ff2e4d !important; }
.aiz-category-menu .category-nav-element > a.text-primary,
.aiz-category-menu .category-nav-element > a.active { color: #1b1b28 !important; background: #ffffff !important; }

/* OTTO clone header action buttons */
.otto-header-actions .otto-action-link { min-width: 64px; justify-content: center; }
.otto-header-actions i { color: #757575; line-height: 1; }
.otto-header-actions .badge { font-size: 10px; min-width: 17px; height: 17px; line-height: 17px; padding: 0; }
header .align-self-stretch .nav-cart-box { display: none !important; }
