/* ============================================================================
 * Cart icon (in header) + badge
 * ========================================================================= */
.cart-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--color-text, #1a1a1a);
    text-decoration: none;
    transition: color var(--transition-base, 0.2s ease);
}

.cart-icon-link:hover {
    color: var(--color-orange, #E4632B);
}

.cart-icon {
    flex-shrink: 0;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-orange, #E4632B);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

.cart-badge.hidden {
    display: none;
}

/* ============================================================================
 * /cart page
 * ========================================================================= */
.cart-page {
    max-width: 920px;
    margin: 0 auto;
    padding: var(--spacing-lg, 24px) var(--spacing-md, 16px);
}

.cart-page__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-md, 16px);
}

.cart-page__bridge-notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: var(--spacing-md, 16px);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.cart-empty__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1f2937;
}

.cart-empty__hint {
    margin: 0 0 24px;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 16px);
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: var(--spacing-md, 16px);
    padding: var(--spacing-md, 16px);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    align-items: start;
}

.cart-item__thumb {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background: #f3f4f6 center/cover no-repeat;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item__details {
    min-width: 0;
}

.cart-item__name {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.cart-item__pet {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 12px;
}

.cart-item__attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 0.85rem;
    color: #4b5563;
    margin-bottom: 12px;
}

.cart-item__attr-label {
    color: #9ca3af;
    margin-right: 4px;
}

.cart-item__sizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.cart-item__size {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.cart-item__size-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

.cart-item__size-input {
    width: 100%;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    appearance: textfield;
    -moz-appearance: textfield;
}

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

.cart-item__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cart-item__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
}

.cart-item__remove {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
}

.cart-item__remove:hover {
    color: #dc2626;
}

@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    .cart-item__thumb {
        width: 80px;
        height: 80px;
    }
    .cart-item__side {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.cart-summary {
    margin-top: var(--spacing-lg, 24px);
    padding: var(--spacing-md, 16px);
    background: #f9fafb;
    border-radius: 12px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95rem;
}

.cart-summary__row--total {
    font-size: 1.15rem;
    font-weight: 700;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 8px;
}

.cart-summary__actions {
    display: flex;
    gap: 12px;
    margin-top: var(--spacing-md, 16px);
    flex-wrap: wrap;
}

.cart-summary__actions .btn {
    flex: 1;
    min-width: 140px;
}

/* ============================================================================
 * Toast (used by Add to Cart confirmation)
 * ========================================================================= */
.wuuf-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1f2937;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 360px;
    font-size: 0.9rem;
}

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

.wuuf-toast__msg {
    flex: 1;
}

.wuuf-toast__action {
    color: var(--color-orange, #E4632B);
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

.wuuf-toast__action:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .wuuf-toast {
        bottom: 12px;
        left: 12px;
        right: 12px;
        max-width: none;
    }
}
