/* mall.css - Redesigned for Hu Lin Hui Mall */

:root {
    --mall-green: #52C41A;
    --mall-bg: #F7F8FA;
    --mall-text: #333333;
    --mall-sub: #999999;
    --mall-red: #FF4D4F;
}

/* Mall Header */
.mall-header {
    background: white;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.location-switch {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.location-switch i {
    font-size: 10px;
    color: var(--mall-sub);
}

.header-title {
    font-size: 18px;
    font-weight: bold;
}

.msg-icon {
    position: relative;
    font-size: 20px;
}

.msg-icon .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--mall-red);
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 10px;
    border: 2px solid white;
}

.mall-search .search-box {
    background: #F2F3F5;
    border-radius: 20px;
    padding: 4px 4px 4px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box i {
    color: var(--mall-sub);
}

.search-box input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: 13px;
    outline: none;
}

.search-btn {
    background: var(--mall-green);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
}

/* Scroll Content */
.mall-scroll-content {
    background: var(--mall-bg);
}

/* Banner */
.mall-banner {
    margin: 12px;
    background: linear-gradient(135deg, #A0D911, #52C41A);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.banner-text h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.banner-text p {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.banner-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
}

.banner-img img {
    width: 60px;
}

/* Quick Grid */
.mall-quick-grid {
    background: white;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 16px 8px;
    gap: 16px 0;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.q-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.bg-red { background: #FFF1F0; color: #F5222D; }
.bg-green { background: #F6FFED; color: #52C41A; }
.bg-orange { background: #FFF7E6; color: #FA8C16; }
.bg-blue { background: #F0F5FF; color: #2F54EB; }
.bg-purple { background: #F9F0FF; color: #722ED1; }
.bg-pink { background: #FFF0F6; color: #EB2F96; }
.bg-cyan { background: #E6FFFA; color: #13C2C2; }
.bg-gray { background: #F5F5F5; color: #8C8C8C; }

.quick-item span {
    font-size: 11px;
    color: var(--mall-text);
}

/* Promo Double - Horizontal Action Redesign */
.mall-promo-double {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 16px;
}

.p-card {
    border-radius: 12px;
    padding: 16px 14px;
    position: relative;
    overflow: hidden;
    height: 125px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.p-card.orange { background: linear-gradient(135deg, #FFF7F2, #FFF1E6); }
.p-card.purple { background: linear-gradient(135deg, #F9F7FF, #F2EEFF); }

.p-info {
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.p-info h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.p-info p {
    font-size: 10px;
    color: #999;
    margin-bottom: 12px;
}

.p-action {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.p-btn {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.p-btn.orange { background: #FF5A2D; box-shadow: 0 2px 8px rgba(255, 90, 45, 0.15); }
.p-btn.purple { background: #8E65FF; box-shadow: 0 2px 8px rgba(142, 101, 255, 0.15); }

.p-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.p-prices .now {
    font-size: 15px;
    font-weight: bold;
    color: #FF4D4F;
    line-height: 1;
}

.p-prices .old {
    font-size: 9px;
    color: #CCC;
    text-decoration: line-through;
}

.p-status {
    font-size: 9px;
    color: #FF9D5C;
    font-weight: 500;
}

/* Notice Bar */
.notice-bar {
    background: white;
    margin: 8px 12px;
    padding: 10px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.notice-tag {
    color: var(--mall-green);
    font-weight: bold;
}

.notice-status {
    background: #FFF1F0;
    color: #F5222D;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 10px;
}

.notice-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--mall-sub);
}

.notice-more {
    color: #999;
}

/* Main Body - Sidebar + Products */
.mall-body {
    display: flex;
    background: white;
    margin-top: 8px;
    min-height: 600px;
}

.mall-side {
    width: 80px;
    background: #F7F8FA;
    flex-shrink: 0;
}

.side-link {
    padding: 16px 8px;
    font-size: 12px;
    color: var(--mall-sub);
    text-align: center;
    position: relative;
}

.side-link.active {
    background: white;
    color: var(--mall-green);
    font-weight: bold;
}

.side-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--mall-green);
}

.mall-prods {
    flex: 1;
    padding: 12px;
}

.prod-group-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prod-group-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--mall-green);
}

.prod-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
}

.prod-link {
    text-decoration: none;
    color: inherit;
}

.prod-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prod-img {
    background: #F9F9F9;
    border-radius: 8px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-img img {
    width: 80%;
}

.prod-name {
    font-size: 11px;
    line-height: 1.4;
    height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.prod-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.p-price {
    color: var(--mall-red);
    font-size: 10px;
    font-weight: bold;
}

.p-price span {
    font-size: 15px;
}

.p-add {
    width: 22px;
    height: 22px;
    background: var(--mall-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Sticky Checkout Bar */
.mall-checkout-bar {
    position: absolute;
    bottom: 42px;
    left: 12px;
    right: 12px;
    height: 52px;
    background: rgba(34,34,34,0.95);
    backdrop-filter: blur(8px);
    border-radius: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 0 16px;
    color: white;
    z-index: 200;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.cart-sum {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon {
    position: relative;
}

.cart-icon i {
    font-size: 22px;
    color: var(--mall-green);
}

.cart-icon .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--mall-red);
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 10px;
    border: 2px solid #222;
}

.sum-info .sum-price {
    font-size: 12px;
}

.sum-info .sum-price strong {
    font-size: 18px;
}

.sum-info .sum-tip {
    font-size: 9px;
    color: #AAA;
}

.checkout-btn {
    background: var(--mall-green);
    color: white;
    border: none;
    height: 44px;
    padding: 0 24px;
    border-radius: 22px;
    font-size: 15px;
    font-weight: bold;
}
