/**
 * ============================================================================
 * Riniba 01 Theme - Custom Styles
 * ============================================================================
 * 此文件用于站点管理员自定义样式和增强功能
 * 在此添加的样式会覆盖默认主题样式
 * ============================================================================
 */

/* 
 * 自定义变量
 * --------------------------------------------------
 */
:root {
    --custom-primary: #FBC270;
    --custom-secondary: #67D4E0;
    --custom-dark: #2C2D2F;
    --custom-light: #FAFAFA;
    --custom-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --custom-radius: 12px;
    --custom-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 
 * 移动端购物车徽章
 * --------------------------------------------------
 */
.mobile-cart-badge {
    position: relative;
    margin-right: 15px;
}

.mobile-cart-badge a {
    color: #FAFAFA;
    font-size: 22px;
    position: relative;
}

.mobile-cart-badge .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--custom-primary);
    color: var(--custom-dark);
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* 
 * 移动端导航增强
 * --------------------------------------------------
 */
.mobile-navar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-navar ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-navar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #FAFAFA;
    font-size: 16px;
    font-weight: 500;
    transition: var(--custom-transition);
}

.mobile-navar ul li a:hover {
    background: rgba(251, 194, 112, 0.15);
    color: var(--custom-primary);
}

.mobile-navar ul li a i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.mobile-navar ul li a .badge {
    margin-left: auto;
    font-size: 11px;
}

/* 移动端子菜单 */
.mobile-navar ul li.has-children > a {
    justify-content: flex-start;
}

.mobile-navar ul li.has-children > a .icon-arrow {
    margin-left: auto;
    transition: var(--custom-transition);
}

.mobile-navar ul li.has-children > a .icon-arrow.open {
    transform: rotate(180deg);
}

.mobile-navar ul li .sub-menu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    padding-left: 20px;
}

.mobile-navar ul li .sub-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-navar ul li .sub-menu li a {
    padding: 12px 20px;
    font-size: 14px;
}

/* 
 * 下拉菜单增强
 * --------------------------------------------------
 */
.right-nav .dropdown-menu {
    min-width: 200px;
    padding: 8px 0;
    border: none;
    border-radius: var(--custom-radius);
    box-shadow: var(--custom-shadow);
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.right-nav .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--custom-dark);
    transition: var(--custom-transition);
}

.right-nav .dropdown-item:hover {
    background: rgba(251, 194, 112, 0.1);
    color: var(--custom-primary);
}

.right-nav .dropdown-divider {
    margin: 8px 0;
    border-color: rgba(0, 0, 0, 0.08);
}

/* 
 * 公告栏增强
 * --------------------------------------------------
 */
.alert-info {
    background: linear-gradient(135deg, rgba(251, 194, 112, 0.9) 0%, rgba(103, 212, 224, 0.9) 100%);
    border: none;
    border-radius: var(--custom-radius);
    color: var(--custom-dark);
    padding: 16px 20px;
    box-shadow: var(--custom-shadow);
}

.alert-info .btn-close {
    filter: none;
    opacity: 0.7;
}

.alert-info .btn-close:hover {
    opacity: 1;
}

/* 
 * 产品卡片增强
 * --------------------------------------------------
 */
.product-card {
    transition: var(--custom-transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.product-card .img-block img.goodimage {
    transition: var(--custom-transition);
}

.product-card:hover .img-block img.goodimage {
    transform: scale(1.05);
}

/* 
 * 徽章样式增强
 * --------------------------------------------------
 */
.badge {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge.text-bg-primary {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%) !important;
}

.badge.text-bg-secondary {
    background: #6c757d !important;
}

.badge.text-bg-warning {
    background: linear-gradient(135deg, #FF9966 0%, #FF5E62 100%) !important;
    color: white !important;
}

.badge.text-bg-success {
    background: linear-gradient(135deg, #11998E 0%, #38EF7D 100%) !important;
}

.badge.text-bg-danger {
    background: linear-gradient(135deg, #ED213A 0%, #93291E 100%) !important;
}

.badge.text-bg-info {
    background: linear-gradient(135deg, #00B4DB 0%, #0083B0 100%) !important;
}

/* 
 * 按钮增强
 * --------------------------------------------------
 */
.btn-success {
    background: linear-gradient(135deg, #28C76F 0%, #48DA89 100%);
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 10px;
    transition: var(--custom-transition);
}

.btn-success:hover {
    background: linear-gradient(135deg, #48DA89 0%, #28C76F 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 199, 111, 0.35);
}

.btn-outline-secondary.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 
 * 搜索框增强
 * --------------------------------------------------
 */
.search-bar {
    position: relative;
}

.search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(251, 194, 112, 0.2);
}

.search-bar button.search {
    background: transparent;
    border: none;
    transition: var(--custom-transition);
}

.search-bar button.search:hover {
    color: var(--custom-primary);
}

/* 
 * Footer增强
 * --------------------------------------------------
 */
footer {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

footer .footer-main {
    padding-top: 40px;
}

footer .newsletter h3 {
    font-size: 18px;
    font-weight: 600;
}

footer .newsletter a {
    color: var(--custom-primary);
    transition: var(--custom-transition);
}

footer .newsletter a:hover {
    color: white;
    text-decoration: underline;
}

/* 
 * 页面标题横幅增强
 * --------------------------------------------------
 */
.page-title-banner {
    padding: 30px 0;
    text-align: center;
}

.page-title-banner .title h2 {
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 
 * 表单控件增强
 * --------------------------------------------------
 */
.form-control {
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    padding: 12px 18px;
    transition: var(--custom-transition);
}

.form-control:focus {
    border-color: var(--custom-primary);
    box-shadow: 0 0 0 3px rgba(251, 194, 112, 0.15);
}

.form-select {
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    padding: 12px 18px;
    transition: var(--custom-transition);
}

.form-select:focus {
    border-color: var(--custom-primary);
    box-shadow: 0 0 0 3px rgba(251, 194, 112, 0.15);
}

/* 
 * 数量选择器增强
 * --------------------------------------------------
 */
.quantity-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 20px 0;
}

.quantity-wrap .decrement,
.quantity-wrap .increment {
    width: 44px;
    height: 44px;
    border: 2px solid #e8e8e8;
    background: white;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--custom-transition);
}

.quantity-wrap .decrement {
    border-radius: 10px 0 0 10px;
    border-right: none;
}

.quantity-wrap .increment {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

.quantity-wrap .decrement:hover,
.quantity-wrap .increment:hover {
    background: var(--custom-primary);
    border-color: var(--custom-primary);
    color: white;
}

.quantity-wrap .number {
    width: 60px;
    height: 44px;
    text-align: center;
    border: 2px solid #e8e8e8;
    border-left: none;
    border-right: none;
    font-size: 18px;
    font-weight: 600;
}

/* 
 * 分类标签增强
 * --------------------------------------------------
 */
.badge-item {
    margin-bottom: 20px;
}

.badge-item span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    color: var(--custom-dark);
    box-shadow: var(--custom-shadow);
}

.badge-item span i {
    color: var(--custom-primary);
}

/* 
 * 模态框增强
 * --------------------------------------------------
 */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 16px 24px;
}

/* 
 * 加载动画增强
 * --------------------------------------------------
 */
#preloader {
    background: linear-gradient(135deg, var(--custom-secondary) 0%, #4fc4d1 100%);
}

.image-loader img {
    animation: spin 1.5s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
}

/* 
 * 响应式调整
 * --------------------------------------------------
 */
@media (max-width: 991px) {
    .mobile-menu {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .mobile-cart-badge {
        order: 2;
    }
    
    .hamburger-menu {
        order: 3;
    }
}

@media (max-width: 576px) {
    .page-title-banner .title h2 {
        font-size: 22px;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .alert-info {
        padding: 12px 16px;
        font-size: 14px;
    }
}

