/* Mall premium theme overrides - #5C0022 */
:root {
    --primary: #5C0022 !important;
    --hov-primary: #3d0016 !important;
    --soft-primary: rgba(92, 0, 34, 0.12) !important;
    --mall-btn-bg: rgba(0, 0, 0, 0.72);
    --mall-btn-color: #ffffff;
    --mall-radius: 12px;
}

/* Global rounded images */
img:not(.no-round):not([class*="avatar-letter"]):not(.brand-icon):not([style*="border-radius:50%"]) {
    border-radius: var(--mall-radius) !important;
}

.aiz-card-box img,
.product-card img,
.carousel-box img,
.img-fit,
.lazyload[data-src],
.brand-icon {
    border-radius: var(--mall-radius) !important;
}

/* Semi-transparent black buttons with white text */
.btn-mall-dark,
.btn-add-to-cart,
.btn-buy-now,
.product-details .btn-primary:not(.btn-soft-primary),
.product-details .btn-secondary,
.shop_listing .btn-soft-primary,
#section_newest .btn-primary,
.aiz-mobile-bottom-nav .bg-primary {
    background: var(--mall-btn-bg) !important;
    border-color: rgba(0, 0, 0, 0.85) !important;
    color: var(--mall-btn-color) !important;
}

.btn-mall-dark:hover,
.btn-add-to-cart:hover,
.btn-buy-now:hover,
.product-details .btn-primary:not(.btn-soft-primary):hover {
    background: rgba(0, 0, 0, 0.88) !important;
    color: #fff !important;
}

/* Letter avatar */
.avatar-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Seller badges */
.seller-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
}

.seller-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    color: #999;
    background: #f8f8f8;
}

.seller-badge.active {
    border-color: #5C0022;
    color: #5C0022;
    background: rgba(92, 0, 34, 0.08);
}

.seller-badge i {
    font-size: 12px;
}

/* Header layout - login near cart */
.header-auth-links {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.header-auth-links a {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.header-auth-links a:hover {
    color: var(--primary);
}

.header-sub-nav {
    border-top: 1px solid #eee;
    background: #fafafa;
}

.header-sub-nav a {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    padding: 8px 16px;
    display: inline-block;
}

.header-sub-nav a:hover {
    color: var(--primary);
}

/* Footer locale bar */
.footer-locale-bar {
    background: #f5f5f5;
    border-top: 1px solid #e8e8e8;
    padding: 12px 0;
}

.footer-locale-bar select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 6px 12px;
    font-size: 13px;
    margin-right: 12px;
}

/* Modern auth pages */
.auth-modern-wrap {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fafafa 0%, #f0ebe8 100%);
    padding: 40px 16px;
}

.auth-modern-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    padding: 40px 32px;
}

.auth-modern-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.auth-modern-card .subtitle {
    color: #888;
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-modern-card .form-control {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    height: auto;
}

.auth-modern-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92, 0, 34, 0.1);
}

.auth-modern-card .btn-submit {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    background: var(--primary);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.auth-modern-card .btn-submit:hover {
    background: var(--hov-primary);
    color: #fff;
}

/* Local captcha */
.local-captcha-wrap {
    margin-bottom: 16px;
}

.local-captcha-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.local-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.local-captcha-question {
    flex-shrink: 0;
    min-width: 88px;
    padding: 10px 12px;
    background: #f5f0ed;
    border: 1px solid #e8ddd8;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    letter-spacing: 1px;
}

.local-captcha-refresh {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.local-captcha-refresh:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.local-captcha-input {
    flex: 1;
    min-width: 0;
    max-width: 100px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* Mobile header auth buttons */
.mobile-header-actions {
    gap: 4px;
}

.mobile-header-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 2px;
}

.btn-mobile-auth {
    font-size: 11px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 20px;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1;
    transition: all 0.2s ease;
}

.btn-mobile-login {
    color: var(--primary) !important;
    border: 1.5px solid var(--primary);
    background: #fff;
}

.btn-mobile-register {
    color: #fff !important;
    background: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-mobile-login:active,
.btn-mobile-register:active {
    opacity: 0.85;
    transform: scale(0.97);
}

.mobile-cart-link {
    margin-left: 2px;
}

@media (max-width: 380px) {
    .mobile-logo-col {
        max-width: 32%;
    }

    .btn-mobile-auth {
        font-size: 10px;
        padding: 5px 7px;
    }

    .local-captcha-row {
        flex-wrap: wrap;
    }

    .local-captcha-input {
        max-width: none;
        width: 100%;
        flex: 1 1 100%;
    }
}


/* PayPal trust block on product detail */
.paypal-trust-block {
    border: 1px solid #eee;
    border-radius: var(--mall-radius);
    padding: 16px;
    margin-top: 16px;
    background: #fafafa;
}

.paypal-trust-block .paypal-logo {
    height: 24px;
    margin-bottom: 10px;
}

.paypal-trust-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.paypal-trust-links a {
    color: #666;
    text-decoration: underline;
}

/* Payment blocked page */
.payment-blocked-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.payment-blocked-card {
    max-width: 520px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
}

.payment-blocked-card .icon-warning {
    width: 64px;
    height: 64px;
    background: #fff3cd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #856404;
}

/* Featured sellers carousel banner */
.sellers-page-banner {
    border-radius: var(--mall-radius);
    overflow: hidden;
    margin-bottom: 24px;
}

/* Hot brands horizontal scroll */
.hot-brands-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

.hot-brands-scroll::-webkit-scrollbar {
    height: 4px;
}

.hot-brands-scroll img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Hot categories horizontal scroll (mobile) */
.hot-categories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
}

.hot-category-item {
    flex: 0 0 88px;
    text-align: center;
}

.hot-category-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--mall-radius);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: block;
    margin: 0 auto 6px;
}

.hot-category-item span {
    display: block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: #444;
}

.hot-categories-sidebar .hot-category-sidebar-item img {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Seller application modern form */
.seller-modern-wrap {
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #fafafa 0%, #f0ebe8 100%);
    padding: 40px 16px 60px;
}

.seller-modern-card {
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    padding: 32px 28px;
}

.seller-modern-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.seller-modern-card .subtitle {
    color: #888;
    font-size: 14px;
    margin-bottom: 24px;
}

.seller-modern-card .form-control,
.seller-modern-card select {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    height: auto;
}

.seller-modern-card label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.seller-modern-card .btn-submit-shop {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    background: var(--primary);
    border: none;
    color: #fff;
    font-weight: 600;
}

/* PayPal checkout button on product detail */
.btn-paypal-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: var(--mall-radius);
    background: #000;
    color: #fff;
    border: none;
    font-weight: 600;
}

.btn-paypal-checkout img {
    height: 20px;
    margin-left: 8px;
}

/* More buttons: black semi-transparent */
.btn-primary:not(.btn-soft-primary):not(.btn-submit):not(.btn-submit-shop),
.pagination .page-item.active .page-link {
    background: var(--mall-btn-bg) !important;
    border-color: rgba(0, 0, 0, 0.85) !important;
    color: #fff !important;
}

#section_newest .btn-primary,
.aiz-pagination .page-link {
    border-radius: 8px;
}

/* Mobile bottom nav premium styling */
@media (max-width: 991px) {
    body {
        background: #fff !important;
    }

    .mall-mobile-nav {
        background: #fff !important;
        border-top: 1px solid #ececec !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
        padding: 0 4px;
        height: 62px;
        z-index: 1030;
    }

    .mall-nav-item {
        padding: 8px 2px 6px;
        min-height: 58px;
    }

    .mall-nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        margin: 0 auto 3px;
    }

    .mall-nav-icon svg {
        width: 24px;
        height: 24px;
        display: block;
    }

    .mall-nav-label {
        display: block;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.2;
        color: #8a8a8a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mall-nav-item.is-active .mall-nav-label {
        color: var(--primary);
        font-weight: 700;
    }

    .mall-nav-cart {
        position: relative;
        padding-top: 0;
    }

    .mall-nav-cart-btn {
        width: 52px;
        height: 52px;
        margin: -22px auto 2px;
        border-radius: 50%;
        background: linear-gradient(145deg, #6b0030 0%, #5C0022 55%, #3d0016 100%);
        border: 3px solid #fff;
        box-shadow: 0 4px 14px rgba(92, 0, 34, 0.35);
    }

    .mall-nav-cart-btn .mall-nav-icon {
        width: 28px;
        height: 28px;
        margin: 0;
    }

    .mall-nav-cart-btn svg {
        width: 26px;
        height: 26px;
    }

    .mall-nav-cart.is-active .mall-nav-label {
        color: var(--primary);
        font-weight: 700;
    }

    .mall-nav-dot {
        position: absolute;
        top: 0;
        right: -2px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--primary);
        border: 1.5px solid #fff;
    }

    .mall-nav-avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        margin: 0 auto 3px;
        border-radius: 50%;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .mall-nav-avatar img {
        width: 26px;
        height: 26px;
        object-fit: cover;
        border-radius: 50% !important;
    }

    .mobile-policy-links {
        padding: 16px;
        border-top: 1px solid #eee;
    }

    .mobile-policy-links a {
        display: block;
        padding: 10px 0;
        color: #555;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }

    /* Hide footer policy icon grid on mobile (moved to account center) */
    section.bg-white.border-top.mt-auto.d-none.d-md-block {
        display: none !important;
    }
}

/* Privacy consent popup */
#privacy-consent-modal .modal-content {
    border-radius: 16px;
    border: none;
}

#privacy-consent-modal .btn-accept {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 10px 24px;
}

/* USD fixed display */
.usd-fixed-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* Product card subtle shadow */
.aiz-card-box {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* Discount badge: yellow background, white text */
.badge-custom {
    background: #F0B429 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(240, 180, 41, 0.35) !important;
}

.badge-custom .box {
    background: #D99E12 !important;
    color: #fff !important;
}

/* Auth form helpers */
.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-forgot-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}

.auth-forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.auth-switch-block {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.auth-switch-block .text-muted {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
}

.auth-switch-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--primary) !important;
    border: 1.5px solid var(--primary);
    background: #fff;
    text-decoration: none !important;
    text-align: center;
    box-sizing: border-box;
}

.auth-switch-btn:hover {
    background: rgba(92, 0, 34, 0.06);
}

.auth-page-back {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

/* Auth pages: clean mobile layout */
@media (max-width: 991px) {
    body.page-auth .aiz-mobile-bottom-nav {
        display: none !important;
    }

    body.page-auth .top-navbar {
        display: none !important;
    }

    body.page-auth header.shadow-sm {
        box-shadow: none !important;
    }

    body.page-auth .logo-bar-area {
        border-bottom: 1px solid #f0f0f0;
    }

    body.page-auth .logo-bar-area .py-20px {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    body.page-auth .auth-modern-wrap,
    body.page-auth .seller-modern-wrap {
        min-height: calc(100vh - 64px);
        padding: 20px 16px 32px;
        align-items: flex-start;
    }

    body.page-auth .auth-modern-card,
    body.page-auth .seller-modern-card {
        max-width: 100%;
        padding: 24px 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }

    body.page-auth .auth-modern-card h1,
    body.page-auth .seller-modern-card h1 {
        font-size: 20px;
        line-height: 1.3;
    }

    body.page-auth .auth-modern-card .subtitle,
    body.page-auth .seller-modern-card .subtitle {
        margin-bottom: 20px;
    }

    body.page-auth .auth-modern-card .btn-submit,
    body.page-auth .seller-modern-card .btn-submit-shop {
        padding: 15px;
        font-size: 16px;
    }

    body.page-auth .local-captcha-row {
        flex-wrap: wrap;
    }

    body.page-auth .local-captcha-input {
        flex: 1 1 100%;
        max-width: none;
        width: 100%;
    }

    body.page-auth .auth-options-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    body.page-auth footer,
    body.page-auth .footer-widget {
        display: none !important;
    }

    body.page-auth .aiz-main-wrapper {
        min-height: 100vh;
        background: linear-gradient(180deg, #fafafa 0%, #f0ebe8 100%);
    }
}

/* Mobile header compaction */
@media (max-width: 991px) {
    .logo-bar-area .h-45px,
    .logo-bar-area .h-md-40px {
        height: 34px !important;
    }

    .logo-bar-area .py-20px {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .header-menu-strip {
        border-bottom: 1px solid #f0f0f0;
    }

    .header-menu-strip .list-inline-item a {
        font-size: 13px !important;
        padding: 6px 10px !important;
        white-space: nowrap;
    }

    .header-sub-nav .container .d-flex {
        gap: 4px;
    }

    .header-sub-nav a {
        font-size: 13px;
        padding: 8px 12px;
    }

    .logo-bar-area > .container > .d-flex {
        flex-wrap: nowrap;
    }

    .mobile-logo-col {
        flex: 0 1 auto;
        max-width: 36%;
        min-width: 0;
        padding-right: 6px !important;
    }

    .mobile-header-actions {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
        gap: 2px;
    }

    .mobile-header-auth {
        flex: 1 1 auto;
        justify-content: flex-end;
        min-width: 0;
        gap: 5px;
        margin-right: 2px;
    }

    .btn-mobile-auth {
        font-size: 11px;
        padding: 6px 9px;
        flex-shrink: 0;
    }

    .btn-mobile-auth span {
        display: inline !important;
    }

    .mobile-cart-link i,
    .mobile-icon-btn i {
        font-size: 1.45rem !important;
    }

    .mobile-icon-btn,
    .mobile-cart-link {
        padding: 5px !important;
        flex-shrink: 0;
    }

    .aiz-main-wrapper {
        padding-bottom: 68px;
    }

    body.page-auth .aiz-main-wrapper {
        padding-bottom: 0;
    }
}

@media (max-width: 575px) {
    .local-captcha-row {
        flex-wrap: wrap;
    }

    .local-captcha-input {
        flex: 1 1 100%;
        max-width: none;
        width: 100%;
    }

    .auth-modern-wrap {
        padding: 16px 12px 24px;
    }

    .auth-modern-card {
        padding: 22px 16px;
        border-radius: 14px;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .btn-mobile-auth {
        font-size: 11px;
        padding: 7px 10px;
    }
}
