* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fcf8f8;
    color: #1e1e1e;
    line-height: 1.5;
    padding: 0 1rem 2rem;
}

@supports not(font-family: 'Inter') {
    body {
        font-family: system-ui, -apple-system, sans-serif;
    }
}

[hidden] {
    display: none !important;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0 1rem;
    border-bottom: 1px solid #e0ddd8;
}

.cart-toggle {
    position: relative;
    font-size: 1.6rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 40px;
    transition: background 0.2s;
}

.cart-toggle:hover {
    background: #efe5e5;
}

#cartCount {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #b34e4e;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    border: 2px solid #fcf8f8;
}

.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin: 1.8rem 0 2rem;
    align-items: center;
}

.filter-group {
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-group legend {
    font-weight: 500;
    color: #916363;
    float: left;
}

.filter-btn {
    background: transparent;
    border: 1px solid #c6b6b6;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn.active {
    background: #a75f5f;
    border-color: #a75f5f;
    color: white;
}

.filter-btn:hover {
    background: #e0cece;
    color: inherit;
}

.result-count {
    margin-left: auto;
    font-size: 0.9rem;
    color: #7b5c5c;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem 1.5rem;
}

.product-card {
    list-style: none;
    background: white;
    border-radius: 24px;
    padding: 1.2rem 1.2rem 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.25s;
    border: 1px solid #f2e9e9;
    display: flex;
    flex-direction: column;
}

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

.product-card.out-of-stock {
    opacity: 0.72;
}

.product-card.out-of-stock:hover {
    transform: none;
}

.product-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 18px;
    margin-bottom: 1rem;
}

.product-category small {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #b98e8e;
    margin-bottom: 0.6rem;
}

.product-price {
    /* font-weight: 600; */
    font-size: 1.3rem;
    margin: 0.5rem 0 1rem;
}

.stock-status {
    color: #7f4949;
    font-size: 0.95rem;
    font-weight: 700;
    margin: -0.4rem 0 1rem;
}

.add-to-cart {
    background: #a75f5f;
    color: white;
    border: none;
    padding: 0.75rem 0;
    border-radius: 40px;
    /* font-weight: 500; */
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: auto;
    transition: background 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* .add-to-cart i { */
/*     font-size: 0.9rem; */
/* } */

.add-to-cart:hover {
    background: #845757;
}

.add-to-cart:disabled {
    background: #d8c7c7;
    color: #7f6c6c;
    cursor: not-allowed;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    visibility: hidden;
    opacity: 0;
    transition: 0.25s ease;
    z-index: 1000;
}

.cart-overlay.open {
    visibility: visible;
    opacity: 1;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    /* transform: translateX(100%); */
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 1.8rem 1.5rem;
}

/* .cart-overlay.open .cart-panel { */
/*     transform: translateX(0); */
/* } */

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.cart-header h2 {
    font-weight: 500;
    font-size: 1.8rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #2f2525;
}

.cart-items {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e3dada;
}

.cart-item-unavailable {
    opacity: 0.74;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: #7f4949;
}

.cart-stock-status {
    color: #7f4949;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.qty-btn {
    background: #ecdfdf;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
}

.qty-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.cart-item-qty {
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: #aa7070;
    cursor: pointer;
    margin-left: auto;
    font-size: 0.9rem;
}

.cart-footer {
    padding: 1.5rem 0 1rem;
    border-top: 2px solid #ded1d1;
    margin-top: 0.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.4rem;
}

.checkout-notice {
    color: #7f4949;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 1.2em;
    margin-top: 0.75rem;
}

.checkout-btn {
    background: #a75f5f;
    color: white;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    margin-top: 1rem;
    cursor: pointer;
}

.checkout-btn:hover {
    background: #845757;
}

.checkout-btn:disabled {
    background: #d8c7c7;
    color: #7f6c6c;
    cursor: not-allowed;
}

.empty-cart-msg {
    text-align: center;
    padding: 2rem 0;
    color: #806161;
}

.site-footer {
    margin-top: 4rem;
    text-align: center;
    color: #846a6a;
}

.site-footer small {
    font-size: 0.9rem;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    max-width: 180px;
    height: auto;
}

.continue-shopping-link,
.primary-link {
    color: #7f4949;
    text-decoration: none;
    font-weight: 600;
}

.continue-shopping-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.order-confirmation {
    padding: 2rem 0 0;
}

.order-hero {
    max-width: 760px;
    margin-bottom: 2rem;
}

.order-status {
    color: #a75f5f;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.order-hero h1,
.missing-order h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.order-intro,
.missing-order p {
    color: #6f5858;
    font-size: 1.05rem;
    max-width: 640px;
}

.order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
    gap: 1.5rem;
    align-items: start;
}

.order-summary,
.payment-instructions,
.missing-order {
    background: white;
    border: 1px solid #f2e9e9;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 1rem;
}

.section-heading-row h2,
.payment-instructions h2 {
    font-size: 1.35rem;
}

.section-heading-row span {
    color: #7b5c5c;
    font-size: 0.9rem;
    text-align: right;
}

.order-meta,
.payment-details {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.order-meta div,
.payment-details div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #eee2e2;
    padding-bottom: 0.75rem;
}

.order-meta dt,
.payment-details dt {
    color: #806161;
    font-size: 0.9rem;
}

.order-meta dd,
.payment-details dd {
    font-weight: 700;
    text-align: right;
}

.order-items {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.order-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee2e2;
}

.order-item-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

.order-item-info h3 {
    font-size: 1rem;
}

.order-item-info p {
    color: #806161;
}

.order-item-total {
    font-weight: 700;
}

.order-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.85rem;
}

.order-amount-row output {
    font-weight: 600;
}

.order-total-row {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 1.25rem;
}

.payment-steps {
    margin: 1rem 0 1.25rem;
    padding-left: 1.25rem;
    color: #4a3939;
}

.payment-steps li+li {
    margin-top: 0.5rem;
}

.copy-reference-btn {
    background: #a75f5f;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    width: 100%;
}

.copy-reference-btn:hover {
    background: #845757;
}

.copy-status {
    color: #6f5858;
    min-height: 1.5rem;
    margin-top: 0.75rem;
}

.missing-order {
    max-width: 680px;
}

.missing-order .primary-link {
    display: inline-flex;
    margin-top: 1.25rem;
}

@media (max-width: 780px) {
    .order-layout {
        grid-template-columns: 1fr;
    }

    .section-heading-row,
    .order-meta div,
    .payment-details div {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .section-heading-row span,
    .order-meta dd,
    .payment-details dd {
        text-align: left;
    }
}

@media (max-width: 520px) {
    .order-item {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .order-item-img {
        width: 64px;
        height: 64px;
    }

    .order-item-total {
        grid-column: 2;
    }
}
