* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f1ec;
    color: #222;
}

body.modal-open {
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #171717, #2d241b);
    color: white;
    text-align: center;
    padding: 52px 20px;
}

header h1 {
    margin: 0 0 10px;
    font-size: 42px;
    letter-spacing: 0.5px;
}

header p {
    margin: 0;
    color: #ddd;
}

main {
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 20px;
}

.notice {
    background: #fff8df;
    border: 1px solid #ecdca6;
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 24px;
    color: #4d3a12;
}

.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 26px;
    background: white;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

.toolbar input,
.toolbar select {
    padding: 13px 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: #222;
}

.toolbar input {
    flex: 1;
}

.toolbar select {
    min-width: 170px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.product-card:hover,
.product-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.14);
}

.product-image-wrap {
    position: relative;
    background: #ddd;
}

.product-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.product-image-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.16);
}

.product-info {
    padding: 18px;
}

.product-category {
    margin: 0 0 8px;
    color: #777;
    font-size: 14px;
}

.product-info h3 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.3;
}

.price {
    font-size: 20px;
    font-weight: bold;
    margin: 8px 0;
    color: #111;
}

.stock {
    display: inline-block;
    padding: 6px 11px;
    background: #d4edda;
    color: #155724;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.in-stock {
    background: #d4edda;
    color: #155724;
}

.low-stock {
    background: #fff3cd;
    color: #856404;
}

.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.description {
    margin-top: 12px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-message {
    grid-column: 1 / -1;
    background: white;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    color: #666;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.product-modal.is-open {
    display: block;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.58);
}

.product-modal-content {
    position: relative;
    max-width: 860px;
    width: calc(100% - 34px);
    max-height: calc(100vh - 44px);
    margin: 22px auto;
    background: white;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,0.34);
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
}

.product-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.72);
    color: white;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.product-modal-image {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    background: #ddd;
}

.product-modal-info {
    padding: 34px 28px;
    overflow-y: auto;
}

.modal-category {
    margin: 0 0 10px;
    color: #777;
}

.product-modal-info h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.25;
}

.modal-price {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: bold;
}

.modal-description {
    margin-top: 18px;
    line-height: 1.7;
    color: #555;
    white-space: pre-wrap;
}

footer {
    text-align: center;
    padding: 32px 20px;
    color: #666;
}

@media (max-width: 700px) {
    .toolbar {
        flex-direction: column;
        padding: 14px;
    }

    .toolbar select {
        min-width: 100%;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card img {
        height: 235px;
    }

    .product-modal-content {
        display: block;
        width: calc(100% - 22px);
        margin: 11px auto;
        max-height: calc(100vh - 22px);
        overflow-y: auto;
    }

    .product-modal-image {
        min-height: 0;
        height: 290px;
    }

    .product-modal-info {
        padding: 24px 20px;
    }

    .product-modal-info h2 {
        font-size: 25px;
    }
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.category-button {
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f7f7f7;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-button:hover,
.category-button.active {
    background: #1f1f1f;
    color: white;
    border-color: #1f1f1f;
}

@media (max-width: 700px) {
    .category-buttons {
        width: 100%;
    }

    .category-button {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }
}

/*!* First batch front-page improvements *!*/
/*.site-header {*/
/*    padding: 34px 20px;*/
/*}*/

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 96px 1fr 96px;
    align-items: center;
    gap: 20px;
}

.header-title-area {
    min-width: 0;
}

header h1,
#site-title {
    margin-bottom: 8px;
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 900;
    line-height: 1.08;
}

.site-subtitle {
    margin: 0 0 8px;
    font-size: clamp(17px, 2.1vw, 24px);
    font-weight: 600;
    color: #f4ead8;
    letter-spacing: 0.4px;
}

.site-note {
    margin: 0;
    color: #d8d8d8;
    font-size: 14px;
}

.logo-placeholder,
.header-qr-placeholder,
.footer-qr-placeholder,
.qr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255,255,255,0.55);
    border-radius: 18px;
    color: rgba(255,255,255,0.78);
    background: rgba(255,255,255,0.08);
    font-size: 14px;
    font-weight: 700;
    aspect-ratio: 1 / 1;
}

.logo-placeholder,
.header-qr-placeholder {
    width: 86px;
    height: 86px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 6px;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1eee7;
    color: #5f4c35;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.product-card .description {
    color: #8a6f48;
    font-weight: 600;
    -webkit-line-clamp: 1;
}

.modal-tag-list {
    margin-bottom: 14px;
}

.modal-qr-box {
    margin-top: 24px;
    padding: 14px;
    border: 1px dashed #d7c7aa;
    border-radius: 16px;
    background: #fffaf0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-qr-box .qr-placeholder {
    width: 88px;
    height: 88px;
    flex: 0 0 auto;
    color: #7a613c;
    border-color: #d2bc92;
    background: white;
}

.modal-qr-box p {
    margin: 0;
    color: #6f5a38;
    font-size: 14px;
    line-height: 1.5;
}

.footer-qr-placeholder {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    border-color: #c9b991;
    color: #77684a;
    background: #fffaf0;
}

@media (max-width: 700px) {
    .product-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .product-card {
        display: grid;
        grid-template-columns: 122px 1fr;
        align-items: stretch;
        border-radius: 16px;
    }

    .product-card:hover,
    .product-card:focus {
        transform: none;
    }

    .product-image-wrap {
        min-height: 132px;
    }

    .product-card img {
        width: 100%;
        height: 100%;
        min-height: 132px;
    }

    .product-image-badge {
        left: 8px;
        top: 8px;
        padding: 5px 8px;
        font-size: 12px;
    }

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

    .product-category {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .product-info h3 {
        margin-bottom: 6px;
        font-size: 18px;
    }

    .price {
        margin: 7px 0 4px;
        font-size: 18px;
    }

    .product-tag {
        padding: 4px 7px;
        font-size: 11px;
    }

    .product-card .description {
        margin-top: 6px;
        font-size: 13px;
    }

    .modal-qr-box {
        align-items: flex-start;
    }
}

/* Second batch: sorting, pinned, activity */
.activity {
    background: #fffdf6;
    border: 1px solid #e6d4ad;
    padding: 15px 18px;
    border-radius: 14px;
    margin: -10px 0 24px;
    line-height: 1.6;
}

.front-pinned-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #2b2118;
    color: #fff8ea;
    font-size: 12px;
    font-weight: 800;
    vertical-align: middle;
}

@media (max-width: 700px) {
    .toolbar select {
        min-width: 100%;
    }
}

/* Vintage tobacco shop poster theme */
:root {
    --paper: #e8d7ad;
    --paper-light: #f5e8c7;
    --paper-dark: #c8aa72;
    --ink: #33281f;
    --muted-ink: #6d5942;
    --wine: #7b211f;
    --wine-dark: #4e1715;
    --brown: #6b4528;
    --brown-dark: #3f2a1c;
    --olive: #596044;
    --gold: #b78a3d;
    --line: #8b663d;
    --shadow: rgba(62, 39, 22, 0.22);
}

html {
    background: #33261d;
}

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
    background-color: var(--paper);
    background-image:
        radial-gradient(circle at 16% 18%, rgba(107, 69, 40, 0.13) 0 1px, transparent 2px),
        radial-gradient(circle at 82% 34%, rgba(123, 33, 31, 0.08) 0 1px, transparent 2px),
        repeating-linear-gradient(0deg, rgba(75, 53, 34, 0.025) 0 1px, transparent 1px 5px),
        linear-gradient(105deg, #d8bd84 0%, #f3e5c2 22%, #ead7a8 56%, #d8bb80 100%);
    background-size: 26px 26px, 34px 34px, auto, auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(62, 38, 20, 0.28);
}

::selection {
    color: var(--paper-light);
    background: var(--wine);
}

header {
    color: var(--paper-light);
    background:
        linear-gradient(rgba(46, 27, 19, 0.17), rgba(46, 27, 19, 0.17)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 7px),
        linear-gradient(135deg, #3b2b1e 0%, #201a16 54%, #4d3020 100%);
    border-top: 8px solid var(--wine-dark);
    border-bottom: 6px double var(--gold);
    box-shadow:
        inset 0 -2px 0 var(--brown-dark),
        0 8px 22px rgba(44, 29, 18, 0.28);
}

/*.site-header {*/
/*    position: relative;*/
/*    padding: 30px 20px 34px;*/
/*}*/

.site-header::before,
.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(232, 215, 173, 0.32);
}

.site-header::before {
    top: 14px;
}

.site-header::after {
    bottom: 12px;
}

.header-inner {
    grid-template-columns: 104px minmax(0, 1fr) 104px;
    gap: 26px;
}

header h1,
#site-title {
    color: #b94035;
    font-family: "STKaiti", "KaiTi", Georgia, serif;
    font-size: clamp(40px, 5vw, 62px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
    text-shadow:
        1px 1px 0 #e6c98d,
        3px 3px 0 rgba(47, 24, 18, 0.85);
}

.site-subtitle {
    color: #f1dfb2;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
    letter-spacing: 0;
}

.site-note {
    color: #d8c69f;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

.logo-placeholder,
.header-qr-placeholder,
.footer-qr-placeholder,
.qr-placeholder {
    color: #ead39f;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 4px, transparent 4px 8px),
        rgba(46, 29, 20, 0.72);
    border: 2px dashed #b78a3d;
    border-radius: 3px;
    box-shadow:
        inset 0 0 0 4px rgba(183, 138, 61, 0.12),
        2px 3px 0 rgba(18, 11, 8, 0.38);
    font-family: Arial, "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

.logo-placeholder,
.header-qr-placeholder {
    width: 92px;
    height: 92px;
}

main {
    max-width: 1180px;
    margin: 28px auto 38px;
}

.notice,
.activity {
    position: relative;
    color: var(--ink);
    background:
        linear-gradient(rgba(255, 255, 255, 0.15), rgba(89, 62, 35, 0.04)),
        var(--paper-light);
    border: 2px solid var(--wine);
    border-radius: 2px;
    box-shadow:
        inset 0 0 0 4px rgba(123, 33, 31, 0.09),
        3px 4px 0 rgba(86, 57, 33, 0.18);
    font-size: 16px;
    line-height: 1.65;
}

.notice {
    padding: 17px 20px 17px 58px;
}

.notice::before {
    content: "告";
    position: absolute;
    top: 50%;
    left: 17px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--paper-light);
    background: var(--wine);
    border: 1px solid var(--wine-dark);
    transform: translateY(-50%) rotate(-3deg);
    font-weight: 900;
    line-height: 1;
}

.activity {
    margin-top: -8px;
    padding: 14px 18px;
    border-color: var(--olive);
    box-shadow:
        inset 0 0 0 4px rgba(89, 96, 68, 0.09),
        3px 4px 0 rgba(86, 57, 33, 0.16);
}

.toolbar {
    position: relative;
    align-items: stretch;
    gap: 12px;
    padding: 17px;
    background:
        repeating-linear-gradient(0deg, rgba(98, 68, 40, 0.025) 0 1px, transparent 1px 5px),
        #d8bd84;
    border: 2px solid var(--brown);
    border-radius: 3px;
    box-shadow:
        inset 0 0 0 4px rgba(245, 232, 199, 0.42),
        4px 5px 0 var(--shadow);
}

.toolbar input,
.toolbar select {
    min-height: 46px;
    color: var(--ink);
    background: #f7eac8;
    border: 1px solid var(--brown);
    border-radius: 2px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 15px;
    box-shadow: inset 2px 2px 0 rgba(80, 52, 30, 0.08);
}

.toolbar input::placeholder {
    color: #846d50;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: var(--wine);
    outline: 2px solid rgba(123, 33, 31, 0.18);
    outline-offset: 1px;
}

.category-buttons {
    gap: 8px;
}

.category-button {
    min-height: 44px;
    padding: 10px 16px;
    color: var(--wine-dark);
    background: #ead7a8;
    border: 1px solid var(--wine);
    border-radius: 2px;
    font-family: Georgia, "Songti SC", serif;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 2px 2px 0 rgba(76, 45, 27, 0.18);
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.category-button:hover,
.category-button.active {
    color: #f7e9c5;
    background: var(--wine);
    border-color: var(--wine-dark);
    transform: translateY(-1px);
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 22px;
}

.product-card {
    position: relative;
    color: var(--ink);
    background:
        repeating-linear-gradient(0deg, rgba(104, 72, 41, 0.025) 0 1px, transparent 1px 5px),
        var(--paper-light);
    border: 2px solid var(--brown);
    border-radius: 3px;
    box-shadow:
        inset 0 0 0 4px rgba(139, 102, 61, 0.08),
        4px 5px 0 rgba(66, 42, 24, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card::after {
    content: "";
    position: absolute;
    inset: 5px;
    z-index: 0;
    pointer-events: none;
    border: 1px solid rgba(107, 69, 40, 0.18);
}

.product-card > * {
    position: relative;
    z-index: 1;
}

.product-card:hover,
.product-card:focus {
    transform: translateY(-3px);
    box-shadow:
        inset 0 0 0 4px rgba(139, 102, 61, 0.08),
        5px 7px 0 rgba(66, 42, 24, 0.22);
    outline: none;
}

.product-image-wrap {
    background: #b79a67;
    border-bottom: 2px solid var(--brown);
}

.product-card img {
    filter: sepia(0.12) saturate(0.9) contrast(1.03);
}

.product-info {
    padding: 18px 19px 20px;
}

.product-info h3 {
    color: var(--wine-dark);
    font-family: "STKaiti", "KaiTi", Georgia, serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.28;
}

.price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    width: fit-content;
    margin: 9px 0 4px;
    padding: 3px 9px 2px;
    color: var(--wine);
    background: rgba(183, 138, 61, 0.13);
    border-bottom: 3px double var(--wine);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 900;
}

.price-item {
    white-space: nowrap;
}

.description {
    color: var(--muted-ink);
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

.tag-list {
    gap: 6px;
}

.product-tag {
    padding: 5px 9px 4px;
    color: var(--brown-dark);
    background: transparent;
    border: 1px solid var(--brown);
    border-radius: 2px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 11px;
    font-weight: 800;
    transform: rotate(-1deg);
}

.product-tag:nth-child(even) {
    color: var(--wine-dark);
    border-color: var(--wine);
    transform: rotate(1deg);
}

.stock {
    padding: 5px 9px;
    border: 1px solid currentColor;
    border-radius: 2px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 1px 1px 0 rgba(57, 37, 23, 0.25);
    transform: rotate(-2deg);
}

.in-stock {
    color: #37412c;
    background: #c9c69c;
}

.low-stock {
    color: #6a461e;
    background: #e2c581;
}

.out-of-stock {
    color: #6b1d1b;
    background: #dfb0a0;
}

.front-pinned-badge {
    padding: 4px 7px 3px;
    color: #f5e4b7;
    background: var(--wine);
    border: 1px solid var(--wine-dark);
    border-radius: 2px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 11px;
    box-shadow: 1px 1px 0 rgba(63, 35, 22, 0.28);
    transform: rotate(-2deg);
}

.empty-message {
    color: var(--muted-ink);
    background: var(--paper-light);
    border: 2px solid var(--brown);
    border-radius: 3px;
    box-shadow: 3px 4px 0 var(--shadow);
}

.product-modal-backdrop {
    background: rgba(36, 24, 17, 0.76);
}

.product-modal-content {
    color: var(--ink);
    background:
        repeating-linear-gradient(0deg, rgba(103, 70, 39, 0.025) 0 1px, transparent 1px 5px),
        var(--paper-light);
    border: 3px solid var(--brown-dark);
    border-radius: 3px;
    box-shadow:
        inset 0 0 0 5px rgba(139, 102, 61, 0.14),
        10px 14px 0 rgba(25, 16, 11, 0.32);
}

.product-modal-image {
    background: #b79a67;
    border-right: 2px solid var(--brown);
    filter: sepia(0.12) saturate(0.9) contrast(1.03);
}

.product-modal-close {
    color: #f3dfae;
    background: var(--wine-dark);
    border: 1px solid var(--gold);
    border-radius: 2px;
    box-shadow: 2px 2px 0 rgba(34, 19, 12, 0.35);
}

.modal-category {
    color: var(--muted-ink);
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.product-modal-info h2 {
    color: var(--wine-dark);
    font-family: "STKaiti", "KaiTi", Georgia, serif;
    font-weight: 900;
}

.modal-price {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    width: fit-content;
    color: var(--wine);
    border-bottom: 3px double var(--wine);
    font-size: 29px;
    font-weight: 900;
}

.modal-description {
    color: #594936;
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

.modal-qr-box {
    background: #e4ce9b;
    border: 2px dashed var(--brown);
    border-radius: 2px;
    box-shadow: inset 0 0 0 4px rgba(245, 232, 199, 0.32);
}

.modal-qr-box .qr-placeholder {
    color: var(--brown-dark);
    background: var(--paper-light);
    border-color: var(--wine);
}

.modal-qr-box p {
    color: var(--brown-dark);
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

footer {
    color: #d9c69c;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 7px),
        #32251c;
    border-top: 5px double var(--gold);
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

.footer-qr-placeholder {
    color: #ead39f;
    background: rgba(30, 19, 14, 0.55);
    border-color: var(--gold);
}

@media (max-width: 700px) {
    body::before {
        box-shadow: inset 0 0 70px rgba(62, 38, 20, 0.23);
    }

    main {
        margin: 20px auto 30px;
        padding: 0 12px;
    }

    .notice {
        padding: 15px 15px 15px 50px;
        font-size: 14px;
    }

    .notice::before {
        left: 13px;
    }

    .toolbar {
        padding: 12px;
        gap: 10px;
    }

    .category-button {
        flex: 1 1 calc(50% - 6px);
        min-height: 42px;
        padding: 9px 10px;
    }

    .product-grid {
        gap: 14px;
    }

    .product-card {
        grid-template-columns: minmax(112px, 36%) minmax(0, 1fr);
        border-radius: 2px;
    }

    .product-image-wrap {
        border-right: 2px solid var(--brown);
        border-bottom: 0;
    }

    .product-info {
        min-width: 0;
        padding: 12px 13px;
    }

    .product-info h3 {
        font-size: 18px;
        overflow-wrap: anywhere;
    }

    .price {
        font-size: 20px;
        gap: 4px 8px;
    }

    .product-tag {
        font-size: 10px;
    }

    .product-modal-content {
        border-width: 2px;
    }

    .product-modal-image {
        border-right: 0;
        border-bottom: 2px solid var(--brown);
    }

    .product-modal-info {
        padding: 23px 18px;
    }

    .modal-qr-box {
        gap: 11px;
    }
}

/* Compact announcement summary and detail modal */
.notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.notice-content {
    min-width: 0;
    line-height: 1.65;
}

.notice-content strong {
    color: var(--wine-dark);
}

.announcement-detail-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 12px;
    color: #f7e8c1;
    background: var(--wine);
    border: 1px solid var(--wine-dark);
    border-radius: 2px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(69, 40, 24, 0.24);
    transition: transform 0.16s ease, background-color 0.16s ease;
}

.announcement-detail-button:hover,
.announcement-detail-button:focus-visible {
    background: var(--wine-dark);
    transform: translateY(-1px);
}

.announcement-detail-button[hidden] {
    display: none;
}

.announcement-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
}

.announcement-modal.is-open {
    display: block;
}

.announcement-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(36, 24, 17, 0.76);
}

.announcement-modal-content {
    position: relative;
    width: min(680px, calc(100% - 32px));
    max-height: calc(100vh - 64px);
    margin: 32px auto;
    padding: 28px 30px 24px;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background:
        repeating-linear-gradient(0deg, rgba(103, 70, 39, 0.025) 0 1px, transparent 1px 5px),
        var(--paper-light);
    border: 3px solid var(--brown-dark);
    border-radius: 3px;
    box-shadow:
        inset 0 0 0 5px rgba(139, 102, 61, 0.14),
        10px 14px 0 rgba(25, 16, 11, 0.32);
}

.announcement-modal-content h2 {
    margin: 0;
    padding: 0 42px 12px 0;
    color: var(--wine-dark);
    border-bottom: 3px double var(--line);
    font-family: "STKaiti", "KaiTi", Georgia, serif;
    font-size: 30px;
    font-weight: 900;
}

.announcement-modal-body {
    min-height: 0;
    margin: 18px 0;
    overflow-y: auto;
}

#announcement-full-text {
    margin: 0;
    color: var(--ink);
    font-family: Arial, "Microsoft YaHei", sans-serif;
    line-height: 1.85;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.announcement-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #f3dfae;
    background: var(--wine-dark);
    border: 1px solid var(--gold);
    border-radius: 2px;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(34, 19, 12, 0.35);
}

.announcement-modal-action {
    align-self: flex-end;
    min-width: 88px;
    padding: 9px 18px;
    color: #f7e8c1;
    background: var(--wine);
    border: 1px solid var(--wine-dark);
    border-radius: 2px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(69, 40, 24, 0.24);
}

@media (max-width: 700px) {
    .notice {
        align-items: flex-start;
        gap: 10px;
    }

    .notice-content {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .announcement-detail-button {
        min-height: 32px;
        padding: 6px 9px;
        font-size: 12px;
    }

    .announcement-modal-content {
        width: calc(100% - 22px);
        max-height: calc(100vh - 22px);
        margin: 11px auto;
        padding: 23px 18px 18px;
        border-width: 2px;
    }

    .announcement-modal-content h2 {
        font-size: 25px;
    }

    .announcement-modal-body {
        margin: 15px 0;
    }

    #announcement-full-text {
        font-size: 15px;
        line-height: 1.75;
    }
}

/* HOT product marker */
.hot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px 5px;
    color: #f7e8c1;
    background: var(--wine);
    border: 1px solid var(--wine-dark);
    border-radius: 2px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 2px 2px 0 rgba(55, 30, 19, 0.3);
    transform: rotate(-2deg);
}

.modal-hot-badge {
    width: fit-content;
    margin-top: 2px;
}

.modal-hot-badge[hidden] {
    display: none;
}

@media (max-width: 700px) {
    .hot-badge {
        padding: 5px 8px 4px;
        font-size: 11px;
    }
}

/* Homepage banner header
   The header image is a real <img>, so the banner height follows the 1920x600 image ratio.
   Do not use background-size: 100% 100%; it will stretch the artwork. */
.site-header {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    background: #641b14;
    border-top: 0;
    border-bottom: 5px double var(--gold);
    box-shadow: 0 8px 22px rgba(44, 29, 18, 0.28);
}

.site-header::before,
.site-header::after {
    display: none;
}

.header-bg-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
    user-select: none;
    pointer-events: none;
}

.site-header .header-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    display: block;
}

.site-header .header-title-area {
    position: absolute;
    top: 31%;
    left: 14%;
    width: 75%;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    text-align: left;
    z-index: 4;
}

.header-copy {
    min-width: 0;
}

.site-header #site-title {
    margin: 0 0 0.45vw;
    color: #7b211f;
    font-size: clamp(60px, 4.1vw, 78px);
    line-height: 1.05;
    text-wrap: balance;
    overflow-wrap: anywhere;
    text-shadow:
        1px 1px 0 #f0d9a6,
        2px 2px 0 rgba(80, 44, 25, 0.34);
}

.site-header .site-subtitle {
    margin: 0 0 0.35vw;
    color: #5d3b27;
    font-size: clamp(18px, 1.35vw, 25px);
    line-height: 1.35;
    text-shadow: 1px 1px 0 rgba(246, 226, 183, 0.88);
}

.site-header .site-note {
    max-width: 680px;
    margin: 0;
    color: #674b33;
    font-size: clamp(10px, 0.85vw, 14px);
    line-height: 1.45;
    text-shadow: 1px 1px 0 rgba(246, 226, 183, 0.76);
}

.site-logo {
    width: clamp(28px, 4vw, 68px);
    height: clamp(28px, 4vw, 68px);
    flex: 0 0 auto;
    object-fit: contain;
    padding: 4px;
    background: rgba(242, 218, 169, 0.82);
    border: 2px solid var(--wine);
    box-shadow: 2px 3px 0 rgba(75, 42, 25, 0.28);
}

.site-logo[hidden],
.header-qr-frame[hidden],
.header-qr-image[hidden] {
    display: none !important;
}

.header-qr-frame {
    position: absolute;
    left: 8.6%;
    bottom: 10.75%;
    width: 10.3%;
    aspect-ratio: 1 / 1;
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 5;
}

.header-qr-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
}

.header-qr-placeholder,
.hero-qr-placeholder,
.qr-placeholder.header-qr-placeholder {
    display: none !important;
}

.footer-qr-box {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    background: transparent;
    border: none;
    box-shadow: none;
}
.footer-qr-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
}

.modal-qr-box {
    margin-top: 18px;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.modal-qr-image {
    width: 110px;
    height: 110px;
    display: block;
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
}

.modal-qr-box p {
    margin: 0;
    font-size: 13px;
    color: var(--brown-dark);
}

/* Mobile header title size/position refinement */
@media (max-width: 700px) {
    .site-header .header-title-area {
        top: 21%;
        left: 10%;
        width: 58%;
        gap: 6px;
    }

    .site-header #site-title {
        font-size: clamp(34px, 11vw, 54px);
        line-height: 1;
        margin: 0 0 3px;
    }

    .site-header .site-subtitle {
        font-size: clamp(13px, 3.6vw, 19px);
        line-height: 1.18;
        margin: 0 0 2px;
    }

    .site-header .site-note {
        font-size: clamp(6px, 1.9vw, 10px);
        line-height: 1.18;
        max-width: 58%;
    }
}

