.cart-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.9rem;
    border: 1px solid var(--yellow);
    border-radius: 4px;
    color: var(--ink);
    background: #ffffff;
    font-weight: 700;
    font-family: "Open Sans", Arial, sans-serif;
    cursor: pointer;
}

.cart-button i {
    color: var(--ink);
}

.cart-badge {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 0 0.35rem;
    border-radius: 999px;
    color: #111111;
    background: var(--yellow);
    font-size: 0.84rem;
    font-weight: 800;
}

.compact-cart-button {
    position: relative;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.compact-cart-button .cart-badge {
    position: absolute;
    top: 0;
    right: -4px;
    min-width: 20px;
    height: 20px;
    font-size: 0.72rem;
}

.cart-shell[aria-hidden="true"] {
    pointer-events: none;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(17, 24, 39, 0.36);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.cart-shell[aria-hidden="true"] .cart-overlay {
    opacity: 0;
}

body.cart-drawer-open .cart-overlay {
    opacity: 1;
}

.cart-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    width: min(430px, 100vw);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: -22px 0 46px rgba(17, 24, 39, 0.18);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    outline: 0;
}

body.cart-drawer-open .cart-drawer-panel {
    transform: translateX(0);
}

body.cart-drawer-open {
    overflow: hidden;
}

.cart-drawer-header {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.45rem 1rem;
    border-bottom: 1px solid var(--line);
}

.cart-drawer-header h2,
.cart-detail-heading h1,
.cart-detail-summary h2,
.cart-empty h3 {
    margin: 0;
    color: #1f242b;
    font-family: "Quicksand", "Open Sans", Arial, sans-serif;
    letter-spacing: 0;
}

.cart-drawer-header h2 {
    font-size: 1.35rem;
}

.cart-drawer-header span {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.cart-drawer-header button,
.cart-remove-button,
.cart-quantity-control button {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.cart-drawer-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 1.45rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
}

.cart-line-media {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: var(--soft);
    color: var(--yellow-dark);
}

.cart-line-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-line-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.cart-line h3 {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.35;
}

.cart-line-title-row strong {
    white-space: nowrap;
    color: #111111;
}

.cart-line p {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.cart-gallery-group { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--line); }
.cart-gallery-heading { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; font-size: 0.82rem; }
.cart-gallery-heading > div { min-width: 0; display: grid; gap: 0.1rem; }
.cart-gallery-heading small { color: var(--muted); font-size: 0.72rem; font-weight: 400; }
.cart-gallery-heading span { color: var(--muted); }
.cart-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
.cart-gallery-image { position: relative; min-width: 0; }
.cart-gallery-image-preview { width: 100%; min-height: 80px; max-height: 180px; overflow: hidden; border-radius: 5px; }
.cart-gallery-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.cart-gallery-image img.is-contain { object-fit: contain; }
.cart-gallery-image-meta { min-width: 0; display: grid; gap: 0.05rem; margin-top: 0.3rem; }
.cart-gallery-image-meta strong { overflow-wrap: anywhere; font-size: 0.72rem; }
.cart-gallery-image-meta small { color: var(--muted); font-size: 0.68rem; line-height: 1.3; }
.cart-gallery-quality { display: flex; align-items: flex-start; gap: 0.35rem; margin-top: 0.35rem; font-size: 0.7rem; line-height: 1.3; }
.cart-gallery-quality i { margin-top: 0.12rem; }
.cart-gallery-quality span { min-width: 0; display: flex; flex-wrap: wrap; gap: 0 0.3rem; }
.cart-gallery-quality small { color: var(--muted); }
.cart-gallery-quality.is-optimal { color: #28723f; }
.cart-gallery-quality.is-acceptable { color: #765800; }
.cart-gallery-quality.is-insufficient { color: #9b2c2c; }
.cart-gallery-image > button { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: rgba(17,24,39,.82); border: 0; border-radius: 50%; cursor: pointer; }
.cart-gallery-order { position: absolute; right: 3px; bottom: 3px; left: 3px; display: flex; justify-content: space-between; }
.cart-gallery-order button { width: 28px; height: 28px; color: #111; background: rgba(255,255,255,.92); border: 0; border-radius: 50%; cursor: pointer; }
.cart-gallery-upload label { min-height: 36px; display: inline-flex; align-items: center; gap: .4rem; margin-top: .45rem; padding: 0 .65rem; border: 1px solid var(--line); border-radius: 6px; font-size: .78rem; font-weight: 800; cursor: pointer; }
.cart-gallery-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cart-gallery-adaptation { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; margin-top: 0.3rem; }
.cart-gallery-adaptation button,
.cart-gallery-upload-modes button { min-height: 34px; padding: 0 0.35rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 0.7rem; font-weight: 800; cursor: pointer; }
.cart-gallery-adaptation button[aria-pressed="true"],
.cart-gallery-upload-modes button[aria-pressed="true"] { border-color: #d2a400; background: #fff9df; }
.cart-gallery-upload-preview { display: grid; gap: 0.35rem; margin-top: 0.4rem; }
.cart-gallery-upload-row { display: grid; gap: 0.25rem; padding: 0.4rem; border: 1px solid var(--line); border-radius: 5px; }
.cart-gallery-upload-row > strong { overflow-wrap: anywhere; font-size: 0.72rem; }
.cart-gallery-upload-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
.cart-gallery-upload-submit { width: 100%; min-height: 38px; margin-top: 0.4rem; border: 0; border-radius: 4px; background: var(--yellow); font-weight: 800; cursor: pointer; }

.cart-line-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.85rem;
}

.cart-quantity-control {
    height: 40px;
    display: inline-grid;
    grid-template-columns: 40px 54px 40px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
}

.cart-quantity-control button {
    min-width: 40px;
    min-height: 40px;
    font-weight: 800;
}

.cart-quantity-control input {
    width: 54px;
    border: 0;
    border-inline: 1px solid var(--line);
    text-align: center;
    font-weight: 700;
    -moz-appearance: textfield;
}

.cart-quantity-control input::-webkit-outer-spin-button,
.cart-quantity-control input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.cart-remove-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #4b5563;
    font-size: 0.88rem;
}

.cart-drawer-footer {
    flex: 0 0 auto;
    padding: 1.2rem 1.45rem 1.35rem;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.cart-summary-box > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #111111;
    font-weight: 800;
}

.cart-summary-box p {
    margin: 0.35rem 0 1.1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.cart-checkout-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 4px;
    color: #111111;
    background: var(--yellow);
    font-weight: 800;
    cursor: pointer;
}

.cart-detail-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    margin-top: 0.65rem;
    font-weight: 800;
}

.cart-drawer-empty {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.cart-empty {
    max-width: 320px;
    margin-inline: auto;
    text-align: center;
}

.cart-empty > i {
    width: 62px;
    height: 62px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--yellow-dark);
    background: #fff8df;
    font-size: 1.45rem;
}

.cart-empty h3 {
    margin-top: 1rem;
    font-size: 1.35rem;
}

.cart-empty p {
    color: var(--muted);
}

.cart-empty a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    padding: 0 1.1rem;
    border-radius: 4px;
    color: #111111;
    background: var(--yellow);
    font-weight: 800;
}

.cart-detail-page {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.cart-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0 1.4rem;
}

.cart-detail-heading h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

.cart-detail-heading a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
}

.cart-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

.cart-detail-lines,
.cart-detail-summary,
.cart-detail-empty {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.05);
}

.cart-detail-lines {
    padding: 0 1.4rem;
}

.cart-detail-summary {
    position: sticky;
    top: 142px;
    padding: 1.35rem;
}

.cart-detail-summary h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.cart-detail-empty {
    padding: 4rem 1rem;
}

.cart-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 120;
    padding: 0.85rem 1rem;
    border-radius: 4px;
    background: #1f242b;
    color: #ffffff;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.cart-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cart-product-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.9rem;
}

.cart-product-field {
    display: grid;
    gap: 0.35rem;
}

.product-configurator-section {
    display: grid;
    gap: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.product-configurator-section > header h2,
.product-configurator-section > header p {
    margin: 0;
}

.product-configurator-section > header h2 {
    color: #1f2430;
    font-size: 1.05rem;
}

.product-configurator-section > header p {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.configurator-choice-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.configurator-choice-field legend {
    padding: 0;
    font-weight: 800;
}

.configurator-choice-field > p,
.configurator-option-cost {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.configurator-value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.25rem;
}

.configurator-value-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    padding: 0.65rem;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}

.configurator-value-card.has-image {
    grid-template-columns: 20px 64px minmax(0, 1fr);
}

.configurator-value-card:has(input:checked) {
    border-color: #d2a400;
    box-shadow: 0 0 0 2px rgba(244, 196, 48, 0.24);
}

.configurator-value-card input {
    width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
}

.configurator-value-card img {
    width: 64px;
    height: 64px;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

.configurator-value-card > span {
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.configurator-value-card strong,
.configurator-value-card small,
.configurator-value-card em {
    overflow-wrap: anywhere;
}

.configurator-value-card small {
    color: var(--muted);
    font-weight: 400;
}

.configurator-value-card em {
    color: #7a5d00;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 800;
}

.cart-product-field label {
    font-weight: 800;
}

.cart-product-field input,
.cart-product-field select,
.cart-product-field textarea {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.65rem 0.8rem;
    background: #ffffff;
}

.cart-product-field textarea {
    min-height: 90px;
    resize: vertical;
}

.cart-product-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-product-check input {
    width: 20px;
    height: 20px;
}

.cart-product-form .product-cta {
    width: 100%;
}

.cart-product-form .product-cta.is-loading {
    opacity: 0.7;
}

.customer-gallery-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.customer-gallery-field > legend { margin-bottom: 0.25rem; font-weight: 800; }
.customer-gallery-field > p { margin: 0 0 0.55rem; color: var(--muted); font-size: 0.86rem; }
.customer-gallery-decisions { display: grid; gap: 0.75rem; margin: 0 0 0.85rem; }
.customer-gallery-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.customer-gallery-choice legend { margin-bottom: 0.35rem; padding: 0; font-size: 0.82rem; font-weight: 800; }
.customer-gallery-choice > div { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.customer-gallery-choice label { position: relative; min-height: 42px; display: inline-flex; align-items: center; cursor: pointer; }
.customer-gallery-choice input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }
.customer-gallery-choice span { min-height: 42px; display: inline-flex; align-items: center; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 0.85rem; font-weight: 800; }
.customer-gallery-choice input:checked + span { border-color: #d2a400; box-shadow: 0 0 0 2px rgba(244, 196, 48, 0.24); }
.customer-gallery-choice input:focus-visible + span { outline: 3px solid rgba(244, 196, 48, 0.5); outline-offset: 2px; }
.customer-gallery-dropzone { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 0.3rem; padding: 1rem; border: 2px dashed #b8c1cd; border-radius: 8px; background: #fafbfc; text-align: center; cursor: pointer; }
.customer-gallery-dropzone.is-dragging { border-color: #c79900; background: #fff9df; }
.customer-gallery-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.customer-gallery-dropzone i { color: #b28700; font-size: 1.8rem; }
.customer-gallery-dropzone span,
.customer-gallery-dropzone small { color: var(--muted); font-weight: 400; }
.customer-gallery-status { min-height: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 0.7rem; margin-top: 0.55rem; font-size: 0.8rem; }
.customer-gallery-status span { color: #9b2c2c; text-align: right; }
.customer-gallery-thumbnails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin-top: 0.45rem; }
.customer-gallery-thumbnail { position: relative; min-width: 0; padding: 0.55rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.customer-gallery-preview { position: relative; width: 100%; min-height: 110px; max-height: 260px; overflow: hidden; border-radius: 4px; }
.customer-gallery-preview img { width: 100%; height: 100%; display: block; object-position: center; }
.customer-gallery-remove { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: rgba(17, 24, 39, 0.82); border: 0; border-radius: 50%; cursor: pointer; }
.customer-gallery-thumbnail-details { min-width: 0; display: grid; gap: 0.2rem; margin-top: 0.45rem; }
.customer-gallery-thumbnail-details > strong,
.customer-gallery-thumbnail-details > small { overflow-wrap: anywhere; }
.customer-gallery-thumbnail-details > small { color: var(--muted); font-size: 0.75rem; }
.customer-gallery-quality { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 0.4rem; margin-top: 0.35rem; padding-top: 0.45rem; border-top: 1px solid var(--line); font-size: 0.78rem; line-height: 1.4; }
.customer-gallery-quality > i { margin-top: 0.15rem; }
.customer-gallery-quality > span { min-width: 0; display: grid; gap: 0.08rem; }
.customer-gallery-quality small { color: var(--muted); font-size: 0.72rem; }
.customer-gallery-quality.is-optimal { color: #28723f; }
.customer-gallery-quality.is-acceptable { color: #765800; }
.customer-gallery-quality.is-insufficient { color: #9b2c2c; }
.customer-gallery-adaptation { min-width: 0; margin: 0.45rem 0 0; padding: 0.55rem 0 0; border: 0; border-top: 1px solid var(--line); }
.customer-gallery-adaptation legend { padding: 0; color: #5f4500; font-size: 0.78rem; line-height: 1.4; font-weight: 800; }
.customer-gallery-adaptation > span { display: block; margin: 0.3rem 0; font-size: 0.78rem; font-weight: 800; }
.customer-gallery-adaptation > div { display: grid; gap: 0.35rem; }
.customer-gallery-adaptation label { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 0.45rem; padding: 0.45rem; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.customer-gallery-adaptation label:has(input:checked) { border-color: #d2a400; background: #fff9df; }
.customer-gallery-adaptation input { width: 18px; min-height: 18px; margin: 0.15rem 0 0; padding: 0; }
.customer-gallery-adaptation label span { min-width: 0; display: grid; gap: 0.1rem; }
.customer-gallery-adaptation label strong { font-size: 0.8rem; }
.customer-gallery-adaptation label small { color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.customer-gallery-handle { position: absolute; bottom: 4px; left: 4px; width: 30px; height: 30px; display: grid; place-items: center; color: #111; background: rgba(255,255,255,0.9); border-radius: 50%; cursor: grab; }

.cart-button:focus-visible,
.cart-drawer-header button:focus-visible,
.cart-remove-button:focus-visible,
.cart-quantity-control button:focus-visible,
.cart-quantity-control input:focus-visible,
.cart-checkout-button:focus-visible,
.cart-detail-link:focus-visible,
.cart-empty a:focus-visible,
.cart-product-field input:focus-visible,
.cart-product-field select:focus-visible,
.cart-product-field textarea:focus-visible {
    outline: 3px solid rgba(244, 196, 48, 0.5);
    outline-offset: 2px;
}

@media (max-width: 980px) {
    .cart-detail-layout {
        grid-template-columns: 1fr;
    }

    .cart-detail-summary {
        position: static;
    }

    .cart-button {
        padding-inline: 0.7rem;
    }
}

@media (max-width: 560px) {
    .configurator-value-grid {
        grid-template-columns: 1fr;
    }
    .customer-gallery-thumbnails { grid-template-columns: 1fr; }
    .customer-gallery-dropzone { width: 100%; }
}

@media (max-width: 620px) {
    .cart-label-text,
    .cart-subtotal-text {
        display: none;
    }

    .cart-button {
        min-width: 44px;
        padding-inline: 0.55rem;
    }

    .cart-drawer-panel {
        width: 100vw;
    }

    .cart-drawer-header,
    .cart-drawer-list,
    .cart-drawer-footer {
        padding-inline: 1rem;
    }

    .cart-line {
        grid-template-columns: 64px 1fr;
    }

    .cart-line-media {
        width: 64px;
        height: 64px;
    }

    .cart-line-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-detail-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cart-overlay,
    .cart-drawer-panel,
    .cart-toast {
        transition: none;
    }
}
