/* YunToken Theme - BreezyCV Style */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { width: 100%; height: 100%; overflow: hidden; }

body {
    background-color: #f0f5f7;
    width: 100%; height: 100%;
    font-size: 15px;
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.65em;
    overflow: hidden;
    color: #555;
}

h1, h2, h3, h4, h5, h6 { color: #222; font-weight: 600; }
a { color: #e8713a; text-decoration: none; transition: all 0.3s ease-in-out; }

/* Animated Background */
.animated-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e8713a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

/* Page Container */
.page {
    display: block; width: 100%; height: 100%; padding: 0 100px; overflow: hidden;
}

.page-content {
    position: relative;
    width: 100%; max-width: 1280px;
    min-height: 80vh; height: 80vh;
    margin: 10vh auto;
    background: linear-gradient(160deg, #e8713a, #f5a66e);
    box-shadow: 0 0 80px -5px rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    backface-visibility: hidden;
    overflow: visible;
}

/* Header / Left Sidebar */
.header {
    display: inline-block;
    float: left;
    width: 100%; max-width: 320px;
    height: 100%; max-height: 80vh;
    min-height: inherit;
    text-align: center;
    padding: 50px 25px 30px;
    overflow: auto;
}

.header-content { margin-bottom: 30px; }

.header-photo {
    position: relative;
    width: 120px; height: 120px;
    margin: 0 auto 20px;
    z-index: 1;
    display: flex; align-items: center; justify-content: center;
}

.header-photo::after {
    position: absolute; opacity: 0.3;
    top: 7%; left: 7%;
    border-radius: 50%; content: '';
    height: 100%; width: 100%;
    background-image: repeating-radial-gradient(center center, #fff, #fff 1px, transparent 0px, transparent 100%);
    background-size: 6px 6px;
    z-index: -1;
}

.header-titles h2 {
    font-size: 22px; font-weight: 700; color: #fff;
    margin: 5px 0; line-height: 1.3em;
}

/* Header Notice */
.header-notice {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    margin: 20px 10px;
}

.header-notice h4 {
    color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 8px;
}

.notice-text {
    color: rgba(255,255,255,0.88); font-size: 12px; line-height: 1.7;
    word-wrap: break-word;
}

/* Header Footer */
.header-footer {
    position: absolute; bottom: 0; left: 0;
    width: 320px; padding: 15px 10px;
    text-align: center;
}

.header-footer p { color: rgba(255,255,255,0.4); font-size: 11px; }

/* Header Action Buttons (drawer) */
.header-actions {
    margin: 18px 18px 0;
    display: flex; flex-direction: column; gap: 10px;
}
.header-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px; font-weight: 500;
    text-decoration: none;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.header-btn:hover { transform: translateY(-1px); }
.header-btn-icon { font-size: 16px; line-height: 1; }
.header-btn-primary {
    background: #fff; color: #e8713a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.header-btn-primary:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.18); color: #d65a23; }
.header-btn-soft {
    background: rgba(255,255,255,0.92); color: #e8713a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.header-btn-soft:hover { background: #fff; color: #d65a23; box-shadow: 0 3px 10px rgba(0,0,0,0.14); }
.header-btn-ghost {
    background: rgba(255,255,255,0.16); color: #fff;
    border: 1px solid rgba(255,255,255,0.32);
}
.header-btn-ghost:hover { background: rgba(255,255,255,0.26); }

/* Sidebar Toggle */
.sidebar-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 320px;
    z-index: 20;
    border: none;
    cursor: pointer;
    height: 50px;
    width: 24px;
    background: #fff;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.12);
    border-radius: 0 8px 8px 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle::after {
    content: "◀";
    color: #e8713a;
    font-size: 12px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.sidebar-collapsed .sidebar-toggle::after {
    transform: translateX(-2px);
    content: "▶";
}

/* Floating Navigation - Right Side */
.float-nav {
    position: fixed;
    padding: 15px 0;
    width: 60px;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    border-radius: 30px;
    z-index: 999;
    list-style: none;
    box-shadow: 0 0 30px -5px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.float-nav-item {
    display: block;
    position: relative;
    color: #b5b6b7;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
}

.float-nav-item:hover,
.float-nav-item.active {
    color: #e8713a;
}

.nav-icon-text { font-size: 22px; line-height: 1; }

.nav-tooltip {
    position: absolute;
    visibility: hidden; opacity: 0;
    color: #fff;
    padding: 4px 12px;
    background-color: #e8713a;
    white-space: nowrap;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 5px 10px -3px rgba(0, 0, 0, 0.2);
}

.nav-tooltip::after {
    content: '';
    position: absolute;
    right: -6px; top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #e8713a;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.float-nav-item:hover .nav-tooltip {
    visibility: visible; opacity: 1;
}

/* Content Area */
.content-area {
    position: absolute;
    right: 0;
    background-color: transparent;
    height: 100%;
    width: 100%;
    max-width: calc(100% - 320px);
}

.animated-section {
    position: absolute;
    background-color: #fff;
    height: 100%; width: 100%;
    border-radius: 30px;
    padding: 50px;
    overflow: auto;
    opacity: 0; visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.animated-section.section-active {
    opacity: 1; visibility: visible; z-index: 99;
    animation: fadeInSection 0.5s ease;
}

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

/* Page Title - with dot decoration */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    padding-right: 25px;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.back-to-home:hover {
    background: #e8713a;
    color: #fff;
}

.page-header::after {
    position: absolute; opacity: 0.45;
    top: 10px; right: 0;
    content: ''; height: 30px; width: 50px;
    background-image: repeating-radial-gradient(center center, #e8713a, #e8713a 1px, transparent 0px, transparent 100%);
    background-size: 6px 6px;
    z-index: 0;
}

.page-title {
    position: relative;
    font-size: 28px; z-index: 1;
    display: inline;
}

.text-accent { color: #e8713a; }

/* Search */
.search-bar {
    display: flex; gap: 8px;
    margin-bottom: 20px; max-width: 400px;
}

.search-input {
    flex: 1; height: 42px;
    padding: 10px 16px;
    border: 2px solid #d5d6d7;
    border-radius: 5px;
    font-size: 14px; outline: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 10px 10px -8px rgba(0, 0, 0, 0.08);
}

.search-input:focus { border-color: #e8713a; }

.search-btn {
    padding: 10px 24px;
    background-color: #fff; color: #222;
    border: 2px solid #e8713a;
    border-radius: 30px;
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 10px 10px -8px rgba(0, 0, 0, 0.15);
}

.search-btn:hover { background-color: #e8713a; color: #fff; }

/* Category Tabs */
.category-tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 24px; list-style: none;
}

.tab-item {
    padding: 8px 18px;
    border: 2px solid #d5d6d7;
    border-radius: 30px;
    font-size: 13px; font-weight: 500;
    color: #666; text-decoration: none;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    box-shadow: 0px 8px 10px -8px rgba(0, 0, 0, 0.08);
}

.tab-item:hover { border-color: #e8713a; color: #e8713a; }

.tab-item.active {
    background-color: #e8713a; border-color: #e8713a; color: #fff;
}

/* Products Grid */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.4s ease; }

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none; color: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.35s ease-in-out;
    display: block;
    animation: cardIn 0.5s ease backwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(232, 113, 58, 0.18);
}

.product-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #fef3ec 0%, #fff5ee 100%);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%; height: 100%; object-fit: contain; padding: 8%;
}

.product-info {
    padding: 14px 16px;
}

.product-name {
    font-size: 16px; font-weight: 600; color: #222;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px;
}

.product-price {
    display: inline-block;
    font-size: 14px; font-weight: 700; color: #e8713a;
    margin-right: 8px;
}

.product-stock {
    display: inline-block;
    font-size: 11px; color: #999;
}

.product-discount {
    display: block;
    font-size: 11px; color: #f59e0b; font-weight: 500; margin-top: 2px;
}

/* Buy Page */
.buy-container { max-width: 700px; }

.buy-card { background: #fff; border-radius: 15px; padding: 28px; }

.buy-card-header {
    display: flex; gap: 20px;
    margin-bottom: 24px; padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.buy-product-img {
    width: 100px; height: 100px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef3ec 0%, #fff5ee 100%);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.buy-product-img img { width: 75%; height: 75%; object-fit: contain; }
.buy-product-info { flex: 1; }
.buy-product-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.buy-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.buy-price { font-size: 22px; font-weight: 700; color: #e8713a; }
.buy-stock { font-size: 13px; color: #999; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge-auto { background: #d1fae5; color: #065f46; }
.badge-manual { background: #fef3c7; color: #92400e; }
.badge-limit { background: #fee2e2; color: #991b1b; }

.wholesale-info { margin-top: 8px; }
.wholesale-tag {
    display: inline-block; background: #f3f4f6;
    padding: 4px 10px; border-radius: 4px;
    font-size: 12px; color: #666; margin: 2px 4px 2px 0;
}

/* Form */
.form-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 14px; margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 500; color: #666; }

.form-input {
    height: 42px; padding: 10px 14px;
    border: 2px solid #d5d6d7; border-radius: 5px;
    font-size: 14px; outline: none;
    transition: all 0.3s ease-in-out; width: 100%;
    box-shadow: 0px 10px 10px -8px rgba(0, 0, 0, 0.08);
}

.form-input:focus { border-color: #e8713a; }

.number-input { display: flex; align-items: center; }

.num-btn {
    width: 36px; height: 42px;
    border: 2px solid #d5d6d7; background: #fff;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}

.num-btn:hover { background: #e8713a; color: #fff; border-color: #e8713a; }
.num-minus { border-radius: 5px 0 0 5px; }
.num-plus { border-radius: 0 5px 5px 0; }
.num-value { border-radius: 0; text-align: center; width: 56px; border-left: none; border-right: none; }

.captcha-group { display: flex; gap: 8px; align-items: center; }
.captcha-img { height: 42px; border-radius: 5px; cursor: pointer; }

/* Pay Methods */
.pay-methods { margin-bottom: 20px; }
.pay-label { font-size: 13px; font-weight: 500; color: #666; display: block; margin-bottom: 10px; }
.pay-options { display: flex; flex-wrap: wrap; gap: 10px; }

.pay-option {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 18px;
    border: 2px solid #d5d6d7; border-radius: 30px;
    cursor: pointer; transition: all 0.3s;
    font-size: 13px;
    box-shadow: 0px 8px 10px -8px rgba(0, 0, 0, 0.08);
}

.pay-option:has(input:checked) { border-color: #e8713a; background: #fef3ec; }
.pay-option input { accent-color: #e8713a; }

/* Submit Button */
.submit-btn {
    display: inline-block; width: 100%; padding: 14px;
    background-color: #fff; color: #222;
    border: 2px solid #e8713a; border-radius: 30px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 10px 10px -8px rgba(0, 0, 0, 0.15);
}

.submit-btn:hover { background-color: #e8713a; color: #fff; }

/* Description Card */
.desc-card {
    border: 2px solid #eee; border-radius: 15px;
    padding: 20px; margin-top: 20px;
}

.desc-title {
    font-size: 15px; font-weight: 600;
    margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.desc-content { font-size: 14px; color: #666; line-height: 1.7; }

/* Search Order */
.search-order-container { max-width: 420px; }

.search-order-card {
    border: 2px solid #eee; border-radius: 15px; padding: 28px;
}

.search-order-desc { color: #666; font-size: 14px; margin-bottom: 20px; }
.search-order-form { display: flex; flex-direction: column; gap: 12px; }

.search-error {
    background: #fef2f2; border: 1px solid #fecaca;
    color: #dc2626; padding: 10px 14px;
    border-radius: 5px; font-size: 13px; margin-bottom: 12px;
}

/* Order Info */
.order-info-container { max-width: 600px; }
.order-card { border: 2px solid #eee; border-radius: 15px; padding: 28px; }

.order-status {
    text-align: center; padding: 14px; border-radius: 8px;
    font-size: 15px; font-weight: 600; margin-bottom: 20px;
}

.status-success { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-icon { margin-right: 6px; }
.order-details { margin-bottom: 20px; }

.order-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #eee; font-size: 14px;
}

.order-label { color: #999; }
.order-value { font-weight: 500; }
.order-value.price { color: #e8713a; font-weight: 700; }

.order-result { background: #f9fafb; border-radius: 8px; padding: 16px; }
.order-result h4 { font-size: 14px; margin-bottom: 8px; }
.card-info { font-size: 13px; word-break: break-all; line-height: 1.8; }

/* QR Pay */
.qrpay-container { max-width: 380px; margin: 0 auto; }
.qrpay-card { border: 2px solid #eee; border-radius: 15px; padding: 28px; text-align: center; }
.qrpay-amount { margin-bottom: 20px; }
.qrpay-label { display: block; font-size: 13px; color: #999; margin-bottom: 4px; }
.qrpay-price { font-size: 28px; font-weight: 700; color: #e8713a; }
.qrpay-code img { width: 180px; height: 180px; border-radius: 8px; }
.qrpay-tip { margin-top: 14px; font-size: 13px; color: #999; }
.qrpay-order { margin-top: 6px; font-size: 12px; color: #999; }

/* Bill */
.bill-container { max-width: 500px; }
.bill-card { border: 2px solid #eee; border-radius: 15px; padding: 28px; }
.bill-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eee;
}
.bill-amount { font-size: 22px; font-weight: 700; color: #e8713a; }

/* Error Page */
.error-container { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.error-card { text-align: center; }
.error-code { font-size: 64px; font-weight: 700; color: #e8713a; line-height: 1; }
.error-message { font-size: 16px; color: #999; margin-top: 8px; }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed; top: 20px; right: 20px;
    width: 44px; height: 44px;
    background: #fff; border-radius: 50%;
    z-index: 1000; cursor: pointer;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    align-items: center; justify-content: center;
    flex-direction: column; gap: 5px; padding: 12px;
}

.menu-toggle span {
    display: block; width: 20px; height: 2px;
    background: #222; border-radius: 2px; transition: all 0.3s;
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Responsive */
@media only screen and (max-width: 1024px) {
    .page { padding: 0; overflow: auto; }

    .page-content {
        flex-direction: column;
        height: auto; min-height: 100vh;
        margin: 0; border-radius: 0;
        overflow: hidden;
    }

    .header {
        position: fixed; top: 0; left: -280px;
        width: 280px; height: 100vh;
        max-width: 280px; max-height: 100vh;
        z-index: 999;
        background: linear-gradient(160deg, #e8713a, #f5a66e);
        border-radius: 0 20px 20px 0;
        transition: left 0.3s ease;
        float: none;
        box-shadow: 5px 0 30px rgba(0,0,0,0.2);
    }

    .header.mobile-visible { left: 0; }

    .float-nav { display: none; }

    .content-area {
        position: relative; max-width: 100%; width: 100%;
    }

    .animated-section {
        position: relative; border-radius: 0;
        padding: 24px 16px; min-height: 100vh;
    }

    .menu-toggle { display: flex; }

    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .form-grid { grid-template-columns: 1fr; }

    .buy-card-header {
        flex-direction: column; align-items: center; text-align: center;
    }

    .header-footer { position: static; width: 100%; margin-top: auto; }
    .header-actions { margin: 14px 18px 0; }
}

@media only screen and (min-width: 1025px) {
    .menu-toggle { display: none !important; }
}

/* Order Info - Bill Rows */
.bill-info { margin-top: 0; }

.bill-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px;
}

.bill-label { color: #999; }
.bill-value { font-weight: 500; color: #333; }
