/* app-creative.min.css - Corporate Trust Design System Overrides */

/* --- 0. Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* --- Design Tokens (Consistent with previous system) --- */
    --color-primary: #4F46E5; /* Indigo 600 */
    --color-primary-end: #7C3AED; /* Violet 600 */
    --color-primary-gradient: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-end) 100%);
    
    --color-bg-body: #F8FAFC;    /* Slate 50 */
    --color-bg-surface: #ffffff; /* White */
    
    --color-text-main: #0F172A;      /* Slate 900 */
    --color-text-secondary: #334155; /* Slate 700 */
    --color-text-muted: #64748B;     /* Slate 500 */
    
    --color-border: #E2E8F0;       /* Slate 200 */
    --color-danger: #EF4444;       /* Red 500 */
    
    --font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --radius-md: 8px;
    --radius-lg: 12px; /* Standard Card Radius */
    
    /* Colored Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(79, 70, 229, 0.1), 0 4px 6px -2px rgba(79, 70, 229, 0.05);
    --shadow-lift: 0 20px 25px -5px rgba(79, 70, 229, 0.15), 0 10px 10px -5px rgba(79, 70, 229, 0.1);
    
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Global Reset & Typography --- */
body {
    font-family: var(--font-family);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    /* Atmospheric Background Effect */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    height: 100%;
    -webkit-font-smoothing: antialiased;
}

body, .wrapper, .content-page { overflow: visible; }

/* Focus States (Accessibility) */
.btn-danger:focus,
.btn-outline-primary:focus,
.btn-primary:focus,
.tab-link:focus,
.pay-type:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3) !important;
    outline: none;
}

/* --- Header Section --- */
.header-navbar {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.9); /* Glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm); /* Subtle shadow instead of heavy gray */
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-title {
    font-size: 22px;
    font-weight: 800; /* Extra Bold */
    display: inline-block;
    color: var(--color-primary); /* Brand Color */
    margin-left: 10px;
    vertical-align: middle;
    font-family: var(--font-family); /* Removed SimHei */
    letter-spacing: -0.03em;
}

/* --- Layout Utils --- */
body[data-leftbar-compact-mode=condensed] { min-height: 0; }
body[data-layout=topnav] .content-page { padding: 0!important; min-height: 0; }
.content { margin-bottom: 69px; }
.page-title-right { display: block !important; float: right !important; margin-top: 17px !important; }

@media screen and (max-width: 380px) { .app-search { width: 160px; } }

/* Footer */
.hyper-wrapper a { color: var(--color-text-main); font-weight: 500; }
.hyper-footer {
    position: absolute;
    width: 100%;
    bottom: 0;
    padding: 24px 0;
    line-height: 1.5;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    background: var(--color-bg-body);
    font-size: 13px;
}
@media screen and (max-width: 768px) { .hyper-footer { text-align: center; } }
.hyper-footer a { color: var(--color-text-secondary); transition: var(--transition-base); }
.hyper-footer a:hover { color: var(--color-primary); }

@media screen and (max-width: 576px) { .container { padding: 0 16px; } }
@media screen and (min-width: 576px) { .container { padding: 0; } }
@media screen and (min-width: 992px) {
    .hyper-sm-last { -webkit-box-ordinal-group: 14; -ms-flex-order: 13; order: 13; }
}

/* --- Modals --- */
.modal-header {
    padding: 16px 24px !important;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lift);
}
.modal-body { padding: 24px; }
.modal-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

@media screen and (min-width: 1367px) { .modal-dialog { max-width: 900px !important; } }
@media screen and (max-width: 1367px) { .modal-dialog { max-width: 700px !important; } }
@media screen and (max-width: 768px) { .modal-dialog { max-width: 500px !important; } }

/* --- Navigation Tabs (Pills) --- */
.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Increased gap */
    margin-bottom: 24px;
}
.nav-list::-webkit-scrollbar { display: none; }

.tab-link {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 99px; /* Pill shape */
    border: 1px solid var(--color-border);
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
    cursor: pointer;
}

@media screen and (min-width: 767px) { .tab-link { min-width: 100px; } }
@media screen and (max-width: 767px) { .tab-link { min-width: 80px; } }

.tab-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.tab-link.active {
    color: #fff;
    background: var(--color-primary-gradient); /* Gradient from design tokens */
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.img-checkmark img { width: 36px; }
.tab-link.active .img-checkmark { display: block; }
.img-checkmark {
    position: absolute;
    opacity: 0.8;
    right: -6px;
    bottom: -12px;
    display: none;
    filter: brightness(100); /* Make checkmark white */
}

/* --- Home Card (The Core Product Card) --- */
.home-card {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); /* 12px */
    box-shadow: var(--shadow-sm); /* Subtle start */
    transition: var(--transition-bounce); /* Physics bounce */
    position: relative;
    overflow: hidden;
}

/* Floating Effect on Hover */
.home-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg); /* Colored shadow */
    border-color: var(--color-primary);
}

.home-img {
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Responsive Grid Logic (Preserved) */
@media screen and (max-width: 767px) {
    .hyper-wrapper {
        padding-left: 0; padding-right: 0; display: grid; grid-gap: 12px; gap: 12px;
    }
    .home-card {
        padding: 16px; margin-bottom: 0; font-size: 14px; display: flex; align-items: center; cursor: pointer;
    }
    .home-img { max-width: 70px; margin-right: 16px; }
    .flex { display: flex; flex-direction: column; width: 100%; }
    .name {
        font-size: 15px; font-weight: 600; color: var(--color-text-main);
        min-height: auto; margin-bottom: 4px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: left;
    }
    .price { color: var(--color-primary); font-weight: 700; } /* Use Primary Color */
    .price b { font-size: 16px; }
}

@media screen and (min-width: 768px) {
    .hyper-wrapper { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 20px; } /* Increased gap */
    .home-card {
        padding: 24px; font-size: 14px; display: flex; flex-direction: column; cursor: pointer; height: 100%;
    }
    .home-img { max-width: 100%; margin: 0 auto 16px auto; }
    .flex { display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; margin-top: 0; }
    .name {
        font-size: 16px; font-weight: 700; color: var(--color-text-main);
        min-height: 48px; line-height: 1.4;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .price { color: var(--color-primary); text-align: left; margin-top: 12px; }
    .price b { font-size: 20px; font-weight: 800; }
}

@media screen and (min-width: 992px) {
    .hyper-wrapper { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media screen and (min-width: 1320px) {
    .hyper-wrapper { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

/* --- Buy Page --- */
.form-group h3 {
    font-weight: 700;
    color: var(--color-text-main);
    font-size: 20px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.geetest_holder.geetest_wind { width: 100% !important; min-width: 100% !important; margin-top: 10px; }

.buy-product img {
    max-width: 100%; height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition-base);
}
.buy-product img:hover { transform: scale(1.02); }

@media screen and (min-width: 992px) {
    .buy-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
    .sticky { position: -webkit-sticky; position: sticky; top: 90px; } /* Adjusted for header */
    .buy-shop { grid-column: span 2 / span 2; }
    .buy-product { grid-column: span 4 / span 4; }
}

/* --- Pay Type (Selection Cards) --- */
@media screen and (min-width: 1367px) { .pay-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 16px; } }
@media screen and (min-width: 991px) and (max-width: 1367px) { .pay-grid { display: grid; grid-template-columns: repeat(1,minmax(0,1fr)); grid-gap: 12px; } }
@media screen and (min-width: 768px) and (max-width: 991px) { .pay-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-gap: 12px; } }
@media screen and (min-width: 576px) and (max-width: 768px) { .pay-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 12px; } }
@media screen and (max-width: 576px) { .pay-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-gap: 12px; } }
@media screen and (max-width: 380px) { .pay-grid { grid-template-columns: repeat(1,minmax(0,1fr)); } }

.pay-type {
    background-color: var(--color-bg-surface);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
    font-weight: 600;
    transition: var(--transition-base);
    cursor: pointer;
}

.pay-type:hover {
    background-color: #F1F5F9;
    color: var(--color-text-main);
    border-color: #CBD5E1;
}

.pay-type.active {
    background-color: #EEF2FF; /* Indigo 50 */
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary); /* Doubled border effect */
}

.buy-price {
    color: var(--color-danger); /* Keep red for final total warning/attention */
    font-weight: 800;
    font-size: 24px;
}

/* --- Order Info Page --- */
.orderinfo-grid { display: grid; grid-template-columns: auto; gap: 24px; }

@media screen and (min-width: 767px) {
    .orderinfo-card-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); grid-gap: 24px; }
    .orderinfo-info { grid-column: span 2 / span 2; }
    .orderinfo-kami { grid-column: span 4 / span 4; }
}

@media screen and (max-width: 767px) {
    .orderinfo-info { display: grid; justify-content: center; }
}

.textarea-kami {
    min-height: calc(100% - 48px - 38px);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 16px;
    font-family: monospace;
    background: #F8FAFC;
}
.textarea-kami:focus {
    border-color: var(--color-primary);
    background: #fff;
    outline: none;
}

.kami-btn {
    margin-top: 16px;
    float: right;
    /* Assume this is a button, style implied by generic btn-primary elsewhere, 
       but we can reinforce standard spacing here */
}

/* --- Back to Top --- */
.back-to-top {
    display: none; position: fixed; bottom: 80px; right: 30px; z-index: 99;
}
#back-to-top {
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; width: 48px; height: 48px;
    background-image: var(--color-primary-gradient);
    box-shadow: var(--shadow-lg);
    color: white;
    transition: var(--transition-bounce);
    cursor: pointer;
    border: none;
}
#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}