/* ==========================================================================
   蟹·珍寶 · 前台商店樣式
   沿用 order.html 的視覺設計，補充購物車、表單、成功頁及訂單查詢所需樣式。
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Microsoft JhengHei', sans-serif;
}

:root {
    --ink: #3e2c1b;
    --ink-soft: #7a6854;
    --brand: #b45f2b;
    --brand-dark: #9a4b1f;
    --cream: #f5f2eb;
    --line: #e9dac8;
    --green: #1f7a4d;
}

body {
    background: #f5f2eb;
    background-image: radial-gradient(circle at 10% 20%, rgba(235, 215, 185, 0.3) 0%, transparent 30%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem 2rem;
    color: var(--ink);
}

a {
    color: var(--brand);
}

.app-container {
    max-width: 1200px;
    width: 100%;
}

/* header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem 1.5rem;
    border-bottom: 2px solid #c49a6c;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.2rem;
    color: #b45f2b;
    filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #3e2c1b;
    line-height: 1.2;
}

.logo-text span {
    font-size: 1rem;
    font-weight: 400;
    color: #7a5a3a;
    display: block;
    letter-spacing: 2px;
}

.logo-text a {
    color: inherit;
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.header-link {
    color: #5c4632;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.45rem 0.2rem;
    border-bottom: 2px solid transparent;
}

.header-link:hover {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.cart-icon-btn {
    background: #3e2c1b;
    color: #f9e9d2;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 1.4rem;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    position: relative;
}

.cart-icon-btn:hover {
    background: #5c3f24;
    transform: scale(1.02);
}

.cart-badge {
    background: #e6b17e;
    color: #2f1e0f;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 6px;
}

/* notice */
.store-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #fff8ee;
    border: 1px solid #ecd9c0;
    color: #6d513a;
    border-radius: 50px;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.store-notice i {
    color: var(--brand);
}

/* product grid */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0.25rem 1rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #3e2c1b;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 5px solid #b45f2b;
    padding-left: 12px;
}

.section-note {
    font-size: 0.85rem;
    color: #8a7764;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.product-card {
    background: #fffffffa;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9dac8;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(90, 60, 30, 0.12);
}

.product-card.sold-out {
    opacity: 0.78;
}

.product-card.sold-out:hover {
    transform: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.product-img {
    height: 160px;
    background: #ddceb8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #9e7a57;
    background-image: linear-gradient(145deg, #f3e7d9, #e0cfbc);
    position: relative;
    overflow: hidden;
}

.product-img .emoji {
    font-size: 3.5rem;
    line-height: 1;
    filter: drop-shadow(0 6px 8px rgba(90, 60, 30, 0.18));
}

.product-card.sold-out .product-img {
    filter: grayscale(0.65);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #3e2c1b;
    color: #fff4e6;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
}

.product-info {
    padding: 1.2rem 1rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3e2c1b;
    margin-bottom: 0.35rem;
}

.product-desc {
    font-size: 0.85rem;
    color: #7a6854;
    margin-bottom: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #b45f2b;
    white-space: nowrap;
}

.price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: #7a6854;
    margin-left: 2px;
}

.stock-info {
    font-size: 0.8rem;
    background: #f1e6da;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    color: #5a3f2a;
    font-weight: 500;
    white-space: nowrap;
}

.stock-info.low {
    background: #fde8cd;
    color: #9a4b1f;
}

.btn-add {
    background: #f0e2d0;
    border: 1px solid #cba87b;
    border-radius: 50px;
    padding: 0.65rem;
    font-size: 1rem;
    font-weight: 600;
    color: #3e2c1b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-add:hover:not(:disabled) {
    background: #b45f2b;
    border-color: #b45f2b;
    color: #fff;
}

.btn-add:disabled {
    background: #e7ddd1;
    border-color: #d8c7b3;
    color: #9b8874;
    cursor: not-allowed;
}

.btn-add i {
    font-size: 1rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #8a7764;
    background: #fffdf9;
    border: 1px dashed #d8c3aa;
    border-radius: 24px;
}

.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.8rem;
    opacity: 0.6;
}

/* cart panel - offcanvas style */
.cart-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-in-out;
    border-left: 2px solid #dbbd9a;
}

.cart-panel.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.2rem;
    border-bottom: 2px solid #e9dac8;
    background: #fbf7f1;
}

.cart-header h3 {
    font-size: 1.35rem;
    color: #3e2c1b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #6d513a;
    line-height: 1;
    padding: 0 6px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 0.9rem 0;
    border-bottom: 1px solid #e6d6c5;
    align-items: flex-start;
}

.cart-item-img {
    width: 55px;
    height: 55px;
    background: #eddcc9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #b48c62;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 700;
    color: #3e2c1b;
    font-size: 0.95rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: #b45f2b;
    font-weight: 600;
    margin-top: 3px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cart-item-actions button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #cba87b;
    background: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3e2c1b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.1s;
}

.cart-item-actions button:hover {
    background: #b45f2b;
    color: #fff;
}

.cart-item-actions .cart-item-remove {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    color: #9a7c60;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0 2px;
    text-decoration: underline;
}

.cart-item-actions .cart-item-remove:hover {
    background: transparent;
    color: #b42318;
}

.cart-item-qty {
    font-weight: 600;
    min-width: 22px;
    text-align: center;
}

.cart-item-line-total {
    font-weight: 700;
    color: #3e2c1b;
    font-size: 0.95rem;
    white-space: nowrap;
    padding-top: 2px;
}

.cart-item-stock-warning {
    color: #b42318;
    font-size: 0.78rem;
    margin-top: 2px;
    width: 100%;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #8a7764;
    font-size: 1rem;
}

.cart-empty i {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.cart-footer {
    padding: 1.2rem;
    border-top: 2px solid #e9dac8;
    background: #fbf7f1;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #3e2c1b;
    gap: 1rem;
}

.cart-total span:last-child {
    color: #b45f2b;
}

.cart-total small {
    font-size: 0.8rem;
    font-weight: 500;
    color: #8a7764;
}

.btn-checkout {
    background: #3e2c1b;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-checkout:hover:not(:disabled) {
    background: #5c3f24;
}

.btn-checkout:disabled {
    background: #b3a18d;
    cursor: not-allowed;
}

.cart-note {
    margin-top: 0.7rem;
    font-size: 0.78rem;
    color: #8a7764;
    text-align: center;
    line-height: 1.5;
}

/* overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* order modal */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.96);
    width: calc(100% - 2rem);
    max-width: 550px;
    background: white;
    border-radius: 32px;
    z-index: 1100;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    display: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal h2 {
    color: #3e2c1b;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-sub {
    color: #7a6854;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkout-summary {
    background: #fbf4ea;
    border: 1px solid #ead7bf;
    border-radius: 16px;
    padding: 0.8rem 1rem;
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6d513a;
}

.checkout-summary strong {
    color: var(--brand);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #3e2c1b;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 30px;
    border: 1px solid #d6c3ae;
    font-size: 1rem;
    background: #fefcf9;
    transition: 0.2s;
    color: #3e2c1b;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
    border-radius: 20px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #cba87b;
    border-color: transparent;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #b42318;
    background: #fff7f6;
}

.field-error {
    display: none;
    color: #b42318;
    font-size: 0.8rem;
    margin: 0.3rem 0 0 0.8rem;
}

.form-group.has-error .field-error {
    display: block;
}

.form-error {
    display: none;
    background: #fef3f2;
    border: 1px solid #f4c7c3;
    color: #b42318;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.form-error.show {
    display: block;
}

.form-hint {
    font-size: 0.78rem;
    color: #9a8874;
    margin-top: 0.35rem;
    margin-left: 0.8rem;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 1.8rem;
}

.btn-secondary {
    background: #e9dac8;
    border: none;
    border-radius: 50px;
    padding: 0.8rem;
    font-weight: 600;
    flex: 1;
    cursor: pointer;
    color: #3e2c1b;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: #ddc9b1;
}

.btn-primary {
    background: #b45f2b;
    border: none;
    border-radius: 50px;
    padding: 0.8rem;
    font-weight: 700;
    flex: 1;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary:hover:not(:disabled) {
    background: #9a4b1f;
}

.btn-primary:disabled {
    background: #c9a68c;
    cursor: wait;
}

.btn-primary.is-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* success modal */
.success-modal {
    text-align: center;
    max-width: 470px;
}

.success-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #e7f6ed;
    color: #1f7a4d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.success-modal h2 {
    justify-content: center;
    margin-bottom: 0.35rem;
}

.order-code-box {
    background: #fbf4ea;
    border: 1px dashed #d8b892;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    margin: 1.2rem 0 0.8rem;
}

.order-code-box span {
    display: block;
    font-size: 0.8rem;
    color: #8a7764;
    margin-bottom: 0.2rem;
}

.order-code-box strong {
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    color: #3e2c1b;
}

.success-total {
    font-size: 1rem;
    color: #6d513a;
    margin-bottom: 0.9rem;
}

.success-total strong {
    color: var(--brand);
    font-size: 1.2rem;
}

.success-wa-note {
    font-size: 0.86rem;
    color: #7a6854;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #25d366;
    color: #073b1d;
    font-weight: 700;
    text-decoration: none;
    padding: 0.9rem 1rem;
    border-radius: 50px;
    margin-bottom: 0.7rem;
    transition: background 0.2s;
}

.btn-wa:hover {
    background: #1fbe5a;
}

.btn-wa[hidden] {
    display: none;
}

.success-detail {
    width: 100%;
    margin-bottom: 0.7rem;
}

.success-close {
    width: 100%;
    flex: none;
}

/* badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 50px;
    padding: 0.22rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-amber { background: #fdf0d5; color: #8a5a00; }
.badge-blue { background: #e3effd; color: #185a9c; }
.badge-green { background: #e4f6ea; color: #146c43; }
.badge-red { background: #fde8e7; color: #a4221a; }
.badge-muted { background: #eee7de; color: #6d513a; }

/* toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #2e2218;
    color: #f5e6d3;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    max-width: calc(100% - 2rem);
    text-align: center;
    font-size: 0.92rem;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.is-error {
    background: #7a1d16;
    color: #fff1ef;
}

/* footer */
.site-footer {
    border-top: 1px solid #e2d2be;
    padding: 1.5rem 0.5rem 0.5rem;
    text-align: center;
    color: #8a7764;
    font-size: 0.85rem;
    line-height: 1.8;
    margin-top: auto;
}

.site-footer strong {
    color: #5c4632;
}

.footer-wa {
    color: #1f7a4d;
    font-weight: 700;
    text-decoration: none;
}

.footer-wa:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.78rem;
    color: #a08c77;
    margin-top: 0.3rem;
}

/* order success / lookup pages */
.success-container {
    max-width: 760px;
    margin: 0 auto;
}

.success-card,
.lookup-card {
    background: #fffdf9;
    border: 1px solid #e9dac8;
    border-radius: 28px;
    padding: 1.8rem 1.6rem;
    box-shadow: 0 14px 40px rgba(90, 60, 30, 0.08);
    margin-bottom: 1.5rem;
}

.success-card-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border-bottom: 1px solid #eee0cf;
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
}

.success-check {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
    background: #e7f6ed;
    color: #1f7a4d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
}

.success-card h1,
.lookup-card h1 {
    font-size: 1.55rem;
    color: #3e2c1b;
    margin-bottom: 0.25rem;
}

.success-card-head p,
.lookup-card > p {
    color: #7a6854;
    font-size: 0.92rem;
    line-height: 1.55;
}

.order-summary-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background: #fbf4ea;
    border-radius: 18px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.4rem;
}

.summary-label {
    display: block;
    font-size: 0.76rem;
    color: #8a7764;
    margin-bottom: 0.2rem;
}

.order-summary-top strong {
    color: #3e2c1b;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.summary-block {
    margin-bottom: 1.5rem;
}

.summary-block h2 {
    font-size: 1.05rem;
    color: #3e2c1b;
    margin-bottom: 0.7rem;
    padding-left: 10px;
    border-left: 4px solid #b45f2b;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.summary-table th {
    text-align: left;
    color: #8a7764;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid #e9dac8;
}

.summary-table td {
    padding: 0.65rem 0.4rem;
    border-bottom: 1px solid #f0e4d5;
    color: #3e2c1b;
    vertical-align: top;
}

.summary-table th:last-child,
.summary-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.summary-totals {
    margin-top: 0.9rem;
    margin-left: auto;
    max-width: 320px;
    font-size: 0.92rem;
}

.summary-totals div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.28rem 0;
    color: #6d513a;
}

.summary-totals .grand-total {
    border-top: 2px solid #e2cdb5;
    margin-top: 0.35rem;
    padding-top: 0.55rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #3e2c1b;
}

.summary-totals .grand-total span:last-child {
    color: #b45f2b;
}

.detail-list {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 0.55rem 1rem;
    font-size: 0.92rem;
}

.detail-list dt {
    color: #8a7764;
}

.detail-list dd {
    color: #3e2c1b;
    word-break: break-word;
}

.wa-note {
    font-size: 0.85rem;
    color: #7a6854;
    line-height: 1.55;
    margin: 0.2rem 0 1rem;
}

.success-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.success-actions .btn-primary,
.success-actions .btn-secondary {
    flex: 1;
    min-width: 140px;
}

.lookup-form .form-group {
    margin-bottom: 1rem;
}

.lookup-card .btn-primary {
    width: 100%;
    flex: none;
}

.lookup-help {
    margin-top: 1rem;
    font-size: 0.82rem;
    color: #8a7764;
    line-height: 1.6;
}

.not-found-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.not-found-card i {
    font-size: 2.5rem;
    color: #b45f2b;
    margin-bottom: 1rem;
}

/* utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #3e2c1b;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 12px 0;
    z-index: 2000;
}

.skip-link:focus {
    left: 0;
}

[hidden] {
    display: none !important;
}

/* responsiveness */
@media (max-width: 600px) {
    body {
        padding: 0.75rem 0.6rem 1.5rem;
    }

    .header {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.6rem;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .logo-icon {
        font-size: 1.8rem;
    }

    .header-actions {
        gap: 0.4rem;
    }

    .header-link {
        font-size: 0.82rem;
    }

    .cart-icon-btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .cart-badge {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .cart-panel {
        max-width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.85rem;
    }

    .product-img {
        height: 130px;
    }

    .product-img .emoji {
        font-size: 3rem;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-desc {
        font-size: 0.8rem;
    }

    .price {
        font-size: 1.2rem;
    }

    .btn-add {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .modal {
        padding: 1.4rem 1.1rem;
        border-radius: 24px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .success-card,
    .lookup-card {
        padding: 1.3rem 1.1rem;
    }

    .detail-list {
        grid-template-columns: 80px 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* print */
@media print {
    body {
        background: #fff;
        padding: 0;
    }

    .header-actions,
    .site-footer,
    .success-actions,
    .btn-wa,
    .wa-note {
        display: none !important;
    }

    .success-card {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}
