* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Comic Sans MS", "Chalkboard SE", "Marker Felt", "Segoe Print", "Microsoft YaHei", cursive, sans-serif;
    background: #f5f0e8;
    color: #2c2c2c;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0,0,0,.015) 1px, transparent 1px),
        radial-gradient(circle at 80% 30%, rgba(0,0,0,.015) 1px, transparent 1px);
    background-size: 40px 40px, 60px 60px;
}
a { text-decoration: none; color: inherit; }

/* ===== SKETCH UTILITY ===== */
.sketch-border {
    border: 2px solid #2c2c2c;
    border-radius: 4px;
    position: relative;
    box-shadow: 2px 2px 0 #2c2c2c, -1px -1px 0 rgba(44,44,44,.3);
}
.sketch-border::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px dashed rgba(44,44,44,.15);
    border-radius: 6px;
    pointer-events: none;
}
.sketch-divider {
    height: 3px;
    background: repeating-linear-gradient(90deg, #2c2c2c 0, #2c2c2c 20px, transparent 20px, transparent 24px);
    margin: 24px 0;
}

/* ===== SCROLLING NOTICE ===== */
.notice-bar {
    background: #2c2c2c;
    padding: 10px 0;
    position: relative;
    overflow: hidden;
    z-index: 10;
    border-bottom: 3px solid #1a1a1a;
}
.notice-bar .notice-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scrollNotice 30s linear infinite;
}
.notice-bar .notice-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #2c2c2c;
    padding: 3px 14px;
    font-size: 13px;
    font-weight: 900;
    margin-right: 24px;
    flex-shrink: 0;
    letter-spacing: 1px;
    transform: rotate(-1deg);
}
.notice-bar .notice-text {
    display: inline-block;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .5px;
}
.notice-bar .notice-text span {
    display: inline-block;
    margin-right: 80px;
}
@keyframes scrollNotice {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== BANNER SLIDER ===== */
.banner-wrap { position: relative; z-index: 1; padding: 12px 12px 0; }
.banner-slider {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    background: #ede6d8;
    padding: 6px;
}
.banner-slider .banner-track {
    display: flex;
    transition: transform .6s cubic-bezier(.34,1.56,.64,1);
}
.banner-slider .banner-slide {
    min-width: 100%;
    aspect-ratio: 21 / 9;
    position: relative;
}
.banner-slider .banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.banner-slider .banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.banner-slider .banner-slide .slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ede6d8;
    color: #a09888;
    font-size: 18px;
    border: 2px dashed #ccc5b8;
}
.banner-slider .banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 0 10px;
}
.banner-slider .banner-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d5cdc0;
    cursor: pointer;
    transition: .3s;
    border: 2px solid #2c2c2c;
}
.banner-slider .banner-dots .dot.active {
    background: #2c2c2c;
    transform: scale(1.2);
}
.banner-slider .banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.9);
    border: 2px solid #2c2c2c;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    z-index: 5;
    font-family: inherit;
}
.banner-slider .banner-arrow:hover { background: #2c2c2c; color: #fff; }
.banner-slider .banner-arrow-prev { left: 10px; }
.banner-slider .banner-arrow-next { right: 10px; }

/* ===== SECTION ===== */
.section { position: relative; z-index: 1; padding: 32px 16px 60px; }
.section-title {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%) rotate(-.5deg);
}
.section-title::after {
    content: '';
    display: block;
    width: 80%;
    height: 3px;
    background: #2c2c2c;
    margin: 6px auto 0;
}
.section-sub {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin-bottom: 28px;
    letter-spacing: 1px;
}

/* ===== CATEGORY WRAP ===== */
/* Categories shown as a dropdown select matching the search box style */

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1060px;
    margin: 0 auto;
}
.product-card {
    background: #fffdf9;
    border: 2px solid #2c2c2c;
    position: relative;
    transition: all .3s;
    box-shadow: 4px 4px 0 #2c2c2c;
    transform: rotate(var(--rot, 0deg));
}
.product-card:nth-child(odd) { --rot: -.5deg; }
.product-card:nth-child(even) { --rot: .5deg; }
.product-card:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: 6px 6px 0 #2c2c2c;
}
.product-card::before {
    content: '';
    position: absolute;
    top: -4px; right: -4px; bottom: -4px; left: -4px;
    border: 1px dashed rgba(44,44,44,.15);
    border-radius: 2px;
    pointer-events: none;
}
.product-card .card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid #2c2c2c;
    background: #ede6d8;
}
.product-card .card-img-plh {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border-bottom: 2px solid #2c2c2c;
    background: #f5f0e8;
}
.product-card .card-body { padding: 18px; position: relative; }
.product-card .card-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1.5px solid #2c2c2c;
    padding: 2px 10px;
    margin-bottom: 8px;
    transform: rotate(-1deg);
}
.product-card .card-title { font-size: 17px; font-weight: 900; margin-bottom: 4px; letter-spacing: .5px; }
.product-card .card-desc { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 12px; }
.product-card .card-price { margin-bottom: 12px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-card .price-current { font-size: 26px; font-weight: 900; }
.product-card .price-original { font-size: 14px; color: #aaa; text-decoration: line-through; text-decoration-thickness: 2px; }
.product-card .card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    padding-top: 10px;
    border-top: 2px dashed #ddd;
    margin-bottom: 14px;
}
.product-card .btn-buy {
    display: block;
    text-align: center;
    padding: 11px;
    background: #2c2c2c;
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: .2s;
    position: relative;
}
.product-card .btn-buy::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 1px dashed rgba(255,255,255,.25);
    pointer-events: none;
}
.product-card .btn-buy:hover {
    background: #fff;
    color: #2c2c2c;
    border: 2px solid #2c2c2c;
}
.product-card .btn-buy:hover::after { border-color: rgba(44,44,44,.2); }
.product-card .tag-soldout {
    display: block;
    text-align: center;
    padding: 11px;
    background: #e8e2d8;
    color: #999;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: not-allowed;
}

/* ===== BADGE ===== */
.badge { display: inline-block; padding: 2px 10px; font-size: 12px; font-weight: 700; border: 1.5px solid #2c2c2c; }
.badge-success { background: #2c2c2c; color: #fff; }
.badge-warning { background: #fff; color: #2c2c2c; }
.badge-info { background: #e8e2d8; color: #2c2c2c; }
.badge-secondary { background: #ddd; color: #666; }

/* ===== EMPTY ===== */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ===== SKETCH DECORATIONS ===== */
.doodle {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: .06;
    font-size: 120px;
    font-weight: 900;
    color: #2c2c2c;
    transform: rotate(-5deg);
    user-select: none;
    font-family: "Comic Sans MS", cursive;
}
.doodle-1 { top: 10%; left: 2%; }
.doodle-2 { bottom: 15%; right: 3%; transform: rotate(8deg); }
.doodle-3 { top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-3deg); font-size: 200px; opacity: .03; }

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 28px 16px;
    color: #999;
    font-size: 13px;
    border-top: 2px solid #2c2c2c;
    background: #fffdf9;
}

/* ===== BUY PAGE ===== */
.buy-page { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 80px 16px; }
.buy-card {
    width: 100%; max-width: 500px;
    background: #fffdf9;
    border: 2px solid #2c2c2c;
    box-shadow: 5px 5px 0 #2c2c2c;
    padding: 36px 32px;
    position: relative;
    transform: rotate(-.3deg);
}
.buy-card::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px dashed rgba(44,44,44,.12);
    pointer-events: none;
}
.buy-card h2 { font-size: 24px; font-weight: 900; letter-spacing: 1px; margin-bottom: 4px; }
.buy-card .subtitle { font-size: 14px; color: #888; margin-bottom: 24px; }
.buy-card .product-preview {
    display: flex; gap: 14px; align-items: center;
    padding: 14px 16px;
    border: 2px dashed #ddd;
    margin-bottom: 24px;
}
.buy-card .product-preview .preview-img { width: 60px; height: 60px; border: 2px solid #2c2c2c; object-fit: cover; flex-shrink: 0; }
.buy-card .product-preview .preview-info .name { font-weight: 900; font-size: 16px; }
.buy-card .product-preview .preview-info .cat { font-size: 12px; color: #888; margin-top: 2px; }
.buy-card .product-preview .preview-price { margin-left: auto; font-size: 24px; font-weight: 900; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group select {
    width: 100%; padding: 12px 14px;
    border: 2px solid #2c2c2c;
    font-size: 15px;
    background: #fff;
    outline: none;
    font-family: inherit;
    box-shadow: 2px 2px 0 #2c2c2c;
}
.form-group input:focus { box-shadow: 3px 3px 0 #2c2c2c; }
.form-group .hint { font-size: 12px; color: #aaa; margin-top: 4px; }
.pay-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 20px; }
.pay-method { position: relative; }
.pay-method input { position: absolute; opacity: 0; }
.pay-method label {
    display: flex; flex-direction: column; align-items: center;
    padding: 14px 8px;
    border: 2px solid #2c2c2c;
    cursor: pointer;
    transition: .2s;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    box-shadow: 2px 2px 0 #2c2c2c;
}
.pay-method label .pay-icon { font-size: 28px; display: inline-flex; align-items: center; justify-content: center; }
.pay-method label .pay-icon img { width: 28px; height: 28px; display: block; }
.pay-method input:checked + label {
    background: #2c2c2c;
    color: #fff;
    box-shadow: 3px 3px 0 #2c2c2c;
    transform: scale(1.02);
}
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; margin-bottom: 16px; border-top: 2px dashed #ddd; }
.total-row .label { font-size: 14px; color: #888; }
.total-row .amount { font-size: 26px; font-weight: 900; }
.btn-submit {
    width: 100%; padding: 14px;
    background: #2c2c2c;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: .2s;
    font-family: inherit;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.btn-submit:hover { background: #fff; color: #2c2c2c; border: 2px solid #2c2c2c; padding: 12px; }

/* ===== SUCCESS ===== */
.success-page { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 80px 16px; }
.success-card {
    width: 100%; max-width: 480px;
    background: #fffdf9;
    border: 2px solid #2c2c2c;
    box-shadow: 5px 5px 0 #2c2c2c;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    transform: rotate(.3deg);
}
.success-card::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px dashed rgba(44,44,44,.12);
    pointer-events: none;
}
.success-card .icon { font-size: 56px; margin-bottom: 12px; }
.success-card h2 { font-size: 24px; font-weight: 900; letter-spacing: 1px; margin-bottom: 6px; }
.success-card p { color: #888; margin-bottom: 24px; }
.success-card .info-block { text-align: left; border: 2px dashed #ddd; padding: 16px; margin-bottom: 20px; }
.success-card .info-block .label { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.success-card .info-block .value { font-size: 14px; margin-bottom: 12px; }
.success-card .info-block .card-value { background: #f5f0e8; border: 2px solid #2c2c2c; padding: 12px; font-family: monospace; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.success-card .btn-back { display: inline-block; padding: 12px 32px; background: #2c2c2c; color: #fff; font-weight: 900; letter-spacing: 1px; transition: .2s; }
.success-card .btn-back:hover { background: #fff; color: #2c2c2c; border: 2px solid #2c2c2c; padding: 10px 30px; }

/* ===== ORDER QUERY ===== */
.query-page { position: relative; z-index: 1; min-height: 100vh; padding: 80px 16px; }
.query-card {
    max-width: 500px; margin: 0 auto;
    background: #fffdf9;
    border: 2px solid #2c2c2c;
    box-shadow: 5px 5px 0 #2c2c2c;
    padding: 32px;
    transform: rotate(-.3deg);
}
.query-card::before {
    content: '';
    position: absolute; inset: -4px;
    border: 1px dashed rgba(44,44,44,.12);
    pointer-events: none;
}
.query-card h2 { font-size: 20px; font-weight: 900; letter-spacing: 1px; margin-bottom: 16px; text-align: center; }
.query-form { display: flex; gap: 10px; }
.query-form input { flex: 1; padding: 12px 14px; border: 2px solid #2c2c2c; font-size: 14px; font-family: inherit; background: #fff; box-shadow: 2px 2px 0 #2c2c2c; outline: none; }
.query-form input:focus { box-shadow: 3px 3px 0 #2c2c2c; }
.query-form button { padding: 12px 24px; background: #2c2c2c; color: #fff; border: none; font-weight: 900; cursor: pointer; transition: .2s; font-family: inherit; }
.query-form button:hover { background: #fff; color: #2c2c2c; border: 2px solid #2c2c2c; padding: 10px 22px; }
.order-result { margin-top: 20px; }
.order-info { border: 2px dashed #ddd; padding: 16px; }
.order-info .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 14px; }
.order-info .row:last-child { border-bottom: none; }
.order-info .row .label { color: #888; }
.order-info .row .value { font-weight: 700; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cat-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
    .banner-slider .banner-arrow { width: 32px; height: 32px; font-size: 14px; }
    .banner-slider .banner-slide { aspect-ratio: 16 / 9; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .buy-card { padding: 24px 18px; }
    .pay-methods { grid-template-columns: 1fr; }
    .doodle { font-size: 60px; }
    .product-card .card-body { padding: 12px; }
    .product-card .card-img, .product-card .card-img-plh { aspect-ratio: 4 / 3; }
    .product-card .card-title { font-size: 14px; }
    .product-card .price-current { font-size: 20px; }
    .product-card .card-desc { font-size: 12px; }
    .product-card .btn-buy, .product-card .tag-soldout { font-size: 12px; padding: 8px; }
}
