.wcc-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.wcc-cart-main,
.wcc-cart-sidebar,
.wcc-cart-items {
    min-width: 0;
    max-width: 100%;
}

.wcc-cart-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.wcc-cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    font-family: var(--wcc-font);
}

.wcc-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--wcc-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--wcc-text, #1a1a1a);
    cursor: pointer;
    user-select: none;
}

.wcc-cart-actions .wcc-checkbox-text {
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--wcc-text, #1a1a1a);
}

.wcc-cart-actions .wcc-cart-remove-selected,
.wcc-cart-actions #wcc-remove-selected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--wcc-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #757575;
    cursor: pointer;
    text-decoration: none;
}

.wcc-cart-actions .wcc-cart-remove-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: inherit;
}

.wcc-cart-actions .wcc-cart-action-text {
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: inherit;
}

.wcc-cart-actions .wcc-cart-remove-selected:hover,
.wcc-cart-actions #wcc-remove-selected:hover {
    color: #555;
}

.wcc-item-check input[type="checkbox"],
.wcc-cart-actions input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    border: 1px solid var(--wcc-border);
    border-radius: 4px;
    background: #fff;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
}

.wcc-item-check input[type="checkbox"]:checked,
.wcc-cart-actions input[type="checkbox"]:checked {
    background: var(--wcc-primary);
    border-color: var(--wcc-primary);
}

.wcc-item-check input[type="checkbox"]:checked::after,
.wcc-cart-actions input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wcc-cart-item {
    display: grid;
    grid-template-columns: auto 88px minmax(0, 1fr) auto auto;
    gap: 16px 24px;
    padding: 20px 0 12px;
    align-items: start;
}

.wcc-cart-item-block {
    border-bottom: 1px solid var(--wcc-border);
}

.wcc-cart-item-block:last-child {
    border-bottom: 0;
}

.wcc-item-crosssells {
    padding: 0 0 20px;
    margin-left: calc(20px + 24px + 88px + 24px);
    max-width: 100%;
    min-width: 0;
}

.wcc-item-crosssells-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0 !important;
    padding: 0;
    border: 0;
    background: none;
    color: var(--wcc-text, #1a1a1a);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.wcc-item-crosssells-toggle:hover {
    color: var(--wcc-text, #1a1a1a);
}

.wcc-item-crosssells-chevron {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wcc-item-crosssells-toggle[aria-expanded="false"] .wcc-item-crosssells-chevron {
    transform: rotate(180deg);
}

.wcc-item-crosssells-panel {
    min-width: 0;
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f2f4f7;
}

.wcc-item-crosssells:not(.is-open) {
    display: none;
}

.wcc-item-crosssells-viewport {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.wcc-item-crosssells-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.wcc-item-crosssells-track::-webkit-scrollbar {
    display: none;
}

.wcc-item-crosssells-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    transform: translateY(-50%);
    line-height: 0;
    appearance: none;
    -webkit-appearance: none;
}

.wcc-item-crosssells-nav svg {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.wcc-item-crosssells-nav:hover,
.wcc-item-crosssells-nav:focus,
.wcc-item-crosssells-nav:active {
    background: #fff;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    outline: none;
}

.wcc-item-crosssells-nav[hidden] {
    display: none !important;
}

.wcc-item-crosssells-prev {
    left: 4px;
}

.wcc-item-crosssells-next {
    right: 4px;
}

.wcc-item-crosssells-viewport::before,
.wcc-item-crosssells-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 36px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wcc-item-crosssells-viewport::before {
    left: 0;
    background: linear-gradient(90deg, #f2f4f7 10%, rgba(242, 244, 247, 0));
}

.wcc-item-crosssells-viewport::after {
    right: 0;
    background: linear-gradient(270deg, #f2f4f7 10%, rgba(242, 244, 247, 0));
}

.wcc-item-crosssells-viewport.has-prev::before,
.wcc-item-crosssells-viewport.has-next::after {
    opacity: 1;
}

.wcc-rec-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    flex: 0 0 calc((100% - 12px) / 2);
    width: calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
    min-width: 0;
    box-sizing: border-box;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    scroll-snap-align: start;
}

.wcc-rec-image-link {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.wcc-rec-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0;
}

.wcc-rec-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 8px;
}

.wcc-rec-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wcc-rec-title a {
    color: inherit;
    text-decoration: none;
}

.wcc-rec-title a:hover {
    color: var(--wcc-primary);
}

.wcc-rec-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.wcc-rec-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.wcc-rec-price-old {
    font-size: 12px;
    color: var(--wcc-muted);
    text-decoration: line-through;
    white-space: nowrap;
}

.wcc-rec-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.wcc-rec-card .wcc-rec-price {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    color: var(--wcc-text, #1a1a1a);
}

.wcc-rec-card .wcc-badge-discount {
    background: var(--wcc-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 4px;
}

.wcc-rec-add {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--wcc-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wcc-rec-add svg {
    width: 18px;
    height: 18px;
    display: block;
}

.wcc-rec-add.wcc-loading {
    opacity: 0.7;
    pointer-events: none;
}

.wcc-item-check {
    display: flex;
    align-items: flex-start;
    padding-top: 28px;
}

.wcc-item-image img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.wcc-item-body {
    min-width: 0;
}

.wcc-item-sku { font-size: 13px; color: var(--wcc-muted); }
.wcc-item-name { font-size: 16px; margin: 4px 0 0; font-weight: 600; line-height: 1.35; }
.wcc-item-name a { color: inherit; text-decoration: none; }
.wcc-item-availability {
    font-size: 13px;
    color: var(--wcc-muted);
    margin-top: 4px;
}
.wcc-item-availability-accent {
    color: var(--wcc-accent);
}

.wcc-item-variations {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wcc-item-variation {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--wcc-muted);
}

.wcc-item-variation-label {
    color: var(--wcc-muted);
}

.wcc-item-variation-value {
    color: var(--wcc-text, #1a1a1a);
}

.wcc-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 120px;
}

.wcc-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.wcc-item-pricing {
    text-align: left;
    padding-top: 4px;
    white-space: nowrap;
    min-width: 110px;
}

.wcc-item-price-old-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.wcc-price-current { font-size: 18px; font-weight: 700; line-height: 1.2; }
.wcc-price-old { font-size: 14px; color: var(--wcc-muted); text-decoration: line-through; }

.wcc-item-pricing .wcc-badge-discount {
    background: var(--wcc-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 4px;
}

.wcc-badge-discount {
    background: #e8f5e9;
    color: var(--wcc-accent);
    margin-bottom: 0;
    white-space: nowrap;
}

.wcc-qty {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #f2f4f7;
    padding: 0 2px;
}

.wcc-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
}

.wcc-qty-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.wcc-qty-btn[disabled],
.wcc-qty-btn:disabled {
    color: #b0b4ba;
    cursor: default;
    opacity: 1;
}

.wcc-qty-input {
    width: 36px;
    text-align: center;
    border: none;
    background: #f2f4f7;
    background-color: #f2f4f7;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    height: 36px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.wcc-qty-input::-webkit-outer-spin-button,
.wcc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wcc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--wcc-muted);
    border-radius: 50%;
}

.wcc-icon-btn:hover {
    background: #f5f5f5;
    color: var(--wcc-text);
}

.wcc-summary-stats { font-size: 14px; color: var(--wcc-muted); margin-bottom: 16px; }
.wcc-summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.wcc-summary-savings .wcc-accent { font-weight: 600; }
.wcc-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 22px;
    font-weight: 700;
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid var(--wcc-border);
}

.wcc-summary-savings-item {
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

.wcc-notice {
    margin: 0 0 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.wcc-notice:last-child {
    margin-bottom: 0;
}

.wcc-notice--error {
    background: #fde8e8;
    color: #b91c1c;
}

.wcc-notice--success {
    background: #e8f5e9;
    color: #2e7d32;
}

.wcc-notice--info {
    background: #e3f2fd;
    color: #1565c0;
}

.wcc-notices:empty,
.wcc-coupon-notices:empty {
    display: none;
}

.wcc-coupon-notices {
    margin-bottom: 16px;
}

.wcc-coupon-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.wcc-coupon-form button[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 108px;
    flex-shrink: 0;
}

.wcc-coupon-form button[type="submit"] .wcc-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--wcc-primary);
    border-radius: 50%;
    animation: wcc-spin 0.7s linear infinite;
}

.wcc-coupon-form button[type="submit"].wcc-loading {
    opacity: 0.85;
    pointer-events: none;
}

.wcc-coupon-form button[type="submit"].wcc-loading .wcc-spinner {
    display: block;
}

.wcc-coupon-form button[type="submit"].wcc-loading .wcc-coupon-submit-label {
    opacity: 0.65;
}

.wcc-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--wcc-primary);
    border-radius: 50%;
    animation: wcc-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.wcc-qty-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -9px 0 0 -9px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.85);
}

.wcc-qty.wcc-loading {
    pointer-events: none;
}

.wcc-qty.wcc-loading .wcc-qty-spinner {
    display: block;
}

.wcc-qty.wcc-loading .wcc-qty-btn,
.wcc-qty.wcc-loading .wcc-qty-input {
    opacity: 0.3;
}

.wcc-coupon-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--wcc-border);
    border-radius: var(--wcc-radius-field);
    font-size: 15px;
}

.wcc-applied-coupons {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.wcc-applied-coupon {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0 0;
    margin-top: 12px;
    border-top: 1px solid var(--wcc-border);
}

.wcc-applied-coupon__body {
    flex: 1;
    min-width: 0;
}

.wcc-applied-coupon__code {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--wcc-text);
}

.wcc-applied-coupon__desc {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--wcc-muted);
}

.wcc-remove-coupon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--wcc-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.wcc-remove-coupon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.wcc-remove-coupon:hover {
    background: #f0f0f0;
    color: var(--wcc-text);
}

#wcc-go-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#wcc-go-checkout .wcc-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcc-spin 0.7s linear infinite;
    flex-shrink: 0;
}

#wcc-go-checkout.wcc-loading {
    opacity: 0.92;
    pointer-events: none;
}

#wcc-go-checkout.wcc-loading .wcc-spinner {
    display: block;
}

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

.wcc-empty-cart { text-align: center; padding: 48px 0; }

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

@media (max-width: 768px) {
    .wcc-cart-page .wcc-cart-layout {
        gap: 0;
    }

    .wcc-cart-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        order: unset;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 18%);
        pointer-events: none;
    }

    .wcc-cart-sidebar .wcc-cart-summary {
        pointer-events: auto;
        border-radius: var(--wcc-radius) var(--wcc-radius) 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        margin: 0;
    }
    
    .wcc-cart-summary .wcc-summary-row {
        margin-bottom: 8px;
        font-size: 14px;
    }

    .wcc-cart-summary .wcc-summary-meta {
        color: var(--wcc-muted);
    }

    .wcc-cart-summary .wcc-summary-savings-accordion {
        margin-bottom: 8px;
    }

    .wcc-cart-summary .wcc-summary-total {
        margin: 0 0 10px;
        padding-top: 0;
        border-top: none;
        font-size: 20px;
    }

    .wcc-cart-summary .wcc-coupon-form {
        margin-bottom: 8px;
    }

    .wcc-cart-summary .wcc-coupon-form input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .wcc-cart-summary .wcc-applied-coupons {
        margin-bottom: 8px;
    }

    .wcc-cart-summary .wcc-applied-coupon {
        padding: 8px 0 0;
        margin-top: 8px;
    }

    .wcc-cart-summary #wcc-go-checkout {
        margin-top: 0;
        min-height: 48px;
    }

    .wcc-cart-item {
        grid-template-columns: auto 64px 1fr auto;
        grid-template-areas:
            "check image body side"
            "check image pricing side";
        gap: 10px 16px;
    }
    .wcc-item-check {
        grid-area: check;
        padding-top: 24px;
    }
    .wcc-item-image { grid-area: image; }
    .wcc-item-image img { width: 64px; height: 64px; }
    .wcc-item-body { grid-area: body; }
    .wcc-item-pricing {
        grid-area: pricing;
        text-align: left;
        padding-top: 0;
        min-width: 0;
    }
    .wcc-item-side {
        grid-area: side;
        align-items: flex-end;
        min-width: 0;
        justify-self: end;
    }
    .wcc-item-actions {
        justify-content: flex-end;
    }
    .wcc-item-price-old-row { justify-content: flex-start; }

    .wcc-item-crosssells {
        margin-left: 0;
        padding-bottom: 16px;
    }

    .wcc-rec-card {
        flex: 0 0 calc((100% - 12px) / 2);
        width: calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
        padding: 10px;
        gap: 8px;
    }

    .wcc-rec-image-link {
        width: 56px;
        height: 56px;
    }
}
