﻿/* ==========================================================================
   PandaGadget — design system
   Palette: warm white / ink / bamboo green accent
   Type: Sora (display) + Inter (body) + JetBrains Mono (numbers/specs)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg: #FBF8F5;
    --surface: #FFFFFF;
    --ink: #151515;
    --ink-soft: #626066;
    --ink-faint: #A09DA0;
    --line: #E9E2DB;
    --line-soft: #F4F0EC;
    --accent: #D71920;
    --accent-dark: #9F1016;
    --accent-soft: #FFF1F1;
    --accent-soft-line: #F1B9BC;
    --danger: #C2472F;
    --danger-soft: #FBECE8;
    --gold: #F8D300;
    --font-display: "Sora", "Inter", sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 1px 2px rgba(21, 21, 21, 0.04), 0 10px 24px -14px rgba(21, 21, 21, 0.13);
    --shadow-card-hover: 0 1px 2px rgba(21, 21, 21, 0.05), 0 18px 36px -16px rgba(215, 25, 32, 0.26);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.gh-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

    .gh-header .container {
        padding-top: 9px;
        padding-bottom: 9px;
    }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    text-decoration: none;
}

    .brand:hover {
        color: inherit;
        text-decoration: none;
    }

.brand-logo {
    width: auto;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-faint);
    line-height: 1;
    text-align: left;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.gh-footer {
    border-top: 1px solid var(--line);
    margin-top: 56px;
    padding: 22px 0;
    font-size: 13.5px;
    color: var(--ink-faint);
}

    .gh-footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .gh-footer strong {
        color: var(--ink-soft);
        font-weight: 600;
    }

/* ==========================================================================
   Search / results
   ========================================================================== */

.taobao-page {
    padding-bottom: 40px;
}

.search-box {
    display: flex;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 5px;
    margin: 0 0 14px;
    box-shadow: var(--shadow-card);
}

    .search-box:focus-within {
        border-color: var(--accent-soft-line);
        box-shadow: 0 0 0 3px var(--accent-soft);
    }

    .search-box input[type="text"] {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        font-family: var(--font-body);
        font-size: 14px;
        color: var(--ink);
        min-width: 0;
        padding: 8px 8px 8px 10px;
    }

        .search-box input[type="text"]::placeholder {
            color: var(--ink-faint);
        }

    .search-box button {
        border: none;
        background: var(--ink);
        color: #fff;
        font-weight: 600;
        font-size: 13px;
        padding: 8px 13px;
        border-radius: 10px;
        cursor: pointer;
        white-space: nowrap;
    }

.error-box {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #F0CFC6;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 14px;
    margin-bottom: 20px;
}

.result-info {
    color: var(--ink-faint);
    font-size: 13.5px;
    margin-bottom: 16px;
}

/* ==========================================================================
   Product grid
   ========================================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

    .product-card:hover {
        transform: translateY(-3px);
        border-color: var(--accent-soft-line);
        box-shadow: var(--shadow-card-hover);
    }

.image-wrap {
    aspect-ratio: 1 / 1;
    background: var(--line-soft);
    overflow: hidden;
    position: relative;
}

    .image-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.35s var(--ease);
    }

.product-card:hover .image-wrap img {
    transform: scale(1.045);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    font-size: 12.5px;
    background: var(--line-soft);
}

.product-body {
    padding: 12px 13px 14px;
}

.product-title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.shop-title {
    font-size: 11.5px;
    color: var(--ink-faint);
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-box {
    margin-top: 9px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.main-price {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15.5px;
    color: var(--ink);
    position: relative;
}

.product-card:hover .main-price {
    color: var(--accent-dark);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding-bottom: 12px;
}

.page-btn {
    min-width: 82px;
    text-align: center;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

    .page-btn.disabled {
        color: var(--ink-faint);
        opacity: 0.45;
    }

.page-current {
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
}

/* ==========================================================================
   Details
   ========================================================================== */

.details-error {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #F0CFC6;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 14px;
}

.details-card {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.details-gallery {
    scroll-margin-top: 8px;
}

.details-info {
    min-width: 0;
}

.gallery-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.gallery-scroll {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

    .gallery-scroll::-webkit-scrollbar {
        display: none;
    }

.gallery-slide {
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .gallery-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 8px;
    }

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.gallery-dots {
    position: absolute;
    left: 50%;
    bottom: 13px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #c8c8c8;
}

    .gallery-dot.active {
        width: 14px;
        background: var(--accent);
    }

.details-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.details-title-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
}

.details-title {
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -0.02em;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

    .details-title.expanded {
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
    }

.details-title-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    margin-top: 1px;
    border: none;
    border-radius: 999px;
    background: var(--line-soft);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .details-title-toggle span {
        display: block;
        font-size: 20px;
        line-height: 1;
        transform: translateY(-2px);
        transition: transform 0.2s var(--ease);
    }

    .details-title-toggle.expanded span {
        transform: translateY(2px) rotate(180deg);
    }

    .details-title-toggle:hover {
        background: var(--accent-soft);
        color: var(--accent-dark);
    }

.details-price-box {
    text-align: left;
}

    .details-price-box strong {
        display: block;
        color: var(--accent-dark);
        font-family: var(--font-mono);
        font-size: 21px;
        font-weight: 700;
        line-height: 1.1;
    }

.sku-section-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
}

.sku-section-title {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}

.sku-picker {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 0;
}

.sku-group-title {
    margin-bottom: 7px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.sku-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sku-option {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 11px;
    cursor: pointer;
    line-height: 1.15;
    box-shadow: var(--shadow-card);
}

    .sku-option.active {
        border-color: var(--accent);
        background: var(--accent);
        color: #fff;
    }

    .sku-option.disabled,
    .sku-option:disabled {
        opacity: 0.38;
        cursor: not-allowed;
        background: var(--line-soft);
        color: var(--ink-faint);
        border-color: var(--line);
    }

        .sku-option.disabled:hover,
        .sku-option:disabled:hover {
            border-color: var(--line);
        }

.selected-sku-box {
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-line);
    border-radius: 13px;
    padding: 10px 12px;
    margin: 4px 0 12px;
}

    .selected-sku-box.d-none {
        display: none;
    }

.selected-sku-title {
    color: var(--accent-dark);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 5px;
}

.selected-sku-name {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 3px;
}

.selected-sku-stock {
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.2;
}

.product-info-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 11px;
    box-shadow: var(--shadow-card);
}

.product-info-title {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 9px;
}

.product-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-info-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 8px 9px;
}

.product-info-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.product-info-content {
    min-width: 0;
    flex: 1;
}

    .product-info-content span {
        display: block;
        color: var(--ink-faint);
        font-size: 10.5px;
        font-weight: 600;
        line-height: 1;
        margin-bottom: 4px;
    }

    .product-info-content strong {
        display: block;
        color: var(--ink);
        font-size: 12.5px;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.copy-article-btn {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.buy-bar-spacer {
    height: 78px;
}

.buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient( to top, var(--bg) 0%, var(--bg) 76%, rgba(250, 250, 247, 0) 100% );
    pointer-events: none;
}

.buy-btn {
    display: block;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    border: none;
    border-radius: 15px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    padding: 13px 16px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    pointer-events: auto;
}

    .buy-btn:active {
        transform: scale(0.98);
    }

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .taobao-page {
        padding-bottom: 20px;
    }

    .product-body {
        padding: 9px 10px 11px;
    }

    .product-title {
        font-size: 12.5px;
    }

    .shop-title {
        font-size: 10.8px;
    }

    .main-price {
        font-size: 14px;
    }

    .details-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .details-head {
        gap: 9px;
        margin-bottom: 12px;
    }

    .details-title-row {
        gap: 6px;
    }

    .details-title {
        font-size: 16px;
        line-height: 1.35;
    }

    .details-title-toggle {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .details-price-box strong {
        font-size: 18px;
    }

    .gallery-box {
        border-radius: 14px;
    }

    .gallery-slide img {
        padding: 6px;
    }

    .favorite-btn {
        width: 34px;
        height: 34px;
        font-size: 21px;
    }

    .sku-section-card {
        padding: 10px;
        border-radius: 13px;
    }

    .sku-section-title {
        font-size: 12.5px;
        margin-bottom: 10px;
    }

    .sku-picker {
        gap: 12px;
    }

    .sku-group-title {
        font-size: 11.5px;
    }

    .sku-option {
        font-size: 12px;
        padding: 7px 9px;
    }

    .selected-sku-box {
        padding: 9px 10px;
    }

    .product-info-box {
        padding: 10px;
    }

    .product-info-row {
        padding: 7px 8px;
    }

    .product-info-content strong {
        font-size: 12px;
    }

    .buy-bar {
        padding-left: 14px;
        padding-right: 14px;
    }

    .buy-btn {
        padding: 13px 16px;
        border-radius: 14px;
    }
}

/* ==========================================================================
   Shop navigation and shop page
   ========================================================================== */

.shop-entry-card {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-width: 0;
    margin-bottom: 12px;
    padding: 11px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

    .shop-entry-card:hover {
        color: inherit;
        transform: translateY(-2px);
        border-color: var(--accent-soft-line);
        box-shadow: var(--shadow-card-hover);
    }

.shop-entry-card-disabled {
    cursor: default;
}

    .shop-entry-card-disabled:hover {
        transform: none;
        border-color: var(--line);
        box-shadow: var(--shadow-card);
    }

.shop-entry-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent-soft);
    font-size: 17px;
}

.shop-entry-content {
    min-width: 0;
    flex: 1;
}

.shop-entry-label {
    display: block;
    margin-bottom: 3px;
    color: var(--ink-faint);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shop-entry-content strong {
    display: block;
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-entry-arrow {
    flex: 0 0 auto;
    color: var(--accent-dark);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s var(--ease);
}

.shop-entry-card:hover .shop-entry-arrow {
    transform: translateX(3px);
}

.product-meta-box {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.product-meta-row {
    display: grid;
    grid-template-columns: minmax(90px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 45px;
    padding: 7px 9px 7px 12px;
    background: var(--surface);
}

    .product-meta-row strong {
        min-width: 0;
        color: var(--ink);
        font-family: var(--font-mono);
        font-size: 12px;
        font-weight: 600;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.product-meta-label {
    color: var(--ink-faint);
    font-size: 11.5px;
    font-weight: 600;
}

.shop-page-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 15px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

.shop-page-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--accent-soft);
    font-size: 22px;
}

.shop-page-heading {
    min-width: 0;
}

.shop-page-eyebrow {
    margin-bottom: 4px;
    color: var(--ink-faint);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop-page-heading h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-page-count {
    margin-top: 5px;
    color: var(--ink-faint);
    font-size: 11.5px;
}

.shop-page-back {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--bg);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

    .shop-page-back:hover {
        color: var(--accent-dark);
        border-color: var(--accent-soft-line);
        background: var(--accent-soft);
    }

.shop-empty-box {
    padding: 28px 18px;
    color: var(--ink-faint);
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 16px;
}

@media (max-width: 480px) {
    .shop-entry-card {
        padding: 10px;
    }

    .shop-entry-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .product-meta-row {
        grid-template-columns: minmax(82px, auto) minmax(0, 1fr) auto;
        gap: 7px;
        padding-left: 10px;
    }

    .shop-page-banner {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 11px;
        padding: 12px;
    }

    .shop-page-icon {
        width: 42px;
        height: 42px;
        font-size: 19px;
    }

    .shop-page-heading h1 {
        font-size: 15.5px;
    }

    .shop-page-back {
        grid-column: 1 / -1;
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Infinite product loading
   ========================================================================== */

.infinite-sentinel {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 0 4px;
}

.infinite-status {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: var(--shadow-card);
    transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}

    .infinite-status.loading {
        border-color: var(--accent-soft-line);
        background: var(--accent-soft);
        color: var(--accent-dark);
    }

    .infinite-status.done {
        border-style: dashed;
        color: var(--ink-faint);
        box-shadow: none;
    }

    .infinite-status.error {
        cursor: pointer;
        color: var(--danger);
        background: var(--danger-soft);
        border-color: #F0CFC6;
    }

        .infinite-status.error:hover {
            transform: translateY(-1px);
        }

.infinite-spinner {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    opacity: 0;
}

.infinite-status.loading .infinite-spinner {
    opacity: 1;
    animation: infinite-spin .75s linear infinite;
}

.infinite-status.ready .infinite-spinner,
.infinite-status.done .infinite-spinner,
.infinite-status.error .infinite-spinner {
    display: none;
}

@keyframes infinite-spin {
    to {
        transform: rotate(360deg);
    }
}

.shop-entry-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.shop-entry-arrow {
    margin-left: auto;
    color: var(--ink-faint);
    font-size: 15px;
    transition: .2s;
}

.shop-entry-card:hover .shop-entry-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* ==========================================================================\n   Final details controls polish\n   ========================================================================== */

.details-title-toggle {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    margin-top: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink-soft);
    box-shadow: 0 6px 18px -12px rgba(21, 21, 21, 0.55);
    transition: transform .2s var(--ease), color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

    .details-title-toggle span {
        display: flex;
        align-items: center;
        justify-content: center;
        transform: none;
        font-size: 13px;
        transition: transform .24s var(--ease);
    }

    .details-title-toggle:hover {
        background: var(--accent-soft);
        color: var(--accent);
        border-color: var(--accent-soft-line);
        box-shadow: 0 9px 22px -13px rgba(215, 25, 32, 0.55);
        transform: translateY(-1px);
    }

    .details-title-toggle.expanded span {
        transform: rotate(180deg);
    }

.favorite-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(233, 226, 219, .95);
    background: rgba(255, 255, 255, .94);
    color: var(--ink-soft);
    font-size: 17px;
    backdrop-filter: blur(8px);
    transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

    .favorite-btn:hover {
        color: var(--accent);
        background: #fff;
        border-color: var(--accent-soft-line);
        transform: translateY(-1px) scale(1.03);
        box-shadow: 0 12px 26px -15px rgba(215, 25, 32, .58);
    }

    .favorite-btn.active {
        color: #fff;
        background: var(--accent);
        border-color: var(--accent);
        box-shadow: 0 12px 26px -13px rgba(215, 25, 32, .68);
    }

    .favorite-btn:active {
        transform: scale(.94);
    }

.copy-article-btn {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 14px -12px rgba(21, 21, 21, .6);
    transition: transform .18s var(--ease), color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

    .copy-article-btn:hover {
        color: var(--accent);
        background: var(--accent-soft);
        border-color: var(--accent-soft-line);
        transform: translateY(-1px);
    }

    .copy-article-btn.copied {
        color: #fff;
        background: #20965a;
        border-color: #20965a;
        box-shadow: 0 9px 20px -13px rgba(32, 150, 90, .75);
    }

.shop-entry-arrow {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: transform .2s var(--ease), color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.shop-entry-card:hover .shop-entry-arrow {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateX(2px);
    box-shadow: 0 9px 20px -13px rgba(215, 25, 32, .7);
}

.shop-entry-icon {
    border: 1px solid var(--accent-soft-line);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), opacity .18s var(--ease);
}

    .buy-btn:not(:disabled):hover {
        background: var(--accent-dark);
        box-shadow: 0 16px 32px -16px rgba(215, 25, 32, .72);
        transform: translateY(-1px);
    }

    .buy-btn:disabled {
        cursor: not-allowed;
        opacity: .52;
        background: var(--ink-faint);
    }

.buy-notice {
    position: fixed;
    left: 50%;
    bottom: 86px;
    z-index: 100;
    max-width: calc(100% - 28px);
    padding: 11px 15px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(21, 21, 21, .94);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 16px 40px -18px rgba(21, 21, 21, .75);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .22s var(--ease), transform .22s var(--ease);
}

    .buy-notice.show {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    .buy-notice i {
        color: #70df9d;
    }

@media (max-width: 480px) {
    .details-title-toggle {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .favorite-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .shop-entry-arrow {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
}

.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

    .buy-btn i {
        font-size: 19px;
    }

    .buy-btn:disabled {
        cursor: not-allowed;
        opacity: 0.55;
    }

.gallery-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .gallery-actions .favorite-btn,
    .gallery-actions .share-btn {
        position: static;
    }

.share-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(233, 226, 219, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(21, 21, 21, 0.12);
    backdrop-filter: blur(8px);
    transition: transform 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

    .share-btn:hover {
        color: var(--accent-dark);
        background: var(--accent-soft);
        border-color: var(--accent-soft-line);
        transform: translateY(-2px);
    }

    .share-btn:active {
        transform: scale(0.94);
    }

@media (max-width: 480px) {
    .gallery-actions {
        top: 9px;
        right: 9px;
        gap: 7px;
    }

    .share-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}